[VB 2005] Making your app choose multiple options.
Posted: Fri Apr 07, 2006 3:41 pm
Alright i just wanted to say i am righting this tutorial because i am bored out of my skull
Okay so you want to make your app choose from multiple option, So we use tht If clause. The If clause is very useful way of doing things, Now for some examples.
Okay make a new form go into code view, type this into the form1_load
What that basicly did was if it comes back that today is friday then it will show a message box saying its friday if it comes back false it will say today is not friday.
Another example
You get the basic idea of that now what i am going to do is use if functions with a track bar to change the opacity of our form so drag a trackbar onto the form and go into the code view of the trackbar and put this code,
I hope this helped i may add more examples in of tricks you can do,
Royal
Okay so you want to make your app choose from multiple option, So we use tht If clause. The If clause is very useful way of doing things, Now for some examples.
Okay make a new form go into code view, type this into the form1_load
Code: Select all
If System.DayOfWeek.Friday Then
MsgBox("Its Friday")
Else
MsgBox("Today Is not friday")
End If
Another example
Code: Select all
If System.DayOfWeek.Friday Then
Me.ForeColor = Color.Auqa
Else
Me.ForeColor = Color.Blue
End If
Code: Select all
If TrackBar1.Value = TrackBar1.Maximum Then
Me.Opcacity = "1"
Else
Me. Opacity = "0." & TrackBar1.Value
EndIf
I hope this helped i may add more examples in of tricks you can do,
Royal