Jan 19, 2005 #1 djdidge Programmer May 9, 2001 65 GB basically i need to find out the colour settings of my PC. Preferably using the framework. Ideas? Regards DiDGE
basically i need to find out the colour settings of my PC. Preferably using the framework. Ideas? Regards DiDGE
Jan 19, 2005 Thread starter #3 djdidge Programmer May 9, 2001 65 GB tried using this API... Private Const BITSPIXEL = 12 Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long ... MsgBox("This system is using " & Format$(GetDeviceCaps(Me.Handle.ToInt64, BITSPIXEL)) & "-bit color.") this returns a stupidly large number like 23254235363 Upvote 0 Downvote
tried using this API... Private Const BITSPIXEL = 12 Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long ... MsgBox("This system is using " & Format$(GetDeviceCaps(Me.Handle.ToInt64, BITSPIXEL)) & "-bit color.") this returns a stupidly large number like 23254235363
Jan 21, 2005 Thread starter #4 djdidge Programmer May 9, 2001 65 GB thanks to the TheLearnedOne for this answer in another forum.............................................. Private Const BITSPIXEL As Integer = 12 Private Declare Function GetDeviceCaps Lib "gdi32" _ (ByVal hDC As Integer, ByVal nIndex As Integer) As Integer Private Declare Function GetDesktopWindow Lib "User32.dll" () As Integer Private Declare Function GetWindowDC Lib "User32.dll" (ByVal hWnd As IntPtr) As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim hDc As Integer = GetWindowDC(Me.Handle) Dim capsForm As Integer = GetDeviceCaps(hDc, BITSPIXEL) MsgBox("This system is using " & capsForm & "-bit color.") End Sub Upvote 0 Downvote
thanks to the TheLearnedOne for this answer in another forum.............................................. Private Const BITSPIXEL As Integer = 12 Private Declare Function GetDeviceCaps Lib "gdi32" _ (ByVal hDC As Integer, ByVal nIndex As Integer) As Integer Private Declare Function GetDesktopWindow Lib "User32.dll" () As Integer Private Declare Function GetWindowDC Lib "User32.dll" (ByVal hWnd As IntPtr) As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim hDc As Integer = GetWindowDC(Me.Handle) Dim capsForm As Integer = GetDeviceCaps(hDc, BITSPIXEL) MsgBox("This system is using " & capsForm & "-bit color.") End Sub