home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 1759
Discussions: 188,401, Posts: 2,243,603, Members: 232,630
Old December 22nd, 2004, 06:15 AM   Digg it!   #1 (permalink)
Member
 
Join Date: Aug 2003
Location: Germany
Posts: 98
Send a message via ICQ to c6ke
Wait till Application has opened

Hey there, me again

I have the following:
PHP Code:
ShellExecute(form1.Handle'open'PChar('c:\windows\notepad.exe'), nilnilSW_SHOW);
sleep(1000);
ShellExecute(form1.Handle'open'PChar('c:\windows\calc.exe'), nilnilSW_SHOW); 
Ok at the moment my app waits 1 Sec. before it continues opening calculator. As you might imagine not every application is opened in 1 sec.

I'd like to have it that it opens notepad - waits till notepad has opened and then continues opening calculator. How do I do that?

I googled something about handles and stuff but that didn't help me much...
__________________
Do you also hear those voices?

c6ke is offline   Reply With Quote
Old December 22nd, 2004, 06:25 AM     #2 (permalink)
Retired mostly.
 
Join Date: Oct 2001
Location: Finland
Posts: 5,143
I'd actually like to know that also.

The vb program I made was supposed to launch an install of something and then when it has finished disconnect a network drive.
But as I didn't know how to make it wait till the install finishes, I had to make a batch file with pause in the middle

muno is offline   Reply With Quote
Old December 22nd, 2004, 06:33 AM     #3 (permalink)
Member
 
Join Date: Aug 2003
Location: Germany
Posts: 98
Send a message via ICQ to c6ke
yeah but pause (sleep in my case) is not an option as I'm progging a startup manager. you put it into the autostart menu -

It takes all the stuff from the startup-points in the registry and startup folders - disables it all there and starts it itself one after another - I hope this decreases loading time.... - just a try...

I need the code for my one-after another- as the prog needs to know when the external app has started for that it can start the next one you see - it's kind of easy...

c6ke is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone Play Diablo 2??? Martoch General Gaming Discussion 1782 December 2nd, 2006 05:59 PM
I need a new video card (ATI OR NVIDIA) timtheenchantor Graphics Cards and Displays 18 October 7th, 2003 02:38 AM
Amd 2500+ barton Kronik Reloader Processors, Memory, and Overclocking 25 July 31st, 2003 09:43 PM
Linux v2.6.0-test1 released SpookyEddy Linux and Unix 18 July 22nd, 2003 08:21 AM
Took my first 2 finals. Hawkeye IMO Community 5 January 17th, 2002 09:42 PM

Most Active Discussions
Is It Just Me? (2906)
Unarmed man on his stomach shot by .. (6)
Misery Loves Company... (2144)
New Build ( Finally ) (7)
CPU wont boot (7)
Building a gaming computer advice (5)
I think I just killed my computer w.. (24)
Folderchat Weekday thread (444)
Upgrading RAM (6)
Recent Discussions
New Build ( Finally ) (7)
Common Spyware Solutions (97)
How do you move a hard-drive to.. (4)
Laptop proccesor to desktop mob.. (1)
What is the best external enclo.. (0)
Partition Magic 7.0 (Unallocate.. (17)
For cheap price and good qualit.. (1)
Left 4 Dead Small Freezes (3)
RCA 52Inch HDTV wont turn on (4)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 03:49 AM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28