.NET General

Moderators: None (Apply to moderate this forum)
Number of threads: 797
Number of posts: 1359

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Help with checkbox please Posted by biggermens on 24 Aug 2009 at 6:32 PM
When click the check box with the device not conectted i get the error msg box and the check do not stay thare that part works good
When click the check box with the device conectted it runs the code

If CheckBox1.Checked Then
NumericUpDown1.Value = CType(CTemp.Text, Integer) + 1 NumericUpDown2.Value = CType(CTemp.Text, Integer) - 1

and it works

But when you click to take the check out of the check box it will not run this code

Else
NumericUpDown1.Value = 0.0
NumericUpDown2.Value = 0.0
phidgetIFK.outputs(0) = False
phidgetIFK.outputs(1) = False
End If


witch it was working before i put the bChecking
This is my code for the check box

Private Sub CheckBox1_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If bChecking Then Return
bChecking = True
If Status.Text = "Not Connected" Then
MsgBox("interface is not connected. Connect USB cable and try agine.", MsgBoxStyle.OkOnly + vbCritical, "Error")
CheckBox1.Checked = False
bChecking = False
If CheckBox1.Checked Then
NumericUpDown1.Value = CType(CTemp.Text, Integer) + 1 NumericUpDown2.Value = CType(CTemp.Text, Integer) - 1
Else
NumericUpDown1.Value = 0.0
NumericUpDown2.Value = 0.0
phidgetIFK.outputs(0) = False
phidgetIFK.outputs(1) = False
End If
End If
End Sub


I want to thanks everone for your help




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.