Hi,
I have an application in CVI 7.1 that uses the following to obtain the panel handle and name: -
/* Get current Panel Handle */
handle = GetActivePanel();
/* Get current Panel Name */
GetPanelAttribute(handle,ATTR_CONSTANT_NAME,panelname);
The problem that I am having is that every now and then a pop up from another program (Email etc.) pops up and releases the focus from the main panel. This causes my application to crash stating that the panel in focus does not have the correct information.
Other than making sure that no other program is running when my application is running (something I cannot guarentee) or changing the above code to hard code the panelname (this routine is in a generic dll) is there a way of forcing a panel back into focus.
Within my application I have a Timer function that I could use to perform this function or I could create a seperate thread that is always checking the focus of the panel.
Is this possible or am I looking from something that doesn't exist?
Any suggestions welcome.