Results 1 to 10 of 10

Thread: Letters to Images Problem

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Letters to Images Problem

    I need some help in figuring out how to retrieve the letter for each block.

    Code:
    Sub Main()
       Randomize
       X = Int((19 * Rnd) + 1) 'you have 19 lines in the text file
       
       ' edit the following so it is the path to your file
       Open (App.Path = "\bbee\text\puzzleletters.txt") & Input(Str(Y))
          For Y = 1 To X 'this will get the x'th line
             Input #1, NewPuzzle
          Next Y
       Close #1
       NewLetter = 1
       RoundOne.Show
    
    End Sub
    The bolded line is where I am having problems with retrieving the letter for each block. User Caskbill did create the code on my behalf, but originally it failed. I edited his code (shown in bold), and I am still experiencing problems. Where did we go wrong?

    Also, I did a test run, and it detected an error on the line that reads "VERSION 5#." What was wrong there?

    Here is the code from the forms file:

    Code:
    VERSION 5#
    Begin VB.Form RoundOne
       BackColor = &H8000000A
       Caption = "Form1"
       ClientHeight = 9270
       ClientLeft = 60
       ClientTop = 450
       ClientWidth = 13515
       DrawStyle = 5          'Transparent
       FillColor = &H8000000B
       LinkTopic = "Form1"
       ScaleHeight = 9270
       ScaleWidth = 13515
       StartUpPosition = 3    'Windows Default
       Begin Project1.UserControl1 UC
          Height = 1095
          Index = 1
          Left = 1560
          TabIndex = 31
          Top = 960
          Width = 1575
          _ExtentX        =   2778
          _ExtentY        =   1931
          Picture         =   "RoundOne1.frx":0000
          MaskColor = 16711680
          MaskPicture     =   "RoundOne1.frx":56BA
          ScaleHeight = 1095
          ScaleWidth = 1575
       End
       Begin VB.PictureBox Picture1
          BackColor = &H80FF80
          BorderStyle = 0        'None
          Height = 6735
          Index = 1
          Left = 0
          ScaleHeight = 6735
          ScaleWidth = 9495
          TabIndex = 29
          Top = 0
          Width = 9495
          Begin VB.Timer Timer2
             Left = 720
             Top = 120
          End
          Begin VB.Timer Timer1
             Left = 0
             Top = 0
          End
       End
       Begin VB.CommandButton Command1
          Caption = "1"
          Height = 495
          Left = 9840
          TabIndex = 23
          Top = 6600
          Width = 615
       End
       Begin VB.CommandButton Command2
          Caption = "2"
          Height = 495
          Left = 9840
          TabIndex = 22
          Top = 7200
          Width = 615
       End
       Begin VB.CommandButton Command3
          Caption = "3"
          Height = 495
          Left = 9840
          TabIndex = 21
          Top = 7800
          Width = 615
       End
       Begin VB.CommandButton Command4
          Caption = "4"
          Height = 495
          Left = 9840
          TabIndex = 20
          Top = 8400
          Width = 615
       End
       Begin VB.CommandButton Command5
          Caption = "5"
          Height = 495
          Left = 10560
          TabIndex = 19
          Top = 6840
          Width = 615
       End
       Begin VB.CommandButton Command6
          Caption = "6"
          Height = 495
          Left = 10560
          TabIndex = 18
          Top = 7440
          Width = 615
       End
       Begin VB.CommandButton Command7
          Caption = "7"
          Height = 495
          Left = 10560
          TabIndex = 17
          Top = 8040
          Width = 615
       End
       Begin VB.CommandButton Command8
          Caption = "8"
          Height = 495
          Left = 10560
          TabIndex = 16
          Top = 8640
          Width = 615
       End
       Begin VB.CommandButton Command9
          Caption = "9"
          Height = 495
          Left = 11280
          TabIndex = 15
          Top = 6600
          Width = 615
       End
       Begin VB.CommandButton Command10
          Caption = "10"
          Height = 495
          Left = 11280
          TabIndex = 14
          Top = 7200
          Width = 615
       End
       Begin VB.CommandButton Command11
          Caption = "11"
          Height = 495
          Left = 11280
          TabIndex = 13
          Top = 7800
          Width = 615
       End
       Begin VB.CommandButton Command12
          Caption = "12"
          Height = 495
          Left = 11280
          TabIndex = 12
          Top = 8400
          Width = 615
       End
       Begin VB.CommandButton Command13
          Caption = "13"
          Height = 495
          Left = 12000
          TabIndex = 11
          Top = 6840
          Width = 615
       End
       Begin VB.CommandButton Command14
          Caption = "14"
          Height = 495
          Left = 12000
          TabIndex = 10
          Top = 7440
          Width = 615
       End
       Begin VB.CommandButton Command15
          Caption = "15"
          Height = 495
          Left = 12000
          TabIndex = 9
          Top = 8040
          Width = 615
       End
       Begin VB.CommandButton Command16
          Caption = "16"
          Height = 495
          Left = 12000
          TabIndex = 8
          Top = 8640
          Width = 615
       End
       Begin VB.CommandButton Command17
          Caption = "17"
          Height = 495
          Left = 12720
          TabIndex = 7
          Top = 6600
          Width = 615
       End
       Begin VB.CommandButton Command18
          Caption = "18"
          Height = 495
          Left = 12720
          TabIndex = 6
          Top = 7200
          Width = 615
       End
       Begin VB.CommandButton Command19
          Caption = "19"
          Height = 495
          Left = 12720
          TabIndex = 5
          Top = 7800
          Width = 615
       End
       Begin VB.CommandButton Command20
          Caption = "20"
          Height = 495
          Left = 12720
          TabIndex = 4
          Top = 8400
          Width = 615
       End
       Begin VB.PictureBox RedScore
          BorderStyle = 0        'None
          Height = 615
          Left = 9600
          ScaleHeight = 615
          ScaleWidth = 1815
          TabIndex = 3
          Top = 3720
          Width = 1815
       End
       Begin VB.PictureBox WhiteScore
          BorderStyle = 0        'None
          Height = 615
          Left = 11520
          ScaleHeight = 615
          ScaleWidth = 1815
          TabIndex = 2
          Top = 3720
          Width = 1815
       End
       Begin VB.TextBox AnswerBar
          BeginProperty Font
             Name = "Arial"
             Size = 14.25
             Charset = 0
             Weight = 400
             Underline = 0           'False
             Italic = 0              'False
             Strikethrough = 0       'False
          EndProperty
          Height = 495
          Left = 3720
          TabIndex = 1
          Text = "Text1"
          Top = 8640
          Width = 5775
       End
       Begin VB.PictureBox Picture60
          BorderStyle = 0        'None
          Height = 2655
          Left = 9600
          Picture = "RoundOne1.frx": AD74
          ScaleHeight = 2655
          ScaleWidth = 3735
          TabIndex = 0
          Top = 240
          Width = 3735
       End
       Begin VB.Label Label3
          Alignment = 2          'Center
          BackColor = &HFFFFFF
          Caption = "White Player Press ""P"""
          BeginProperty Font
             Name = "Arial"
             Size = 15.75
             Charset = 0
             Weight = 400
             Underline = 0           'False
             Italic = 0              'False
             Strikethrough = 0       'False
          EndProperty
          Height = 375
          Left = 9600
          TabIndex = 30
          Top = 4800
          Width = 3735
       End
       Begin VB.Label QuestionBox
          Alignment = 2          'Center
          BackColor = &H800000
          Caption = "Label1"
          BeginProperty Font
             Name = "Arial"
             Size = 14.25
             Charset = 0
             Weight = 700
             Underline = 0           'False
             Italic = 0              'False
             Strikethrough = 0       'False
          EndProperty
          ForeColor = &H80FFFF
          Height = 1455
          Left = 0
          TabIndex = 28
          Top = 6960
          Width = 9495
       End
       Begin VB.Label RedPlayerLabel
          Alignment = 2          'Center
          BackColor = &HFF&
          Caption = "Label1"
          BeginProperty Font
             Name = "Arial"
             Size = 15.75
             Charset = 0
             Weight = 700
             Underline = 0           'False
             Italic = 0              'False
             Strikethrough = 0       'False
          EndProperty
          Height = 495
          Left = 9600
          TabIndex = 27
          Top = 3120
          Width = 1815
       End
       Begin VB.Label WhitePlayerLabel
          Alignment = 2          'Center
          BackColor = &HFFFFFF
          Caption = "Label2"
          BeginProperty Font
             Name = "Arial"
             Size = 15.75
             Charset = 0
             Weight = 700
             Underline = 0           'False
             Italic = 0              'False
             Strikethrough = 0       'False
          EndProperty
          Height = 495
          Left = 11520
          TabIndex = 26
          Top = 3120
          Width = 1815
       End
       Begin VB.Label Label2
          BackStyle = 0          'Transparent
          Caption = "Key in Answer Here ===>"
          BeginProperty Font
             Name = "Arial"
             Size = 14.25
             Charset = 0
             Weight = 700
             Underline = 0           'False
             Italic = 0              'False
             Strikethrough = 0       'False
          EndProperty
          Height = 375
          Left = 120
          TabIndex = 25
          Top = 8760
          Width = 3615
       End
       Begin VB.Label Label1
          Alignment = 2          'Center
          BackColor = &HFF&
          Caption = "Red Player Press ""Q"""
          BeginProperty Font
             Name = "Arial"
             Size = 15.75
             Charset = 0
             Weight = 400
             Underline = 0           'False
             Italic = 0              'False
             Strikethrough = 0       'False
          EndProperty
          ForeColor = &H0&
          Height = 375
          Left = 9600
          TabIndex = 24
          Top = 4440
          Width = 3735
       End
    End
    Option Explicit
    Const DisplaySequence = " 1506130702190112041705181020090314161108"
    Private BoardSFX As AudioSounds, animate As Integer
    Last edited by JonSea31; Apr 21st, 2009 at 06:31 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width