LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Something about tray application...

I want my program to show system tray on the right-bottom on the monitor,and minimum the windows such that the taskbutton not in the bottom.
I just writed.But I can't minimum the windows completely!
I can let taskbutton be disappear,but there is still titlebar on the left-bottom side.
So what can I do?
Thanks so much!
0 Kudos
Message 1 of 4
(3,542 Views)
Hi, Yalato.

I'm a little confused about what you're trying to do. Could you please send me a screenshot of how the window is not minimizing completely?

Thanks! Have a nice evening.
Sarah K.
Search PME
National Instruments
0 Kudos
Message 2 of 4
(3,521 Views)
What I said is like the picture.
Although I already solved the problem,by using Shell_NotifyIcon() function in microsoft visual c++.
I have not tried this in CVI.
So now I just want to know if there is still another solution about this problem.
Thanks a lot.

由 Yalato 在 04-22-2006 09:04 AM 上編輯的訊息

0 Kudos
Message 3 of 4
(3,506 Views)
I expect you can do this by fiddling with the window attributes in the Windows SDK. But a pure CVI solution might be:

  • Create a timer control on the panel with a suitably small interval (say 0.05 seconds)
  • In the timer callback, hide the panel if it is minimized (and not yet hidden), for example:


int CVICALLBACK MainTimer (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
int panelZoomState;
int panelVisible;

switch (event)
{
case EVENT_TIMER_TICK:
GetPanelAttribute(panel,ATTR_WINDOW_ZOOM,&panelZoomState);
GetPanelAttribute(panel,ATTR_VISIBLE,&panelVisible);
if (panelVisible && (panelZoomState==VAL_MINIMIZE))
HidePanel(panel);
break;
}
return 0;
}
--
Martin
Certified CVI Developer
0 Kudos
Message 4 of 4
(3,472 Views)