|
-
May 21st, 2007, 11:19 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Fixing Parameters
Hello To All,
In my program there are several combinations of parameters that the user can set. What I have managed to do is run a small program everytime the main program is run, there the user sets up his/her parameters, but this has to be done each time the program is run. What I would like to do is for the user, at the first run of the program, to set their own styles and have them permanantly fixed.
My current code, though it works is very long winded, is as follows.
Code:
Private Sub Command1_Click()
OpenSplash.Command1.Enabled = True
OpenSplash.Command2.Enabled = True
Parameters.Visible = False
If Combo1.ListIndex = 0 Then
LamairInput.Combo3.ListIndex = 0
BXInput.Combo1.ListIndex = 0
ElseIf Combo1.ListIndex = 1 Then
LamairInput.Combo3.ListIndex = 1
BXInput.Combo1.ListIndex = 1
ElseIf Combo1.ListIndex = 2 Then
LamairInput.Combo3.ListIndex = 2
BXInput.Combo1.ListIndex = 2
ElseIf Combo1.ListIndex = 3 Then
LamairInput.Combo3.ListIndex = 3
BXInput.Combo1.ListIndex = 3
ElseIf Combo1.ListIndex = 4 Then
LamairInput.Combo3.ListIndex = 4
BXInput.Combo1.ListIndex = 4
End If
If Combo2.ListIndex = 0 Then
LamairInput.Combo5.ListIndex = 0
BXInput.Combo2.ListIndex = 0
ElseIf Combo2.ListIndex = 1 Then
LamairInput.Combo5.ListIndex = 1
BXInput.Combo2.ListIndex = 1
ElseIf Combo2.ListIndex = 2 Then
LamairInput.Combo5.ListIndex = 2
BXInput.Combo2.ListIndex = 2
ElseIf Combo2.ListIndex = 3 Then
LamairInput.Combo5.ListIndex = 3
BXInput.Combo2.ListIndex = 3
End If
If Combo3.ListIndex = 0 Then
LamairInput.Combo7.ListIndex = 0
BXInput.Combo3.ListIndex = 0
ElseIf Combo3.ListIndex = 1 Then
LamairInput.Combo7.ListIndex = 1
BXInput.Combo3.ListIndex = 1
LamairInput.Combo6.Text = 68
BXInput.Combo14.Text = 68
End If
If Combo4.ListIndex = 0 Then
LamairInput.Combo9.ListIndex = 0
BXInput.Combo4.ListIndex = 0
ElseIf Combo4.ListIndex = 1 Then
LamairInput.Combo9.ListIndex = 1
BXInput.Combo4.ListIndex = 1
End If
LamairInput.Visible = False
BXInput.Visible = False
OpenSplash.Visible = True
End Sub
Private Sub Form_Load()
'Label 1
Label6.Caption = "Do not show again?"
'combo1
Combo1.Clear
Combo1.AddItem "m3/s"
Combo1.AddItem "m3/min"
Combo1.AddItem "m3/hr"
Combo1.AddItem "l/s"
Combo1.AddItem "cfm"
Combo1.ListIndex = 0
'combo2
Combo2.Clear
Combo2.AddItem "Pa"
Combo2.AddItem "mm wg"
Combo2.AddItem "in wg"
Combo2.AddItem "mbar"
Combo2.ListIndex = 0
'combo3
Combo3.Clear
Combo3.AddItem "°C"
Combo3.AddItem "°F"
Combo3.ListIndex = 0
'combo4
Combo4.Clear
Combo4.AddItem "m"
Combo4.AddItem "ft"
Combo4.ListIndex = 0
Parameters.Visible = True
Combo1.SetFocus
End Sub
Can anyone advise me onhow to do this and offer up some coding, as I'm no master programmer by any stretch of the imagination.
Thank You
Tarablue
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|