Solved

Need help for a beginner!

Posted on 2003-11-20
9
351 Views
Last Modified: 2010-05-01
Hello to everyone. just need a help to start with my
learning about using VB6. I'm fun of Game shows and
as a beginner with VB6 how would i start creating a program
like Game Show e.g. "Who wants to be a millionaire."
(Questions w/ choices of answers). Would somebody help me?
can u pls send me a running code or the application iteself ofcourse with the code in my email add: ecpcmike@yahoo.com so
that i could begin my adventure learning VB6.
0
Comment
Question by:sarangani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 11

Expert Comment

by:dbrckovi
ID: 9787427
We are not allowed to use email in EE!
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 9787475
Maybe this example can help:

http://www.freevbcode.com/ShowCode.Asp?ID=3443
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9787489
If you are planning to do this for a living, start with .Net technology instead of VB6 (I AM NOT a dot net fan!!)
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 1

Expert Comment

by:jayh99
ID: 9787952
http://www.geocities.com/jay_harris_99/Regis.zip

I made a 2 question form of who wants to be a millionaire.  You can get the source code, and add the additional questions from this start.
0
 
LVL 11

Expert Comment

by:dbrckovi
ID: 9787992
Paste this to notepad, save it somwhere as Form1.frm.
Doubleclick it in explorer.
When VB loads it run it

---------------------------------------------------------
VERSION 5.00
Begin VB.Form Form1
   Caption         =   "Form1"
   ClientHeight    =   6285
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4890
   LinkTopic       =   "Form1"
   ScaleHeight     =   6285
   ScaleWidth      =   4890
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdQuit
      Caption         =   "I Quit"
      Height          =   375
      Left            =   1560
      TabIndex        =   25
      Top             =   2280
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.CommandButton cmdStart
      Caption         =   "Start"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   24
         Charset         =   238
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1695
      Left            =   240
      TabIndex        =   24
      Top             =   3000
      Width           =   4335
   End
   Begin VB.ListBox CorrectAnswerList
      Height          =   1230
      ItemData        =   "Form1.frx":0000
      Left            =   13920
      List            =   "Form1.frx":0013
      TabIndex        =   17
      Top             =   480
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.ListBox SuggestedAnswerList
      Height          =   1230
      Index           =   4
      ItemData        =   "Form1.frx":0026
      Left            =   12360
      List            =   "Form1.frx":0039
      TabIndex        =   16
      Top             =   480
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.ListBox SuggestedAnswerList
      Height          =   1230
      Index           =   3
      ItemData        =   "Form1.frx":005C
      Left            =   10800
      List            =   "Form1.frx":006F
      TabIndex        =   15
      Top             =   480
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.ListBox SuggestedAnswerList
      Height          =   1230
      Index           =   2
      ItemData        =   "Form1.frx":0097
      Left            =   9240
      List            =   "Form1.frx":00AA
      TabIndex        =   14
      Top             =   480
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.ListBox SuggestedAnswerList
      Height          =   1230
      Index           =   1
      ItemData        =   "Form1.frx":00D3
      Left            =   7680
      List            =   "Form1.frx":00E6
      TabIndex        =   13
      Top             =   480
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.ListBox QuestionList
      Height          =   1230
      ItemData        =   "Form1.frx":010A
      Left            =   4920
      List            =   "Form1.frx":011D
      TabIndex        =   11
      Top             =   480
      Visible         =   0   'False
      Width           =   2655
   End
   Begin VB.CommandButton cmdOk
      Caption         =   "OK"
      Height          =   375
      Left            =   720
      TabIndex        =   5
      Top             =   2280
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.OptionButton answerD
      Caption         =   "D"
      Height          =   255
      Left            =   360
      TabIndex        =   4
      Top             =   1800
      Visible         =   0   'False
      Width           =   2655
   End
   Begin VB.OptionButton answerC
      Caption         =   "C"
      Height          =   255
      Left            =   360
      TabIndex        =   3
      Top             =   1440
      Visible         =   0   'False
      Width           =   2655
   End
   Begin VB.OptionButton answerB
      Caption         =   "B"
      Height          =   255
      Left            =   360
      TabIndex        =   2
      Top             =   1080
      Visible         =   0   'False
      Width           =   2655
   End
   Begin VB.OptionButton answerA
      Caption         =   "A"
      Height          =   255
      Left            =   360
      TabIndex        =   1
      Top             =   720
      Visible         =   0   'False
      Width           =   2655
   End
   Begin VB.TextBox txtQuestion
      Height          =   285
      Left            =   360
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   240
      Visible         =   0   'False
      Width           =   2655
   End
   Begin VB.Label Label7
      Caption         =   "Resize this window to see the rest of the controls at runtime  >"
      Height          =   255
      Left            =   120
      TabIndex        =   23
      Top             =   5640
      Visible         =   0   'False
      Width           =   4455
   End
   Begin VB.Label Label6
      Caption         =   "Correct Answer"
      Height          =   255
      Left            =   13920
      TabIndex        =   22
      Top             =   120
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.Label Label5
      Caption         =   "Suggestion for D"
      Height          =   255
      Left            =   12360
      TabIndex        =   21
      Top             =   120
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.Label Label4
      Caption         =   "Suggestion for C"
      Height          =   255
      Left            =   10800
      TabIndex        =   20
      Top             =   120
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.Label Label3
      Caption         =   "Suggestion for B"
      Height          =   255
      Left            =   9240
      TabIndex        =   19
      Top             =   120
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.Label Label2
      Caption         =   "Suggestion for A"
      Height          =   255
      Left            =   7680
      TabIndex        =   18
      Top             =   120
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.Label Label1
      Alignment       =   2  'Center
      Caption         =   "List of questions"
      Height          =   255
      Left            =   4920
      TabIndex        =   12
      Top             =   120
      Visible         =   0   'False
      Width           =   2655
   End
   Begin VB.Label Answered
      BackColor       =   &H00FFFFFF&
      Caption         =   "500"
      Height          =   255
      Index           =   5
      Left            =   3720
      TabIndex        =   10
      Top             =   240
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.Label Answered
      BackColor       =   &H00FFFFFF&
      Caption         =   "400"
      Height          =   255
      Index           =   4
      Left            =   3720
      TabIndex        =   9
      Top             =   600
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.Label Answered
      BackColor       =   &H00FFFFFF&
      Caption         =   "300"
      Height          =   255
      Index           =   3
      Left            =   3720
      TabIndex        =   8
      Top             =   960
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.Label Answered
      BackColor       =   &H00FFFFFF&
      Caption         =   "200"
      Height          =   255
      Index           =   2
      Left            =   3720
      TabIndex        =   7
      Top             =   1320
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.Label Answered
      BackColor       =   &H00FFFFFF&
      Caption         =   "100"
      Height          =   255
      Index           =   1
      Left            =   3720
      TabIndex        =   6
      Top             =   1680
      Visible         =   0   'False
      Width           =   975
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim CurrentQuestion As Integer

