HELLLP!!!
-
;););)Hey..i am totally new to this forum...an it wud b really gr8 of u guys to help me. I am using a popup menu for my app. the popup menu is on the right click event of the tray icon.thru this menu..i am showin/hidin the system clock. the prob is that wen i hide the clock...the space where the clock was still appears....so if i click on that space the clock still appears makin the whole code pointless. However wen i hide the clock,and exit the app,all the icons occupy that space.Ditto happens if i click on show clock. So the problem here is refreshing the system tray. i found a lot of suggestions that told me to use NIM_DELETE from the shell.i hav already added evrythin usin the api.this only solved my prb with my apps icon.but the clock problem still exists.can anyone help.pls thx in advance (do excuse me if this is a stupid query..but am kinda new :)) Ppl who scratch their ass shudnt bite their fingernails
-
;););)Hey..i am totally new to this forum...an it wud b really gr8 of u guys to help me. I am using a popup menu for my app. the popup menu is on the right click event of the tray icon.thru this menu..i am showin/hidin the system clock. the prob is that wen i hide the clock...the space where the clock was still appears....so if i click on that space the clock still appears makin the whole code pointless. However wen i hide the clock,and exit the app,all the icons occupy that space.Ditto happens if i click on show clock. So the problem here is refreshing the system tray. i found a lot of suggestions that told me to use NIM_DELETE from the shell.i hav already added evrythin usin the api.this only solved my prb with my apps icon.but the clock problem still exists.can anyone help.pls thx in advance (do excuse me if this is a stupid query..but am kinda new :)) Ppl who scratch their ass shudnt bite their fingernails
I am too -- modified at 2:00 Monday 16th January, 2006
-
;););)Hey..i am totally new to this forum...an it wud b really gr8 of u guys to help me. I am using a popup menu for my app. the popup menu is on the right click event of the tray icon.thru this menu..i am showin/hidin the system clock. the prob is that wen i hide the clock...the space where the clock was still appears....so if i click on that space the clock still appears makin the whole code pointless. However wen i hide the clock,and exit the app,all the icons occupy that space.Ditto happens if i click on show clock. So the problem here is refreshing the system tray. i found a lot of suggestions that told me to use NIM_DELETE from the shell.i hav already added evrythin usin the api.this only solved my prb with my apps icon.but the clock problem still exists.can anyone help.pls thx in advance (do excuse me if this is a stupid query..but am kinda new :)) Ppl who scratch their ass shudnt bite their fingernails
post your code...i'll try to help. Eric Dahlvang-Programmer
-
post your code...i'll try to help. Eric Dahlvang-Programmer
Hey there.Below is the code.Am jus puttin the module in which i am havin a prob.You may need a WinLockDll.dll reference (which I took from this site "Locking Win32 apps -Antonio"). Thanks.
Private Declare Function Clock_Show_Hide Lib "WinLockDll.dll" (ByVal bShowHide As Boolean) As Integer Private Sub Command1_Click() Clock_Show_Hide (True) End Sub Private Sub Command2_Click() Clock_Show_Hide (False) End Sub
Ppl who drop their watch'es in d toilet r bound to have shitty time. -
Hey there.Below is the code.Am jus puttin the module in which i am havin a prob.You may need a WinLockDll.dll reference (which I took from this site "Locking Win32 apps -Antonio"). Thanks.
Private Declare Function Clock_Show_Hide Lib "WinLockDll.dll" (ByVal bShowHide As Boolean) As Integer Private Sub Command1_Click() Clock_Show_Hide (True) End Sub Private Sub Command2_Click() Clock_Show_Hide (False) End Sub
Ppl who drop their watch'es in d toilet r bound to have shitty time.The problem is clearly in the WinLockDll.dll. That is the code we need to see. Eric Dahlvang-Programmer
-
The problem is clearly in the WinLockDll.dll. That is the code we need to see. Eric Dahlvang-Programmer
Hey Eric. You can check out the dll after you download the software demo from this link. http://www.codeproject.com/win32/AntonioWinLock.asp[^] The source code is given here as well. Just see the procedures with respect to the system clock.Rest all, i am not using them. Thanks a bunch. Ppl who drop their watch'es in d toilet r bound to have shitty time. -- modified at 23:06 Tuesday 17th January, 2006
-
Hey Eric. You can check out the dll after you download the software demo from this link. http://www.codeproject.com/win32/AntonioWinLock.asp[^] The source code is given here as well. Just see the procedures with respect to the system clock.Rest all, i am not using them. Thanks a bunch. Ppl who drop their watch'es in d toilet r bound to have shitty time. -- modified at 23:06 Tuesday 17th January, 2006
What version of windows are you on? here is some vb code to do the same thing without the dll
Private Const TASKBAR = "Shell_TrayWnd" Private Const ID_TRAY = &H12F Private Const ID_CLOCK As Long = &H12F Private Const IDM_TABLEPROPERTIES = 2210 Private Const SW_SHOW = 5 Private Const SW_HIDE = 0 Private Declare Function UpdateWindow Lib "user32" (ByVal hWnd&) As Long Private Declare Function ShowWindow Lib "user32" (ByVal hWnd&, ByVal nCmdShow&) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetDlgItem Lib "user32" (ByVal hDlg&, ByVal nIDDlgItem&) As Long ' Private Sub Command1_Click() Show_Hide True End Sub Private Sub Command2_Click() Show_Hide False End Sub Private Sub Show_Hide(blnShow As Boolean) Dim hWnd As Long hWnd = GetDlgItem(FindWindow(TASKBAR, ""), ID_TRAY) hWnd = GetDlgItem(hWnd, ID_CLOCK) If hWnd = 0 Then Exit Sub ShowWindow hWnd, IIf(blnShow, SW_SHOW, SW_HIDE) UpdateWindow hWnd End Sub
-
What version of windows are you on? here is some vb code to do the same thing without the dll
Private Const TASKBAR = "Shell_TrayWnd" Private Const ID_TRAY = &H12F Private Const ID_CLOCK As Long = &H12F Private Const IDM_TABLEPROPERTIES = 2210 Private Const SW_SHOW = 5 Private Const SW_HIDE = 0 Private Declare Function UpdateWindow Lib "user32" (ByVal hWnd&) As Long Private Declare Function ShowWindow Lib "user32" (ByVal hWnd&, ByVal nCmdShow&) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetDlgItem Lib "user32" (ByVal hDlg&, ByVal nIDDlgItem&) As Long ' Private Sub Command1_Click() Show_Hide True End Sub Private Sub Command2_Click() Show_Hide False End Sub Private Sub Show_Hide(blnShow As Boolean) Dim hWnd As Long hWnd = GetDlgItem(FindWindow(TASKBAR, ""), ID_TRAY) hWnd = GetDlgItem(hWnd, ID_CLOCK) If hWnd = 0 Then Exit Sub ShowWindow hWnd, IIf(blnShow, SW_SHOW, SW_HIDE) UpdateWindow hWnd End Sub
-
Hey! This works great.But still having the same problem.Tray wont refresh. Windows xp sp2. Ppl who drop their watch'es in d toilet r bound to have shitty time.
This don't really make sense to me... But, try this:
Private Sub Show_Hide(blnShow As Boolean) Dim hWndTray As Long Dim hWndClock As Long hWndTray = GetDlgItem(FindWindow(TASKBAR, ""), ID_TRAY) hWndClock = GetDlgItem(hWndTray, ID_CLOCK) If hWndClock = 0 Then Exit Sub ShowWindow hWndClock, IIf(blnShow, SW_SHOW, SW_HIDE) UpdateWindow hWndClock UpdateWindow hWndTray End Sub
Eric Dahlvang-Programmer