Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change the property of an external window

Status
Not open for further replies.

KKZ

Programmer
Jun 27, 2001
25
0
0
US
I have an application (writte in VB.Net) that runs without the ControlBox (just like a splash screen that you cannot move). I want to write a .Net app to change the property of the running application to add a ControlBox so that I move it to my desired location whenever I need it.

Is it possible? If yes, please explain and give example if possible. I will highly appreciate any help. Thanks
 
Thanks for your advice. I did search google, but what I found requires coding in the form that is borderless. My problem is that I am not suppose to make any change in the app that I am trying to move. It is a seperate app (suppose I have no code for that app). I need to get the handle of the required window and see if I can add a ControlBox or any other way that I am able to move it on demand.
 
You are unlikely to succeed in doing this. It's a security thing -- one process is (generally) not allowed to alter another process' data.

To use Raymond Chen's favorite expression: Imagine if this were true -- you could write an app which could arbitrarily modify another running app. The technique of adding the WindowClass flags to make the system menu appear could easily also take it away. Imagine if someone else's app did that to yours. You'd be upset, right?

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
If you wrote both applications you could send tcp or udp messages back and forth. You could imbed commands into the tcp /udp messages that either program could interpret and respond accordingly.

You could also do something less dynamic as to use a config file / registry entry and poll the file/registry for changes. Again, passing instructions to the application.

A database backend could also accomplish this. However, these last few ideas all require frequent polling. If you have a tcp/udp listener, the response is immediate.
 
I would like to thank every one for responding. I tend to agree with Chip that this is meant to be that way.

In the past, I had control over the app and used to work through ini entry or the existance of certain file to flag the system that the app is in development mode and let the app behave differently. However, the current situation is a little different.

I just wanted to see if there is any way of accomplishing this by talking dirrectly with the other app. Thanks again guys. Keep up the good work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top