Private Sub Command1_Click()
   
End Sub

Private Sub cmdOk_Click()
    Dim SelectedAnswer As String
    Dim CorrectAnswer As String

    If answerA.Value = True Then SelectedAnswer = "A"
    If answerB.Value = True Then SelectedAnswer = "B"
    If answerC.Value = True Then SelectedAnswer = "C"
    If answerD.Value = True Then SelectedAnswer = "D"

    If SelectedAnswer = "" Then
        MsgBox ("You must select an answer")
        Exit Sub
    End If

    CorrectAnswer = CorrectAnswerList.List(CurrentQuestion - 1)
   
    If SelectedAnswer = CorrectAnswer Then
        If CurrentQuestion = 5 Then
           
            For x = 1 To 255
                c1 = Int(Rnd * 255)
                c2 = Int(Rnd * 255)
                c3 = Int(Rnd * 255)
               
                Form1.BackColor = RGB(c1, c2, c3)
                DoEvents
            Next x
           
            MsgBox ("You have won!")
            End
        Else
       
            MsgBox "Congratulations!"
            Answered(CurrentQuestion).BackColor = vbRed
            CurrentQuestion = CurrentQuestion + 1
            Call SetQuestion(CurrentQuestion)
        End If
    Else
        MsgBox ("You have lost!")
        respond = MsgBox("Do you wish to try again?", vbYesNo)
        If respond = vbYes Then
            CurrentQuestion = 1
            Call ClearColors
            Call SetQuestion(1)
        Else
            End
        End If
    End If




End Sub

Private Sub cmdQuit_Click()
    respond = MsgBox("Do you realy want to quit?", vbYesNo)
   
    If respond = vbYes Then
        pionts = "0"
        For x = 1 To 5
            If Answered(x).BackColor = vbRed Then points = Answered(x).Caption
        Next x
        MsgBox "You have won " & points & " points."
        End
    End If

End Sub

Private Sub cmdStart_Click()
   
    txtQuestion.Visible = True
    answerA.Visible = True
    answerB.Visible = True
    answerC.Visible = True
    answerD.Visible = True
    cmdOk.Visible = True
    cmdQuit.Visible = True
   
    For x = 1 To 5
        Answered(x).Visible = True
    Next x
   
    cmdStart.Visible = False
    CurrentQuestion = 1
    Call ClearColors
    Call SetQuestion(1)

End Sub

Sub SetQuestion(Q_number As Integer)

    txtQuestion.Text = QuestionList.List(Q_number - 1)

    answerA.Caption = SuggestedAnswerList(1).List(Q_number - 1)
    answerB.Caption = SuggestedAnswerList(2).List(Q_number - 1)
    answerC.Caption = SuggestedAnswerList(3).List(Q_number - 1)
    answerD.Caption = SuggestedAnswerList(4).List(Q_number - 1)

    Answered(Q_number).BackColor = vbYellow
End Sub

Sub ClearColors()
    For x = 1 To 5
        Answered(x).BackColor = vbWhite
    Next x
End Sub
------------------------------------------------------------------------------
0
 
LVL 1

Expert Comment

by:jayh99
ID: 9788012
http://www.geocities.com/jay_harris_99/MillionaireDownload.html

In case my 1st link did not work, I made a direct download page.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 10592343
PAQed - no points refunded (of 100)

Computer101
E-E Admin
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question