D
Demonicpagan
I have this form where I am trying to place items from checked boxes
into a text box. An image of what this form looks like is at
http://www.stelth2000inc.com/images/screen.png
Here is some code I have done for the first 2 check boxes, name and
world, they do what I want them to do, but for the rest of the check
boxes, the codes would be a bit minotonous. Is there a better way of
doing this, maybe checkedboxlist?
Private Sub sigBtn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles sigBtn.Click
Dim bbname As String = "
Dim bbworld As String = "
' Name check box checked
If chNameChk.Checked = True Then
signatureTxt.Text = ""
signatureTxt.Text = signatureTxt.Text & bbname
End If
' World check box checked
If worldChk.Checked = True Then
signatureTxt.Text = ""
signatureTxt.Text = signatureTxt.Text & bbworld
End If
' Name & world check boxes checked
If chNameChk.Checked = True And worldChk.Checked = True Then
signatureTxt.Text = ""
signatureTxt.Text = signatureTxt.Text & bbname & bbworld
End If
End Sub
Any help with this would be awesome
into a text box. An image of what this form looks like is at
http://www.stelth2000inc.com/images/screen.png
Here is some code I have done for the first 2 check boxes, name and
world, they do what I want them to do, but for the rest of the check
boxes, the codes would be a bit minotonous. Is there a better way of
doing this, maybe checkedboxlist?
Private Sub sigBtn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles sigBtn.Click
Dim bbname As String = "
" & vbCrLfName: " &
charNameTxt.Text & "
Dim bbworld As String = "
" & vbCrLfWorld: " &
worldCombo.SelectedItem & "
' Name check box checked
If chNameChk.Checked = True Then
signatureTxt.Text = ""
signatureTxt.Text = signatureTxt.Text & bbname
End If
' World check box checked
If worldChk.Checked = True Then
signatureTxt.Text = ""
signatureTxt.Text = signatureTxt.Text & bbworld
End If
' Name & world check boxes checked
If chNameChk.Checked = True And worldChk.Checked = True Then
signatureTxt.Text = ""
signatureTxt.Text = signatureTxt.Text & bbname & bbworld
End If
End Sub
Any help with this would be awesome