Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

visual basic code problem

Hello!
I want to use visual basic to build a htm which can control labview throght datasocket, i set the switch
as " Swithc until release " in visual basic, the code is
Private Sub CWButton1_Click()
CWDataSocket1.Data = CWButton1.Value

End Sub

but the led of labview can't light on.
is the code problem?

thanks!
0 Kudos
Message 1 of 2
(2,911 Views)
The problem is most likely because you have the code in the Click() event handler. The click event in VB is a left mouse down AND mouse up over the controls. If you are wanting it to send out the value when you press and hold the button down, change the event handler to the ValueChanged event.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 2
(2,911 Views)