![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Not a user?
Join Date: Sep 2007
Posts: 272
Rep Power: 2
![]() |
First-time setup of application
I want to have my program check to see if certain information has been setup up, like server address, etc. I want the application to check and if this information hasn't been setup, then it will prompt the user to enter this information for first-time setup. I tried putting this in the first form load event, but it doesn't do what I want. Can somebody point me in the right direction?
|
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() ![]() |
Re: First-time setup of application
How about in the Form_Load, you check for values in the registry that indicate if the information has previously been provided?
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#3 |
|
Not a user?
Join Date: Sep 2007
Posts: 272
Rep Power: 2
![]() |
Re: First-time setup of application
I'm not that sophisticated yet Recursion; my information is held in .txt files. I tried putting my check in the main form load event, but it ignores it. I'd like to do my checks before the main form loads, but don't know how.
|
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Re: First-time setup of application
Show us some code, Jabo.
|
|
|
|
|
|
#5 |
|
Not a user?
Join Date: Sep 2007
Posts: 272
Rep Power: 2
![]() |
Re: First-time setup of application
The code that I tried is the first IF statement. I realize that the form hasn't loaded yet and can't be hid, but why wouldn't it show my other form? How can I do this better?
Also, frommail is a string that has been assigned a filepath. It was declared publicly. vb Syntax (Toggle Plain Text)
|
|
|
|
|
|
#6 |
|
Not a user?
Join Date: Sep 2007
Posts: 272
Rep Power: 2
![]() |
Re: First-time setup of application
Basically, this program needs an email server to send to, a From: email address and some other text files with specific information that the program needs to work properly. I don't want the program to crash on somebody on first use, which it has been doing until those files are created. After the files are there, program works fine. I guess what I'm looking for is the VB equivalent of preprocessor directives such as #ifdef and #ifndef.
I had all that information hard-coded into the program for work use, but they changed our domain on our emails, which meant I had to go back and change the information then recompile. I want my program more robust than that so I'm removing the key elements being hard-coded into the program. |
|
|
|
|
|
#7 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Re: First-time setup of application
Seems the problem is with this line:
vb Syntax (Toggle Plain Text)
vb Syntax (Toggle Plain Text)
|
|
|
|
|
|
#8 |
|
Not a user?
Join Date: Sep 2007
Posts: 272
Rep Power: 2
![]() |
Re: First-time setup of application
I'll give it a try, thanks for the suggest Ooble
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help in setup file | nascar2000 | Visual Basic .NET | 3 | Feb 11th, 2007 7:03 PM |
| way to make a function execute at time 'x' | badbasser98 | C++ | 10 | Apr 5th, 2006 7:14 AM |
| checking file existing time to time, in the same time program do other operation | myName | C++ | 3 | Mar 13th, 2006 8:39 PM |
| Why do the smallest apps take the most time to execute...? | Senger | Coder's Corner Lounge | 10 | Nov 5th, 2005 1:42 PM |
| Time | ChronicCode | Java | 2 | Aug 11th, 2005 2:22 PM |