Click here to Skip to main content
15,893,814 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Can we use label(i) instead of label 1 ? Pin
Johan Hakkesteegt27-Mar-10 22:56
Johan Hakkesteegt27-Mar-10 22:56 
GeneralRe: Can we use label(i) instead of label 1 ? Pin
Abhinav S27-Mar-10 23:06
Abhinav S27-Mar-10 23:06 
GeneralRe: Can we use label(i) instead of label 1 ? Pin
Eddy Vluggen28-Mar-10 0:30
professionalEddy Vluggen28-Mar-10 0:30 
GeneralRe: Can we use label(i) instead of label 1 ? Pin
Dave Kreskowiak28-Mar-10 6:09
mveDave Kreskowiak28-Mar-10 6:09 
GeneralRe: Can we use label(i) instead of label 1 ? Pin
Steven J Jowett29-Mar-10 3:26
Steven J Jowett29-Mar-10 3:26 
AnswerRe: Can we use label(i) instead of label 1 ? Pin
Johan Hakkesteegt27-Mar-10 23:00
Johan Hakkesteegt27-Mar-10 23:00 
AnswerRe: Can we use label(i) instead of label 1 ? Pin
Gregory Gadow29-Mar-10 3:50
Gregory Gadow29-Mar-10 3:50 
QuestionValue of a variable changing abnormally ! Pin
Razanust27-Mar-10 18:02
Razanust27-Mar-10 18:02 
I am developing a MCQ based quiz and all is going well except that when i select the radio button of the second question the value of the variable of the first question (EL) changes to 2 instead it should be 1.?
And that I have declared two separate variables for the two questions.

Here is the code:

Public Class q1

Dim EL As Integer
Dim CS As Integer

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label5.Text = EL

End Sub

Private Sub RadioButton3_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
EL = EL + 1
Label5.Text = EL
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Visible = False
RadioButton1.Visible = False
RadioButton2.Visible = False
RadioButton3.Visible = False
Button1.Visible = False
Label2.Visible = True
RadioButton4.Visible = True
RadioButton5.Visible = True
RadioButton6.Visible = True
Button2.Visible = True
Label5.Text = EL

End Sub


Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Label2.Visible = False
RadioButton4.Visible = False
RadioButton5.Visible = False
RadioButton6.Visible = False
Button2.Visible = False
Label3.Text = EL
Label4.Text = CS
Label3.Visible = True
Label4.Visible = True
Label5.Text = EL

End Sub


Private Sub RadioButton6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton6.CheckedChanged
CS = CS + 1
Label5.Text = EL
End Sub
End Class
AnswerRe: Value of a variable changing abnormally ! Pin
Dave Kreskowiak27-Mar-10 18:54
mveDave Kreskowiak27-Mar-10 18:54 
GeneralRe: Value of a variable changing abnormally ! Pin
Razanust27-Mar-10 19:12
Razanust27-Mar-10 19:12 
GeneralRe: Value of a variable changing abnormally ! Pin
Razanust27-Mar-10 19:34
Razanust27-Mar-10 19:34 
QuestionMultiple forms of same look. Pin
Razanust26-Mar-10 8:53
Razanust26-Mar-10 8:53 
AnswerRe: Multiple forms of same look. Pin
KChandos26-Mar-10 11:34
professionalKChandos26-Mar-10 11:34 
GeneralRe: Multiple forms of same look. Pin
Razanust27-Mar-10 10:23
Razanust27-Mar-10 10:23 
GeneralRe: Multiple forms of same look. Pin
Gregory Gadow29-Mar-10 3:58
Gregory Gadow29-Mar-10 3:58 
AnswerRe: Multiple forms of same look. Pin
programmervb.netc++26-Mar-10 17:02
programmervb.netc++26-Mar-10 17:02 
GeneralRe: Multiple forms of same look. Pin
Luc Pattyn26-Mar-10 17:38
sitebuilderLuc Pattyn26-Mar-10 17:38 
AnswerRe: Multiple forms of same look. Pin
Johan Hakkesteegt27-Mar-10 23:05
Johan Hakkesteegt27-Mar-10 23:05 
AnswerRe: Multiple forms of same look. Pin
Deep Unknown29-Mar-10 9:40
Deep Unknown29-Mar-10 9:40 
QuestionNavigating a web site using VB.net code. Pin
Daniel Riek26-Mar-10 5:23
Daniel Riek26-Mar-10 5:23 
AnswerRe: Navigating a web site using VB.net code. Pin
David Mujica26-Mar-10 6:09
David Mujica26-Mar-10 6:09 
QuestionAltering dll reference from in exe in VB.Net Deployment Pin
JayKhatri26-Mar-10 4:32
JayKhatri26-Mar-10 4:32 
AnswerRe: Altering dll reference from in exe in VB.Net Deployment Pin
Dave Kreskowiak26-Mar-10 13:59
mveDave Kreskowiak26-Mar-10 13:59 
QuestionDiscrepency in List tables subroutine Pin
Quecumber25626-Mar-10 4:17
Quecumber25626-Mar-10 4:17 
QuestionUnits of measure for comparisons Pin
Marcus J. Smith26-Mar-10 2:14
professionalMarcus J. Smith26-Mar-10 2:14 

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.