LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Activate application Window on WinXP

Hello Guys,

I'm trying to force that my application periodically set's it self to active. This is a small test for including in my main code.

I'm using LVWutils32.lib.

Everything work well in my computer. But when I try this on another computer (with Labview installed or not), it doesn't work.

I need to create a way of activating the application window (title bar in blue), so that when a person press the keyboard, it starts writting on the application.

When I create the application I'm adding dinamically the "user32.dll" and "lwutil32.dll".


Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 1 of 10
(3,456 Views)

Where do you load the lwutil32.dll dynamically from ?

- Partha ( CLD until Oct 2027 🙂 )
Message 2 of 10
(3,446 Views)
Hello,

I've mentioned the "lwutil32.dll" but you can forget it. Because on the actual example, that's not used. But I've made many other approaches where I use it. And that's why i talk about it.

do you know some way of doing what I've said?
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 3 of 10
(3,440 Views)


@jorge Amaral wrote:
Hello,

I've mentioned the "lwutil32.dll" but you can forget it.


I did not forget what you ve mentioned; I just asked that because you need to keep the lwutil32.dll in a prespecified path unlike the user32.dll, which ll get loaded automatically from \Windows\system32\user32.dll path...

I thought this could be a minor looked-over point when setting the build specificatrions.

- Partha ( CLD until Oct 2027 🙂 )
Message 4 of 10
(3,435 Views)
Thanks for your quick answers.

But let me insist in one point... If I'm not using any vi that calls the "LVWutils32.dll" why do you give attention to this point? It's really important?

I've some doubt answering your question, but I can tell you both paths:
 - on my PC ( where's it's built): user.lib folder
 - target pc: in the data folder created by the application builder near the application.

And the Vi that I'm using to activate the window... It's the correct one?
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 5 of 10
(3,433 Views)

Hmmm...

The VI you ve mentioned in the attachment [ even the entire hierarchy ] does not use the LVWutils32.dll at all... but you ve mentioned that you re loading it dynamically. Thats why I got confused about its location.

The VI you ve used uses the user32.dll alone, and it seems quite correct & working in my PC for bringing the window of interest to the front (active)...

Maybe, we both re looking over some minor finer detail... Smiley Surprised

- Partha ( CLD until Oct 2027 🙂 )
Message 6 of 10
(3,427 Views)
Are you using LabVIEW development environment on your PC, and executables on
the other PC's?

The VI you are using might search VI windows based on the class name.
LabVIEW uses LVDChild classes for all it's windows, while a LabVIEW
executable uses the executable's name as class name.

Regards,

Wiebe.


0 Kudos
Message 7 of 10
(3,410 Views)
well,

Are you using LabVIEW development environment on your PC, and executables on
the other PC's?
Yes. I'm developing a project for a client.

The VI you are using might search VI windows based on the class name.
LabVIEW uses LVDChild classes for all it's windows, while a LabVIEW
executable uses the executable's name as class name.
The vi that searches for the window name it's not returning any error. So I think that's working well. But if you think that this might be the problem. What can I do?


Let me repeat something that I've already said... the exacutable works well on my pc but not in another pc that also as the labview installed.
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 8 of 10
(3,407 Views)
Could it be that you've included user32.dll in the installer?

So on your PC, you didn't run the installer, and it's using the
system32\user32.dll. But on the other PC's, you did use the installer, and
the executables are using their own copy of user32.dll (that isn't working)?

Regards,

Wiebe.


Message 9 of 10
(3,395 Views)

- you may check you firewall settings.

-move window to top .vi, the default activate value is True. when you want to activate some windows to top, try activate from False - True. not always True.

- some applications windwos already been set up as Top application,  they may block your application to top.  (I met this before)

 

Message 10 of 10
(3,383 Views)