LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Minmize and Restore App

Hi,
I'm working with Labwindows/CVI 5.0 and Windows 2000.
I'd like to take control of the minimization and restauration of my App but I haven't found a way. After I call 'MinimizeAllWindows()' I have my app minimized on the taskbar, up to this everything is fine. Then I have tried unsuccesfully 2 things to control the restauration of it:
First I tried to know when the user clicks on the minimized app on the taskbar, to know when it is restored, but it doesn't seem to produce any event. I tried and wait for this events: EVENT_PANEL_SIZE, EVENT_PANEL_MOVE, EVENT_GOT_FOCUS, EVENT_LOST_FOCUS and EVENT_LEFT_CLICK but none of them seemed to be generated when the app was restored.
At last I tried restoring the app from outside, via CODE in a secondary thread, but I didn't find any function which I could use to restore it. I tried 'MakeApplicationActive()', with no result. Then I tried getting the App Window Handle ('GetCVIWindowHandle()') and sending it a message to restore (SW_RESTORE), but it also didn't work.
 
I would appreciate any commen or help on this topic.
Daniel

Mensaje editado por Comadreja

0 Kudos
Message 1 of 2
(3,126 Views)

Comadreja,

What you can try is to intercept the windows messages.

Look at the functions under User Interface Library >> Callback functions >> Windows Interrupt Support.

RegisterWinMsgCallback might do what you need,  it registers a callback function that LabWindows/CVI calls when your application receives a specific Windows message. RegisterWinMsgCallback returns the actual number of the Windows message.

I messed around with messages a couple of years ago to try to mimic key and mouse events for other applications, it's not easy and not very well documented.

Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
Message 2 of 2
(3,112 Views)