Will Someone try & try to debug this code?

  • Thread starter Thread starter littledump
  • Start date Start date
L

littledump

Guest
I think youll be able to see whats wrong

Code:
Module JepCode
    Public JepSplash As New VRSplash()
    Public MainJepForm As New VR_Jeopardy_()
    Public CatColl, QColl As New Collection()
    Public i, j, k, CUsed(4), QUsed(5), randomnum As Integer
    Public JepQs(4, 5) As Questions
    Public JepCs(4) As Categories
    Public ItEquals As Boolean
    Public JepMedPen As New System.Drawing.Pen(System.Drawing.Color.Yellow, 7)
    Public JepThinPen As New System.Drawing.Pen(System.Drawing.Color.Yellow, 1)
    Public Structure Categories
        <VBFixedString(100)> Dim Category As String
        <VBFixedString(100)> Dim CatFile As String
    End Structure
    Public Structure Questions
        <VBFixedString(500)> Dim Question As String
        <VBFixedString(500)> Dim Answer As String
    End Structure
    Public Sub Main()
        JepSplash.ShowDialog()
    End Sub
    Public Sub HMDel(ByVal length As Double)
        Dim start As Double
        start = Timer()
        Do
            System.Windows.Forms.Application.DoEvents()
        Loop Until Timer() > (start + length)
    End Sub
End Module
 
Continued

Code:
Public Class VRSplash
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        This call is required by the Windows Form Designer.
        InitializeComponent()

        Add any initialization after the InitializeComponent() call

    End Sub

    Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    NOTE: The following procedure is required by the Windows Form Designer
    It can be modified using the Windows Form Designer.  
    Do not modify it using the code editor.
    Friend WithEvents VR As System.Windows.Forms.Label
    Friend WithEvents Jeopardy As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.VR = New System.Windows.Forms.Label()
        Me.Jeopardy = New System.Windows.Forms.Label()
        Me.SuspendLayout()
        
        VR
        
        Me.VR.Font = New System.Drawing.Font("Century Gothic", 18.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.VR.ForeColor = System.Drawing.Color.Yellow
        Me.VR.Location = New System.Drawing.Point(0, 16)
        Me.VR.Name = "VR"
        Me.VR.Size = New System.Drawing.Size(512, 40)
        Me.VR.TabIndex = 0
        Me.VR.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        
        Jeopardy
        
        Me.Jeopardy.Font = New System.Drawing.Font("Century Gothic", 72.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Jeopardy.ForeColor = System.Drawing.Color.Yellow
        Me.Jeopardy.Location = New System.Drawing.Point(0, 56)
        Me.Jeopardy.Name = "Jeopardy"
        Me.Jeopardy.Size = New System.Drawing.Size(520, 176)
        Me.Jeopardy.TabIndex = 1
        
        VRSplash
        
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.BackColor = System.Drawing.Color.FromArgb(CType(0, Byte), CType(0, Byte), CType(192, Byte))
        Me.ClientSize = New System.Drawing.Size(520, 200)
        Me.ControlBox = False
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Jeopardy, Me.VR})
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "VRSplash"
        Me.ShowInTaskbar = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "VRSpalsh"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub VRSpalsh_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        JepSplash.Visible = True
        Dim JepTitle As String = "Jeopardy!"
        HMDel(1)
        VR.Text = "Virtual Reality"
        For i = 1 To 9
            HMDel(1)
            Jeopardy.Text = Jeopardy.Text & Mid(JepTitle, i, 1)
        Next
        HMDel(3)
        MainJepForm.Visible = True
        JepSplash.Visible = False
    End Sub
End Class
 
Continued

it really doesnt matter what this form looks like

Code:
Public Class VR_Jeopardy_
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Private Sub PaintJep(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
        e.Graphics.DrawLine(JepMedPen, 0, 80, 970, 80)
        e.Graphics.DrawLine(JepMedPen, 235, 0, 235, 480)
        e.Graphics.DrawLine(JepMedPen, 483, 0, 483, 480)
        e.Graphics.DrawLine(JepMedPen, 731, 0, 731, 480)
        e.Graphics.DrawLine(JepThinPen, 0, 164, 970, 164)
        e.Graphics.DrawLine(JepThinPen, 0, 244, 970, 244)
        e.Graphics.DrawLine(JepThinPen, 0, 324, 970, 324)
        e.Graphics.DrawLine(JepThinPen, 0, 404, 970, 404)
    End Sub
End Class
 
Continued

Also try replacing sub main

Currently:

Code:
Public Sub Main()
     JepSplash.ShowDialog()
End Sub

Replace With:

Code:
Public Sub Main()
     System.Windows.Forms.Application.Run(JepSplash)
End Sub
 
Thanks

Sorry for it being all replies but it wouldnt fit into all one so i separated it into modules and classes


Thanks to anyone who attempts to or does solve my problem :)
 
You didnt even say what was wrong. Lots of people simply do not have the time to copy & paste your code to diagnose it. Including me.
 
Zip up the necessary files, and click the Browse button underneath where you type your posts, select the file and submit. It should then be attached to your post.
 
Back
Top