ich hab ein problem und zwar :
Ich hab 5 checkboxen jedee steht für eine verschiedenen Art von Form Style
So ich will das wen ich eine check das dann der style wird und wenn ich sie entchecke das dann der Style "Siziable" wird. so das problem ist das es iwie nicht richtig geht hier ist der code :
PHP Code:
If CheckBox1.Checked = False Then
FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
Else
If CheckBox2.Checked = False Then
FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
Else
If CheckBox3.Checked = False Then
FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
Else
If CheckBox4.Checked = False Then
FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
Else
If CheckBox5.Checked = False Then
FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
End If
End If
End If
End If
End If
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged, CheckBox5.CheckedChanged, CheckBox4.CheckedChanged, CheckBox3.CheckedChanged, CheckBox2.CheckedChanged
FormBorderStyle = Windows.Forms.FormBorderStyle.None
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged, CheckBox5.CheckedChanged, CheckBox4.CheckedChanged, CheckBox3.CheckedChanged, CheckBox2.CheckedChanged
FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle
End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged, CheckBox5.CheckedChanged, CheckBox4.CheckedChanged, CheckBox3.CheckedChanged, CheckBox2.CheckedChanged
FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D
End Sub
Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged, CheckBox5.CheckedChanged, CheckBox4.CheckedChanged, CheckBox3.CheckedChanged, CheckBox2.CheckedChanged
End Sub
Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged, CheckBox5.CheckedChanged, CheckBox4.CheckedChanged, CheckBox3.CheckedChanged, CheckBox2.CheckedChanged
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged ChangeFormBorderStyle() End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged ChangeFormBorderStyle() End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged ChangeFormBorderStyle() End Sub
Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged ChangeFormBorderStyle() End Sub
Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged ChangeFormBorderStyle() End Sub
Private Sub ChangeFormBorderStyle() If CheckBox1.Checked Then Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None ElseIf CheckBox2.Checked Then Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle ElseIf CheckBox3.Checked Then Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D ElseIf CheckBox4.Checked Then Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedToolWindow ElseIf CheckBox5.Checked Then Me.FormBorderStyle = Windows.Forms.FormBorderStyle.SizableToolWindow End If End Sub
Nein.
Hat sich erledigt.
Hab ein Paar If Sätze dazugemacht
PHP Code:
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
ChangeFormBorderStyle()
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
ChangeFormBorderStyle()
End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
ChangeFormBorderStyle()
End Sub
Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
ChangeFormBorderStyle()
End Sub
Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
ChangeFormBorderStyle()
End Sub
Private Sub ChangeFormBorderStyle()
If CheckBox1.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
ElseIf CheckBox2.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle
ElseIf CheckBox3.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D
ElseIf CheckBox4.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedToolWindow
ElseIf CheckBox5.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.SizableToolWindow
ElseIf CheckBox1.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox2.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox3.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox4.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox5.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
End If
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
ChangeFormBorderStyle()
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
ChangeFormBorderStyle()
End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
ChangeFormBorderStyle()
End Sub
Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
ChangeFormBorderStyle()
End Sub
Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
ChangeFormBorderStyle()
End Sub
Private Sub ChangeFormBorderStyle()
If CheckBox1.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
ElseIf CheckBox2.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle
ElseIf CheckBox3.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D
ElseIf CheckBox4.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedToolWindow
ElseIf CheckBox5.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.SizableToolWindow
ElseIf CheckBox1.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox2.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox3.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox4.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox5.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
End If
End Sub
kann man abkürzen
Quote:
Private Sub ChangeFormBorderStyle(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged, CheckBox2.CheckedChanged, CheckBox3.CheckedChanged, CheckBox4.CheckedChanged, CheckBox5.CheckedChanged
If CheckBox1.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
ElseIf CheckBox2.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle
ElseIf CheckBox3.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D
ElseIf CheckBox4.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedToolWindow
ElseIf CheckBox5.Checked Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.SizableToolWindow
ElseIf CheckBox1.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox2.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox3.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox4.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
ElseIf CheckBox5.Checked = False Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
End If
checkboxen abfragen 06/26/2010 - AutoIt - 5 Replies ich bräuchte auch mal eure hilfe, ich finde einfach keine vernünftige lösung um checkboxen abzufragen, ich poste sie einfach mal:
$Checkbox1 = GUICtrlCreateCheckbox("macro nutzen", 424, 96, 97, 17)
$Checkbox2 = GUICtrlCreateCheckbox("macro nutzen", 424, 152, 97, 17)
$Checkbox3 = GUICtrlCreateCheckbox("macro nutzen", 424, 200, 97, 17)
für jede aktive checkbox (true) sollen jewals 2 variablen aus einer .ini in eine .dll geschrieben werden, doch das ist nicht das problem, das einzigste ist...
[VB08] Alle Checkboxen anhaken 04/01/2010 - Coding Tutorials - 7 Replies Hallo,
hier ein TuT wie ihr alle Checkboxen anhaken könnt.
Credits to me :D
http://www.youtube.com/watch?v=dDfy3BLWdMY
Abonnieren, Bewerten, Kommentieren und ne PM mit dem Inhalt was ich als nächstes machen soll ;D
LG