4 rs10000009 0 71048953 G A
4 rs10000010 0 21618674 C T
4 rs10000011 0 138223055 T C
2 rs1000001 0 50711642 T G
4 rs10000005 0 85161558 G A
12 rs1000000 0 126890980 A G
4 rs10000003 0 57561647 A G
4 rs10000006 0 108826383 C T
4 rs10000007 0 114553253 C A
4 rs10000008 0 172776204 T C
我认为,问题是文本框中的值开始为空,没有赋值给它。因此,当我给它一个值之前我右键单击它时,它无法计算它是否小于0,它只是给我-1,我想。我很困惑,抱歉如果这个问题令人困惑。我错过了一些明显的东西吗?
答案 0 :(得分:0)
您可能需要检查文本是否为空以减少计数。
Private Sub Label5_MouseClick(sender As Object, e As MouseEventArgs) Handles Label5.MouseClick
If e.Button = MouseButtons.Left Then
SawWhetOwl.Text = (Val(SawWhetOwl.Text) + 1).ToString()
Label5.Text = SawWhetOwl.Text
ElseIf e.Button = MouseButtons.Right Then
If String.IsNullOrEmpty(SawWhetOwl.Text) OrElse CInt(SawWhetOwl.Text) <= 0 Then
Exit Sub
Else
SawWhetOwl.Text = (Val(SawWhetOwl.Text) - 1).ToString()
Label5.Text = SawWhetOwl.Text
End If
End If
End Sub