Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FindWindow(), ShowWindow(), SetForegroundWindow() cant be effect in win7

 
endswel shui
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now, the state is I use a app1 to invoke app2, the precondition is app2 is hide to the system tray

I can use the


to make the app2 active in the desktop.
This operation can effect in win xp,
but cant be effect in win7.

What is the reason for the win7?
 
Stephan van Hulst
Bartender
Pie
Posts: 5813
61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hard to say without seeing your code. The methods you refer to sound like they're either from the Windows API , or your own methods.
 
Rob Spoor
Sheriff
Pie
Posts: 20532
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They certainly look like Windows API functions. If they're not working, check the reason why. GetLastError() will always return the last error that occurred, which you can then either format (search for how to) or look up using the direct value.
 
endswel shui
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan van Hulst wrote:Hard to say without seeing your code. The methods you refer to sound like they're either from the Windows API , or your own methods.




hi, Stephan, above is the code

scene 1
I can activate app2 which hide in the system tray in winxp 32 bit

but cant activate the app2 hide in the system tray in windows 7 professinal 32/64bit
btw, for the windows7 professional the default setting, cant create the file in the folder of 'c:\Program Files' , and need to type sth to allow it to access


scene 2
also in the windows 7 professional 32/64 bit
and a little confused, when I using the app1 in the eclipse which open normal cant ativate
when I using the app1 in the eclipse which open as administrator can ativate

or is there anything need I to change for the windows7 professional 32/64 bit security?
and how?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic