Hi,
kennt vielleicht jemand eine API womit ich die Auflösung (
z.Bsp. 1024x768) und die Bildwiederhohlrate ( z.Bsp. 85 Hz )
herausbekomme.
Aus dem API-Guide (http://www.allapi.net):
'In general section
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Const SM\_CXSCREEN = 0 'X Size of screen
Const SM\_CYSCREEN = 1 'Y Size of Screen
Const SM\_CXVSCROLL = 2 'X Size of arrow in vertical scroll bar.
Const SM\_CYHSCROLL = 3 'Y Size of arrow in horizontal scroll bar
Const SM\_CYCAPTION = 4 'Height of windows caption
Const SM\_CXBORDER = 5 'Width of no-sizable borders
Const SM\_CYBORDER = 6 'Height of non-sizable borders
Const SM\_CXDLGFRAME = 7 'Width of dialog box borders
Const SM\_CYDLGFRAME = 8 'Height of dialog box borders
Const SM\_CYHTHUMB = 9 'Height of scroll box on horizontal scroll bar
Const SM\_CXHTHUMB = 10 ' Width of scroll box on horizontal scroll bar
Const SM\_CXICON = 11 'Width of standard icon
Const SM\_CYICON = 12 'Height of standard icon
Const SM\_CXCURSOR = 13 'Width of standard cursor
Const SM\_CYCURSOR = 14 'Height of standard cursor
Const SM\_CYMENU = 15 'Height of menu
Const SM\_CXFULLSCREEN = 16 'Width of client area of maximized window
Const SM\_CYFULLSCREEN = 17 'Height of client area of maximized window
Const SM\_CYKANJIWINDOW = 18 'Height of Kanji window
Const SM\_MOUSEPRESENT = 19 'True is a mouse is present
Const SM\_CYVSCROLL = 20 'Height of arrow in vertical scroll bar
Const SM\_CXHSCROLL = 21 'Width of arrow in vertical scroll bar
Const SM\_DEBUG = 22 'True if deugging version of windows is running
Const SM\_SWAPBUTTON = 23 'True if left and right buttons are swapped.
Const SM\_CXMIN = 28 'Minimum width of window
Const SM\_CYMIN = 29 'Minimum height of window
Const SM\_CXSIZE = 30 'Width of title bar bitmaps
Const SM\_CYSIZE = 31 'height of title bar bitmaps
Const SM\_CXMINTRACK = 34 'Minimum tracking width of window
Const SM\_CYMINTRACK = 35 'Minimum tracking height of window
Const SM\_CXDOUBLECLK = 36 'double click width
Const SM\_CYDOUBLECLK = 37 'double click height
Const SM\_CXICONSPACING = 38 'width between desktop icons
Const SM\_CYICONSPACING = 39 'height between desktop icons
Const SM\_MENUDROPALIGNMENT = 40 'Zero if popup menus are aligned to the left of the memu bar item. True if it is aligned to the right.
Const SM\_PENWINDOWS = 41 'The handle of the pen windows DLL if loaded.
Const SM\_DBCSENABLED = 42 'True if double byte characteds are enabled
Const SM\_CMOUSEBUTTONS = 43 'Number of mouse buttons.
Const SM\_CMETRICS = 44 'Number of system metrics
Const SM\_CLEANBOOT = 67 'Windows 95 boot mode. 0 = normal, 1 = safe, 2 = safe with network
Const SM\_CXMAXIMIZED = 61 'default width of win95 maximised window
Const SM\_CXMAXTRACK = 59 'maximum width when resizing win95 windows
Const SM\_CXMENUCHECK = 71 'width of menu checkmark bitmap
Const SM\_CXMENUSIZE = 54 'width of button on menu bar
Const SM\_CXMINIMIZED = 57 'width of rectangle into which minimised windows must fit.
Const SM\_CYMAXIMIZED = 62 'default height of win95 maximised window
Const SM\_CYMAXTRACK = 60 'maximum width when resizing win95 windows
Const SM\_CYMENUCHECK = 72 'height of menu checkmark bitmap
Const SM\_CYMENUSIZE = 55 'height of button on menu bar
Const SM\_CYMINIMIZED = 58 'height of rectangle into which minimised windows must fit.
Const SM\_CYSMCAPTION = 51 'height of windows 95 small caption
Const SM\_MIDEASTENABLED = 74 'Hebrw and Arabic enabled for windows 95
Const SM\_NETWORK = 63 'bit o is set if a network is present. Const SM\_SECURE = 44 'True if security is present on windows 95 system
Const SM\_SLOWMACHINE = 73 'true if machine is too slow to run win95.
Private Sub Form\_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: [email protected]
'Set the graphic mode to persistent
Me.AutoRedraw = True
'retrieve information and print it to the form
Me.Print "Number of mouse buttons:" + Str$(GetSystemMetrics(SM\_CMOUSEBUTTONS))
Me.Print "Screen X:" + Str$(GetSystemMetrics(SM\_CXSCREEN))
Me.Print "Screen Y:" + Str$(GetSystemMetrics(SM\_CYSCREEN))
Me.Print "Height of windows caption:" + Str$(GetSystemMetrics(SM\_CYCAPTION))
Me.Print "Width between desktop icons:" + Str$(GetSystemMetrics(SM\_CXICONSPACING))
Me.Print "Maximum width when resizing a window:" + Str$(GetSystemMetrics(SM\_CYMAXTRACK))
Me.Print "Is machine is too slow to run windows?" + Str$(GetSystemMetrics(SM\_SLOWMACHINE))
End Sub
Bei der Bildwiederholrate muß ich passen.
Gruß
J.