If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
# of Colors
Is there a way, in Access 2002, to determine the # of
colors the graphics card is currently set to ? Thanks... |
#2
|
|||
|
|||
# of Colors
You should learn how to search on GoogleGroups as it is an invaluable
tool. From: Tom Esh ) Subject: GetDeviceCaps View this article only Newsgroups: microsoft.public.vb.winapi Date: 2002-09-17 01:56:10 PST On Tue, 17 Sep 2002 02:59:55 -0400, "Jon Wayn" wrote: I wish you would just jot down an example for me so i can see actual parameters. the thing is: in the examples i have seen, parameters, such as Form1.hdc or just hDC, are passed. Forms do not have an hdc property and these variables are not declared in the examples. So, being new (a complete novice) to API, I just dont get it. Please show me a practical example What language are you working in? VB forms ~do~ have a hDC property. Anyhow if the app has no forms, to fetch display device caps ~any~ window's DC will do, including the desktop. For example to retreive the current system color depth (bits): 'declares... Public Const BITSPIXEL = 12 Public Declare Function GetDeviceCaps Lib "gdi32" _ (ByVal hdc As Long, ByVal nIndex As Long) As Long Public Declare Function GetDC Lib "user32" _ (ByVal hwnd As Long) As Long Public Declare Function ReleaseDC Lib "user32" _ (ByVal hwnd As Long, ByVal hdc As Long) As Long Public Declare Function GetDesktopWindow Lib "user32" () As Long 'usage... Dim hwndDesk As Long, DC As Long hwndDesk = GetDesktopWindow() DC = GetDC(hwndDesk) Debug.Print GetDeviceCaps(DC, BITSPIXEL) ReleaseDC hwndDesk, DC -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Dave Ruhl" wrote in message ... Is there a way, in Access 2002, to determine the # of colors the graphics card is currently set to ? Thanks... |
#3
|
|||
|
|||
# of Colors
Thanks Stephen, I tried this code and, though it didn't
give me the # of colors (256, 16 million, etc...) it does tell me the bits (8, 32, etc...) which will work just as well for me. Thanks ! BTW, I did try searching GoogleGroups and your website and didn't find anything. Maybe I was just using the wrong parameters. |
Thread Tools | |
Display Modes | |
|
|