Author |
Topic |
|
ctacke
877 Posts |
|
ctacke
877 Posts |
Posted - 16 Nov 2004 : 11:31:45
|
Bug Fix
Revision 1 of this app failed if the "Display Name" of the Scheme didn't match the subkey name of the scheme in the registry, such as for 'Windows Standard' or 'High Impact White'. Revision 2 fixes that bug. |
|
|
ken.yeung
20 Posts |
Posted - 21 Apr 2005 : 22:09:22
|
I am working on WinCE v4.20.9 with AGX and VB.Net. I tried to swap the system color of Desktop and that of active caption text (white) using the following code. However, even the intSuccess returns -1 (nonzero means success), the colors did not change.
Also, I am not able to call GetSysColor to obtain the system color. It always return zero (means failure) and using GetLastError() gives 87 (invalid parameter).
Please kindly advise on the use of GetSysColor and SetSysColrs.
Thanks, Ken.
*************** CODE **************************** Overloads Declare Function GetSysColor Lib "coredll" (ByVal nIndex As Integer) As Integer
Overloads Declare Function SetSysColors Lib "coredll" (ByVal cElements As Integer, _ ByVal lpaElements As Integer(), _ ByVal lpaRgbValues As Integer()) As Boolean
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim intTextColor As Integer = Label1.ForeColor.ToArgb Dim intBkgdColor As Integer = Me.BackColor.ToArgb
Dim intElements() As Integer = {COLOR_CAPTIONTEXT, COLOR_DESKTOP} Dim intRgbValues() As Integer = {intBkgdColor, intTextColor}
Dim intSuccess As Integer = SetSysColors(2, intElements, intRgbValues)
Me.Refresh() End Sub |
|
|
|
Topic |
|
|
|