Rozdzielczosc Jak w VB mozna zmienic rozdzielczosc ekranu???Aha, screen.width=... nie dzialaja.Z gory dzieki za odpowiedz. _____________________________________________www.napadlek.prv.pl ruszyla od nowa zapraszam
04-09-2003 16:15
3392810
Chudy [TLHW]Wiktor
Typ: moderator Postów: 574 Zarejestrowany: Aug 2002
Najlepiej 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
1220895
Chudy [TLHW]Wiktor
Typ: moderator Postów: 574 Zarejestrowany: Aug 2002
Moż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
1220895
napadlek Ciapek
Typ: neutral Postów: 117 Zarejestrowany: Feb 2003
WOW Dzieki No no, niezle , wielki brat jest pod wrazeniem. O to chodzilo. _____________________________________________www.napadlek.prv.pl ruszyla od nowa zapraszam
05-09-2003 14:57
3392810
Wszystkich odpowiedzi: 3 :: Maxymalnie na stronę: 20