I'm not sure if it is a good way, but I would rewrite it like this:
SECOND OPTIONCode:Dim stValue As String value = IniString("Options", "Intro?", "tt.ini") If stValue = "yes" Then Intro.Show Unload Me Else Main.Show Unload Me End If
If you want the intro to load when your program starts then you could use this (it may be hard to explain though) :
Create two forms: frmIntro and frmMain. Add a module to your project and in that module create new sub called Sub Main. Then go to Project~~~~>Project1 Properties and change Start Up Object to Sub Main. Then add this code to your sub Main (as well as your code to read Ini file):
After that add this code at the end of your Intro:Code:Option Explicit Sub Main() Dim stValue As String value = IniString("Options", "Intro?", "tt.ini") If stValue = "Yes" Then 'user wants the intro frmIntro.Show Else frmMain.Show End If End Sub
You might have to change something, but this is the way I would approach this problemCode:frmMain.Show Unload Me
HTH
[Edited by QWERTY on 04-04-2000 at 11:05 PM]




) :
Reply With Quote