For example i want o run icontacts ,so to have it in run minimized . I could create a script that would run icontacts.exe, and then, when this proses exist ,to minimize it. But with this i would see the window of icontacts in screen , and then it would minimize. My problem is that i dont want to see the window of icontacts at all.. Is there any way to do this with basic4ppc?
Thanks ,
Thanks. With this i can minimize an active application .I assume that i cant do what i was asking . Run a program (not written with basic4ppc ) without see the program window at all.
Thanks. With this i can minimize an active application .I assume that i cant do what i was asking . Run a program (not written with basic4ppc ) without see the program window at all.
You could try to hide the window from its hwnd.
There are ShowWindow and FindWindow methods in dzhw library.
So run iContact use FindWindow and ShowWindow to hide it, then ShowWindow again when you want it visible.
Refreshing thread again, but this is a sort of thing I also need.
I have an app which is actually an Action Screen (bunch of links to programs/functions put in a fullscreen form). I wanted it to be run "on request" but the graphics cause the application to execute within say 3-4 seconds on my Rhodium, which is a bit too long.
So i changed my mind and want to code it in such way that the app would start together with system but in "quiet mode" (for instance it could be run with a command line argument). For this reason I could use Erel's advice to use Hardware.ShowTodayScreen but I have 3 questions:
1. How to code it such way that if the user will execute "MyApp.exe /quiet" it will be only put in memory with hidden window, and executed as "MyApp.exe" would then be used to put the main form "on top"?
2. When the user will use my app to say turn the WiFi on, the App itself should minimize (or hide), but considering that the App could be executed not from the TodayScreen but from any other app (i.e. with mapped hardware key), I want my App not to return the user to TodayScreen but to leave him in whatever window he was at the moment the App was showed.
Is this possible in not very complicated way?
3. Is this possible to unload all the images from the memory when hiding/minimizing the App? I want it to take as little memory as possible when running in the background.
I can share the current version with you if you think it might help...
Instead of using Hardware library (which takes another amount of memory) I trid to use
frmMain.Visible = false
It doesn't work on the Desktop, but it works on the Device. But this caused another problem:
I don't know how can I make the program running again. When I execute the exe file the program doesn't enter into the App_Start anymore so I can't get in any place that I can make the frmMain visible again.
On the other hand when I minimize program by using Hardware.ShowTodayScreen I also can't get into any piece of code right after I bring the program window back "on top". For instance in order to change the frmMain.Image.
I just don't know in which Sub I should put it. It doesn't work unless I do something in the program (i.e. tap a button).
So my current question is:
Is there an event that is triggered when I execute my program's EXE file when program is running already?