Click here to Skip to main content
15,914,642 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how can i do calculation from datasource in vb.net [modified] Pin
Member 44429167-Apr-08 14:21
Member 44429167-Apr-08 14:21 
GeneralMenuStrip.GetItemAt returns Nothing Pin
Steven J Jowett7-Apr-08 4:04
Steven J Jowett7-Apr-08 4:04 
GeneralRe: MenuStrip.GetItemAt returns Nothing Pin
Luc Pattyn7-Apr-08 4:51
sitebuilderLuc Pattyn7-Apr-08 4:51 
GeneralRe: MenuStrip.GetItemAt returns Nothing Pin
Aks 0057-Apr-08 5:08
Aks 0057-Apr-08 5:08 
QuestionPeripherals list Pin
signo19767-Apr-08 3:58
signo19767-Apr-08 3:58 
GeneralRe: Peripherals list Pin
Steven J Jowett7-Apr-08 5:09
Steven J Jowett7-Apr-08 5:09 
Questionhow can i change datarow.itemarray member type? Pin
AHeavey7-Apr-08 1:56
AHeavey7-Apr-08 1:56 
GeneralRe: how can i change datarow.itemarray member type? Pin
Dave Kreskowiak7-Apr-08 3:36
mveDave Kreskowiak7-Apr-08 3:36 
GeneralRe: how can i change datarow.itemarray member type? Pin
AHeavey7-Apr-08 3:43
AHeavey7-Apr-08 3:43 
GeneralRe: how can i change datarow.itemarray member type? Pin
AHeavey7-Apr-08 3:45
AHeavey7-Apr-08 3:45 
GeneralRe: how can i change datarow.itemarray member type? Pin
Dave Kreskowiak7-Apr-08 6:41
mveDave Kreskowiak7-Apr-08 6:41 
QuestionHow to open cash drawer through Samsung /Star tsp 700 printer in vb6 Pin
harisqued7-Apr-08 1:35
harisqued7-Apr-08 1:35 
AnswerRe: How to open cash drawer through Samsung /Star tsp 700 printer in vb6 Pin
Dave Kreskowiak7-Apr-08 3:32
mveDave Kreskowiak7-Apr-08 3:32 
GeneralSyntax help Pin
blackjack21506-Apr-08 22:23
blackjack21506-Apr-08 22:23 
GeneralRe: Syntax help Pin
Christian Graus6-Apr-08 22:28
protectorChristian Graus6-Apr-08 22:28 
GeneralRe: Syntax help Pin
Steven J Jowett6-Apr-08 22:43
Steven J Jowett6-Apr-08 22:43 
GeneralRe: Syntax help Pin
blackjack21506-Apr-08 22:49
blackjack21506-Apr-08 22:49 
GeneralRe: Syntax help Pin
Luc Pattyn7-Apr-08 0:52
sitebuilderLuc Pattyn7-Apr-08 0:52 
GeneralRe: Syntax help Pin
Chinners6-Apr-08 22:50
Chinners6-Apr-08 22:50 
Question(missing code} detect path service Pin
hassanasp6-Apr-08 11:57
hassanasp6-Apr-08 11:57 
GeneralRe: (missing code} detect path service Pin
Christian Graus6-Apr-08 15:44
protectorChristian Graus6-Apr-08 15:44 
GeneralRe: (missing code} detect path service Pin
Luc Pattyn7-Apr-08 0:56
sitebuilderLuc Pattyn7-Apr-08 0:56 
GeneralRe: (missing code} detect path service Pin
Christian Graus7-Apr-08 1:01
protectorChristian Graus7-Apr-08 1:01 
Questionhow to check correct answer in quiz Pin
bapu28896-Apr-08 9:01
bapu28896-Apr-08 9:01 
Hello
I am making small quiz with vb.net 2003 and all the questions and options are in access database there is one column for question and 4 columns for wrong answers and one for correct answer

this is the code

Try<br />
                Do<br />
                    odaTest.Fill(dsTest)<br />
                    R = CInt(Int(ArraySize * Rnd()))<br />
<br />
                    '[Go to the next entry]<br />
                    Me.BindingContext(dsTest, "MyTest").Position = R<br />
                Loop Until Asked(R) = False<br />
                PoAns = DataView1.Item(R).Item("CorrectAns")<br />
                WAnswer(0) = DataView1.Item(R).Item("Op1")<br />
                WAnswer(1) = DataView1.Item(R).Item("Op2")<br />
                WAnswer(2) = DataView1.Item(R).Item("Op3")<br />
                WAnswer(3) = DataView1.Item(R).Item("Op4")<br />
                'randomize 4 options<br />
                For X As Integer = 0 To 3<br />
                    MyTB(CInt(Rnd() * 3)).Text = WAnswer(X)<br />
<br />
                Next X<br />
<br />
                'now randomize one correct answer<br />
                MyTB(CInt(Rnd() * 3)).Text = PoAns<br />
                AskedQ += 1<br />
                Asked(R) = True<br />
            Catch eLoad As System.Exception<br />
                MessageBox.Show(eLoad.Message)<br />
            End Try


And i am checking correct answer like this

 Private Sub CheckAnswer()<br />
        If CheckedTB.Text = PoAns Then<br />
            MsgBox("Right", MsgBoxStyle.MsgBoxSetForeground)<br />
        End If<br />
<br />
    End Sub


So now problem is some time it's shows same wrong answer in two different textboxes but it's shows correct answer in different textbox every time so now i am bit confuse that am i going in to right direction any help Unsure | :~
Confused | :confused:
GeneralRe: how to check correct answer in quiz Pin
Christian Graus6-Apr-08 11:13
protectorChristian Graus6-Apr-08 11:13 

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.