0
votes

I am trying to check one condition when i m checking a particular checkbox.below is the code

Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
        If CheckBox4.Checked Then
            check_CL()
        End If

i put one debugger to check whether the control is going to this event or not but it's not going.please tell me what is the problem..

2
Please show that control from the .Designer.cs page..Vishal Suthar
it's a winform application...how to show the designer.cs..??Snehasish
You must not have added registered the event. Register the event from designer. Verify it from your Designer>Properties>Events sectionnawfal
Open the Form in Designer view and double click on the CheckBox4 control. This will cause VB to focus on the Code Behind file and will even create a Sub for the Event. Make sure you put your code thereAhmad
I wrote the code after double clicking only..@Ahmad SanSnehasish

2 Answers

0
votes

From your arguments it looks that you have performed appropriate steps. I would suggest that you should look for this piece of code:

   RemoveHandler CheckBox4.CheckedChanged, AddressOf CheckBox4_CheckedChanged

It is possible that you have unregistered handler somewhere in code either in .vb or .designer.vb

-1
votes

Have you tried using the full code to see if it works?

If CheckBox4.Checked = True Then
  check_CL()
End If