General discussion

Locked

VB programming help -- Please advise!

By rsp05 ·
Hi, I am somewhat of a novice programmer, and will try my best to explain what I need to do....
I have a main VB application that runs on a schedule. I have created in this app an e-mail subroutine with a switch called EMAILON - when set to true=on, false=off. I will now create sort of an 'admin module/form', where I need a way for the user to open this form ad-hoc to change the default setting for the EMAIL. How would I go about designing this?? My main app runs all the time, but the EMAILON module, only sometimes...Would this have to be a SEPARATE exe? If so, how can I get this admin app to pass the True/False value to my main app, and save the setting, until changed again via this new app? Any VB assistance is most appreciated..I hope I made this clear....TIA

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VB programming help -- Please advise!

by SteveD In reply to VB programming help -- P ...

There are many ways to accomplish this. Here's a very simple solution that avoids the more sophisticated approaches of ActiveX components with persistent properties, etc.

Create a file someplace where the main application and the user's workstation can both see (read and write) the file. Store in the file a single line of text representing the value of the switch. (It could be '0' or '1', 'OFF' or 'ON', 'FALSE' or 'TRUE' - whatever convention you decide to adopt.)

Modify your main application. Add a timer with an appropriate interval (10 seconds, a minute, whatever). Make the timer active. In the code for the timer, simply read the line from the text file and set the value of the flag accordingly.

Create a new, separate application (EXE). Have a simple form. Let it read the value of the text file, show it to the user, and allow the user to change the value and save the new value.

(As a matter of fact, you really don't have to write a new application to do this. It's so simple that your users may as well just use Notepad.)

The next time that the timer fires in the main app, it will read the modified value from the text file and update its flag.

I hope this helps.

Steve Diamond

Collapse -

VB programming help -- Please advise!

by rsp05 In reply to VB programming help -- P ...

Poster rated this answer

Collapse -

VB programming help -- Please advise!

by rsp05 In reply to VB programming help -- P ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums