LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems migrating an application from NT to XP

Hi,Im LAbWindows CVI developer and I have a serious problem, i made a software system composed
of various software components, some of then interact between themselves using windows messaging.
Actually the system runs on a windows NT 4 workstations, but we are migrating to Windows XP and
I encountered a problem:

Two of the software components use a especific user defined windows message code to
indicate the each other to activate his actual loaded window, this action makes the
function to switch between one application to the other without use of ALT-TAB, in the
UIRS of both apps is a command button that makes the switch effect.
I use the CVI function
library "MakeApplicationActive" to make the switch functio
n, that is ,
the application that receives the message uses "MakeApplicationActive" to bring
the control to his window, on windows NT workstations theres no problem but
when the system runs on windows XP this functionallity doesnt work. if i use the command
to switch to another applicationm the app that receives the message calls
"MakeApplicationActive" i saw that the windows received the message because his taskbar
button starts to blink.
What's the problem, what i can do? there's a XP configuration i have to make?
Please help, because if there's no solution, probably i have to redesing entire
system.
0 Kudos
Message 1 of 2
(2,974 Views)
Hi,

We have no reports of the MakeApplicationActive(...)function failing in XP; I did some testing here and was able to use the function to activate a panel based on a timer.

In the process I noticed that if I minimize the panel and then use MakeApplicationActive(...), the taskbar button would start to blink, but the application was not visible. Adding a call to SetPanelAttribute (panelHandle, ATTR_WINDOW_ZOOM, VAL_NO_ZOOM); fixed the problem.

Also make sure that you read and report the return value of the function to make sure that the call was successful. I'm not sure about this but I think it may be better to make the call in the main thread of you application.

If nothing seems to work, you can give a try to the Windows SDK function SetWindowPos(...
) that function allows you to set a flag to put the window in the top most possition.

I hope this helps, let me know if you have further questions on this.

Regards,
Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(2,974 Views)