[ Pobierz całość w formacie PDF ]
.Strona: [ > ] z 1 AutorTemat: RozdzielczoscnapadlekCiapekTyp:neutralPostów: 117Zarejestrowany: Feb 2003RozdzielczoscJak w VB mozna zmienic rozdzielczosc ekranu???Aha, screen.width=.nie dzialaja.Z gory dzieki za odpowiedz._____________________________________________ ruszyla od nowa zapraszam04-09-2003 16:15 3392810Chudy[TLHW]WiktorTyp:moderatorPostów: 574Zarejestrowany: Aug 2002Najlepiej wklej poni¿szy kodzik do jakiego¶ modó³u:Private Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" (ByVal lpszDeviceName As Long, ByVal iModeNum As Long, lpDevMode As Any) As BooleanPrivate Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" (lpDevMode As Any, ByVal dwflags As Long) As Long Const CCDEVICENAME = 32Const CCFORMNAME = 32Const DM_PELSWIDTH = &H80000Const DM_PELSHEIGHT = &H100000Dim DevM As DEVMODE Public Type RECT Left As Long Top As Long Right As Long Bottom As LongEnd TypePrivate Type DEVMODE dmDeviceName As String * CCDEVICENAME dmSpecVersion As Integer dmDriverVersion As Integer dmSize As Integer dmDriverExtra As Integer dmFields As Long dmOrientation As Integer dmPaperSize As Integer dmPaperLength As Integer dmPaperWidth As Integer dmScale As Integer dmCopies As Integer dmDefaultSource As Integer dmPrintQuality As Integer dmColor As Integer dmDuplex As Integer dmYResolution As Integer dmTTOption As Integer dmCollate As Integer dmFormName As String * CCFORMNAME dmUnusedPadding As Integer dmBitsPerPel As Integer dmPelsWidth As Long dmPelsHeight As Long dmDisplayFlags As Long dmDisplayFrequency As LongEnd Type Public Function ChangeResolution(iWidth As Single, iHeight As Single)Dim a As BooleanDim i&i = 0Do a = EnumDisplaySettings(0&, i&, DevM) i = i + 1Loop Until (a = False)Dim b&DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHTDevM.dmPelsWidth = iWidthDevM.dmPelsHeight = iHeightb = ChangeDisplaySettings(DevM, 0)End FunctionA potem ju¿ w bardzo prosty sposób mo¿esz zmieniæ ro¼dzielczo¶æ now± funkcj±.Np.:ChangeResolution 800, 600_____________________________________________Projekt "Thunder Cannons" nadchodzi.04-09-2003 17:14 1220895Chudy[TLHW]WiktorTyp:moderatorPostów: 574Zarejestrowany: Aug 2002Mo¿na to zrobiæ równie¿ za pomoc± DirectX, sam ma³o jeszcze w nim umiem ale akurat tego siê nauczy³em :Dim mdx As New DirectX7Dim mdd As DirectDraw7Const SCREEN_WIDTH = 800 'Szeroko¶æ w ro¼dzielczo¶ciConst SCREEN_HEIGHT = 600 'Wysoko¶æ w ro¼dzielczo¶ciConst SCREEN_BITDEPTH = 16Private Sub Form_Load()Me.ShowSet mdd = mdx.DirectDrawCreate(""mdd.SetCooperativeLevel Form1.hWnd, DDSCL_FULLSCREEN Or DDSCL_EXCLUSIVEmdd.SetDisplayMode SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BITDEPTH, 0, DDSDM_STANDARDVGAMODEEnd Sub_____________________________________________Projekt "Thunder Cannons" nadchodzi.04-09-2003 17:19 1220895napadlekCiapekTyp:neutralPostów: 117Zarejestrowany: Feb 2003WOW DziekiNo no, niezle , wielki brat jest pod wrazeniem.O to chodzilo._____________________________________________ ruszyla od nowa zapraszam05-09-2003 14:57 3392810Wszystkich odpowiedzi: 3 :: Maxymalnie na stronê: 20Strona: [ > ] z 1
[ Pobierz całość w formacie PDF ]