| | |
End program on startup?
Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Aug 2006
Posts: 999
Reputation:
Solved Threads: 1
I'm currently trying to create a program in delphi to call up a webpage; the page is written in php and records some data about its contents for record-keeping in my system. I'd like to be able to write the program so that when it opens it does the following:
1. Opens the webpage. I can do this, I found the code to open an application via ShellApi some time ago and it works just as well for a web url as for a file path.
2. Closes the webpage. I only really need to run the page once to do the job, and if the program can close the page afterwards it should. Again, I found some code on how to do this, so that's not really a problem, although I may need to build in a delay; as currently written, it doesn't like to close the page. This isn't critical though, it's merely my own personal aesthetics.
3. Closes the program itself. I know you can close a program with a single form (all this one has) by using the form.close procedure, except that this doesn't work when the statement is included in the form.formcreate procedure, and that's where I'm hoping to call it from.
Is it even possible to code my program so it fits this set of instructions, or should I start looking for a workaround?
Thanks in advance,
-EnderX
1. Opens the webpage. I can do this, I found the code to open an application via ShellApi some time ago and it works just as well for a web url as for a file path.
2. Closes the webpage. I only really need to run the page once to do the job, and if the program can close the page afterwards it should. Again, I found some code on how to do this, so that's not really a problem, although I may need to build in a delay; as currently written, it doesn't like to close the page. This isn't critical though, it's merely my own personal aesthetics.
3. Closes the program itself. I know you can close a program with a single form (all this one has) by using the form.close procedure, except that this doesn't work when the statement is included in the form.formcreate procedure, and that's where I'm hoping to call it from.
Is it even possible to code my program so it fits this set of instructions, or should I start looking for a workaround?
Thanks in advance,
-EnderX
•
•
•
•
I'm currently trying to create a program in delphi to call up a webpage; the page is written in php and records some data about its contents for record-keeping in my system. I'd like to be able to write the program so that when it opens it does the following:
1. Opens the webpage. I can do this, I found the code to open an application via ShellApi some time ago and it works just as well for a web url as for a file path.
2. Closes the webpage. I only really need to run the page once to do the job, and if the program can close the page afterwards it should. Again, I found some code on how to do this, so that's not really a problem, although I may need to build in a delay; as currently written, it doesn't like to close the page. This isn't critical though, it's merely my own personal aesthetics.
3. Closes the program itself. I know you can close a program with a single form (all this one has) by using the form.close procedure, except that this doesn't work when the statement is included in the form.formcreate procedure, and that's where I'm hoping to call it from.
Is it even possible to code my program so it fits this set of instructions, or should I start looking for a workaround?
Thanks in advance,
-EnderX
Pascal and Delphi Syntax (Toggle Plain Text)
application.terminate;
Note to self... pocket cup
![]() |
Similar Threads
- Autostart IE or any program (Windows NT / 2000 / XP)
- End Program - sw (Viruses, Spyware and other Nasties)
- End Program - Dialog (Web Browsers)
- Startup (Windows NT / 2000 / XP)
- Program is shutting down right after program is executed (C++)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: Escaping symbols in strings?
- Next Thread: Can't understand why this won't compile
| Thread Tools | Search this Thread |





