Click here to Skip to main content
16,004,901 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB 2010 Error: Property access must assign to the property or use its values. Pin
Ralf Meier20-Apr-16 1:10
mveRalf Meier20-Apr-16 1:10 
GeneralRe: VB 2010 Error: Property access must assign to the property or use its values. Pin
Gus11328-Apr-16 22:32
Gus11328-Apr-16 22:32 
QuestionVB6: Resource Editor shows no resources [SOLVED] Pin
Alan Balkany14-Apr-16 4:14
Alan Balkany14-Apr-16 4:14 
AnswerRe: VB6: Resource Editor shows no resources [SOLVED] Pin
Alan Balkany14-Apr-16 7:00
Alan Balkany14-Apr-16 7:00 
QuestionFont Designer in VB.NET 2008 Express Pin
Soubarna Das13-Apr-16 5:29
Soubarna Das13-Apr-16 5:29 
AnswerRe: Font Designer in VB.NET 2008 Express Pin
Richard Andrew x6413-Apr-16 5:32
professionalRichard Andrew x6413-Apr-16 5:32 
QuestionChanging Page Culture Pin
Hakmeh Mohannad12-Apr-16 3:13
Hakmeh Mohannad12-Apr-16 3:13 
QuestionPass Checked CheckBox count from one form to another Pin
Soubarna Das7-Apr-16 23:24
Soubarna Das7-Apr-16 23:24 
I have two form, Form2 contains dynamically created checkboxes and Form1 has a textbox(TextBoxSelected). I add event handler to the checkboxes that count the total number of checked chekboxes. Now I want to pass the count value to the TextBoxSelected.
CheckBox Code in Form2
VB.NET
Public Sub CreateCheckBox(ByVal _filename As String, ByVal _displayname As String)
        Dim checkBox = New CheckBox()
'------------ '  
'--------------'
        checkBox.Size = New Size(117, 109)
        checkBox.Text = (_displayname)
        checkBox.Image = resized
        checkBox.BackColor = Color.Gray
        checkBox.ForeColor = Color.White
        checkBox.TextAlign = ContentAlignment.BottomCenter
        checkBox.Location = New System.Drawing.Point(XcLocation, YcLocation)
        AddHandler checkBox.CheckedChanged, AddressOf myhandler2
End Sub

Private Sub myhandler2(ByVal sender As System.Object, ByVal e As System.EventArgs)
        'Dim cb As CheckBox
        'cb = CType(sender, CheckBox)
        Selected()
        'MsgBox(SelectedCount)      
End Sub

Private Sub Selected()
        Dim count As Integer
        count = 0
        For Each ctrl As Control In Me.Controls
            If TypeOf ctrl Is CheckBox Then
                If DirectCast(ctrl, CheckBox).Checked = True Then
                    count += 1 'this will count the checked checkboxes

                End If
            End If
        Next     
End Sub

AnswerRe: Pass Checked CheckBox count from one form to another Pin
CHill608-Apr-16 1:53
mveCHill608-Apr-16 1:53 
GeneralRe: Pass Checked CheckBox count from one form to another Pin
Soubarna Das10-Apr-16 11:36
Soubarna Das10-Apr-16 11:36 
QuestionRe: Pass Checked CheckBox count from one form to another Pin
Ralf Meier9-Apr-16 10:17
mveRalf Meier9-Apr-16 10:17 
AnswerRe: Pass Checked CheckBox count from one form to another Pin
Soubarna Das10-Apr-16 11:36
Soubarna Das10-Apr-16 11:36 
QuestionRe: Pass Checked CheckBox count from one form to another Pin
Ralf Meier11-Apr-16 0:50
mveRalf Meier11-Apr-16 0:50 
AnswerRe: Pass Checked CheckBox count from one form to another Pin
Soubarna Das13-Apr-16 5:25
Soubarna Das13-Apr-16 5:25 
QuestionWhat Does FilterWorkbook Macro Actually Do? Pin
Member 124440697-Apr-16 16:19
Member 124440697-Apr-16 16:19 
AnswerRe: What Does FilterWorkbook Macro Actually Do? Pin
Richard MacCutchan7-Apr-16 21:11
mveRichard MacCutchan7-Apr-16 21:11 
GeneralRe: What Does FilterWorkbook Macro Actually Do? Pin
Member 124440688-Apr-16 8:18
Member 124440688-Apr-16 8:18 
GeneralRe: What Does FilterWorkbook Macro Actually Do? Pin
Richard MacCutchan8-Apr-16 22:09
mveRichard MacCutchan8-Apr-16 22:09 
GeneralRe: What Does FilterWorkbook Macro Actually Do? Pin
CHill6010-Apr-16 8:25
mveCHill6010-Apr-16 8:25 
QuestionExtract text in a file txt and simultaneously replace it with dots. Pin
Miauz7-Apr-16 9:55
Miauz7-Apr-16 9:55 
AnswerRe: Extract text in a file txt and simultaneously replace it with dots. Pin
Sascha Lefèvre7-Apr-16 10:22
professionalSascha Lefèvre7-Apr-16 10:22 
GeneralRe: Extract text in a file txt and simultaneously replace it with dots. Pin
Mycroft Holmes7-Apr-16 14:18
professionalMycroft Holmes7-Apr-16 14:18 
GeneralRe: Extract text in a file txt and simultaneously replace it with dots. Pin
Sascha Lefèvre7-Apr-16 22:36
professionalSascha Lefèvre7-Apr-16 22:36 
GeneralRe: Extract text in a file txt and simultaneously replace it with dots. Pin
Miauz8-Apr-16 1:58
Miauz8-Apr-16 1:58 
GeneralRe: Extract text in a file txt and simultaneously replace it with dots. Pin
Sascha Lefèvre8-Apr-16 2:51
professionalSascha Lefèvre8-Apr-16 2:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.