VERSION 5.00 Begin VB.Form Scrabble BackColor = &H00800080& Caption = "Scrabble Pad" ClientHeight = 8295 ClientLeft = 60 ClientTop = 405 ClientWidth = 11880 LinkTopic = "Form1" ScaleHeight = 8295 ScaleWidth = 11880 WindowState = 2 'Maximized Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Home Appl" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 9 Left = 6600 Style = 1 'Graphical TabIndex = 25 ToolTipText = "Categories of Home Appliances" Top = 7155 Width = 1455 End Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Vehicles" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 6 Left = 4680 Style = 1 'Graphical TabIndex = 24 ToolTipText = "Categories of Vehicles" Top = 7155 Width = 1455 End Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Animals/Birds" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 3 Left = 2760 Style = 1 'Graphical TabIndex = 23 ToolTipText = "Categories of Animals,Birds,Insects" Top = 7155 Width = 1455 End Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Veg / Fruit" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 2 Left = 720 Style = 1 'Graphical TabIndex = 22 ToolTipText = "Categories of Vegetables, Fruits and Flower." Top = 7155 Width = 1455 End Begin VB.Frame CtFrm BackColor = &H00800080& Caption = "Categories" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFF00& Height = 2775 Index = 0 Left = 240 TabIndex = 7 Top = 5040 Width = 11415 Begin VB.Frame CtFrm BackColor = &H00800080& Caption = "General" BeginProperty Font Name = "Courier New" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H0080FF80& Height = 810 Index = 5 Left = 360 TabIndex = 26 Top = 1800 Width = 7605 End Begin VB.CommandButton CmdExt Caption = "E &x i t " Height = 495 Left = 8760 TabIndex = 21 ToolTipText = "Exit from the game" Top = 1440 Width = 1815 End Begin VB.CommandButton CmdAply Caption = "&A p p l y" Enabled = 0 'False Height = 495 Left = 8760 TabIndex = 20 ToolTipText = "Click to apply for change the categories." Top = 720 Width = 1815 End Begin VB.Frame CtFrm BackColor = &H00800080& Caption = "Computer" BeginProperty Font Name = "Courier New" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H0000FFFF& Height = 1410 Index = 4 Left = 6240 TabIndex = 17 Top = 360 Width = 1725 Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Hardware" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 11 Left = 120 Style = 1 'Graphical TabIndex = 19 ToolTipText = "Categories of Computer Hardware" Top = 360 Width = 1455 End Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Software" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 10 Left = 120 Style = 1 'Graphical TabIndex = 18 ToolTipText = "Categories of Computer Software" Top = 840 Width = 1455 End End Begin VB.Frame CtFrm BackColor = &H00800080& Caption = "World" BeginProperty Font Name = "Courier New" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H0000FFFF& Height = 1410 Index = 3 Left = 4320 TabIndex = 14 Top = 360 Width = 1725 Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Countries" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 8 Left = 120 Style = 1 'Graphical TabIndex = 16 ToolTipText = "Categories of World Countries" Top = 360 Width = 1455 End Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "States/Cities" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 7 Left = 120 Style = 1 'Graphical TabIndex = 15 ToolTipText = "Categories of world States" Top = 840 Width = 1455 End End Begin VB.Frame CtFrm BackColor = &H00800080& Caption = "Sports" BeginProperty Font Name = "Courier New" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H0000FFFF& Height = 1410 Index = 2 Left = 2400 TabIndex = 11 Top = 360 Width = 1725 Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Personalities" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 5 Left = 120 Style = 1 'Graphical TabIndex = 13 ToolTipText = "Categories of different Sports Personalities" Top = 840 Width = 1455 End Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Sports Name" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 4 Left = 120 Style = 1 'Graphical TabIndex = 12 ToolTipText = "Categories of Sports Name,kits etc.." Top = 360 Width = 1455 End End Begin VB.Frame CtFrm BackColor = &H00800080& Caption = "Filmi" BeginProperty Font Name = "Courier New" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H0000FFFF& Height = 1410 Index = 1 Left = 360 TabIndex = 8 Top = 360 Width = 1725 Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Movies Name" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 1 Left = 120 Style = 1 'Graphical TabIndex = 10 ToolTipText = "Categories of Hindi & English Movies" Top = 360 Width = 1455 End Begin VB.OptionButton FlmOpt BackColor = &H00AE559E& Caption = "Personalities" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFC0& Height = 375 Index = 0 Left = 120 Style = 1 'Graphical TabIndex = 9 ToolTipText = "Categories of English and Hindi Flimi Personalities" Top = 840 Width = 1455 End End End Begin VB.PictureBox PgPic BackColor = &H00800080& Height = 375 Left = 6360 ScaleHeight = 315 ScaleWidth = 3555 TabIndex = 2 Top = 230 Width = 3615 Begin VB.Label PgLbl Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H0080FF80& BorderStyle = 1 'Fixed Single Caption = "100% " BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& Height = 300 Left = 0 TabIndex = 3 ToolTipText = "Progress Bar" Top = 0 Width = 3555 End End Begin VB.CommandButton CmdKey Caption = "A" BeginProperty Font Name = "Courier New" Size = 15.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 0 Left = 840 TabIndex = 1 Top = 3360 Width = 495 End Begin VB.Data Data1 Caption = "Game" Connect = "Access" DatabaseName = "" DefaultCursorType= 0 'DefaultCursor DefaultType = 2 'UseODBC Exclusive = 0 'False Height = 615 Left = 360 Options = 0 ReadOnly = -1 'True RecordsetType = 1 'Dynaset RecordSource = "Table1" Top = 4440 Visible = 0 'False Width = 4455 End Begin VB.TextBox Text1 DataField = "Hardware" DataSource = "Data1" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 1320 TabIndex = 0 Text = "Text1" Top = 0 Visible = 0 'False Width = 4095 End Begin VB.Frame Frm1 BackColor = &H00800080& Caption = "L i f e :" ForeColor = &H00FFFF00& Height = 650 Index = 0 Left = 6240 TabIndex = 4 Top = 25 Width = 3855 End Begin VB.Frame Frm1 BackColor = &H00800080& Caption = "Points :" ForeColor = &H00FFFF00& Height = 650 Index = 1 Left = 10320 TabIndex = 27 Top = 25 Width = 1335 Begin VB.Label LblPnt BackColor = &H00808080& BorderStyle = 1 'Fixed Single Caption = "0" BeginProperty Font Name = "Courier" Size = 12 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFC0& Height = 325 Left = 120 TabIndex = 28 Top = 240 Width = 1095 End End Begin VB.Label Lbl Alignment = 2 'Center BackColor = &H00808000& BorderStyle = 1 'Fixed Single Caption = "L" BeginProperty Font Name = "Courier New" Size = 15.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0FFFF& Height = 495 Index = 0 Left = 360 TabIndex = 6 Top = 960 Width = 495 End Begin VB.Label StatLbl Alignment = 2 'Center BackColor = &H00808080& BorderStyle = 1 'Fixed Single Caption = "Categories" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H0000FFFF& Height = 375 Left = 360 TabIndex = 5 ToolTipText = "Catogeries" Top = 240 Width = 2895 End Begin VB.Line Line1 BorderColor = &H00FFFFFF& Index = 7 X1 = 0 X2 = 2400 Y1 = 4935 Y2 = 4935 End Begin VB.Line Line1 Index = 6 X1 = 0 X2 = 2400 Y1 = 4920 Y2 = 4920 End Begin VB.Line Line1 BorderColor = &H00FFFFFF& Index = 5 X1 = 0 X2 = 2400 Y1 = 735 Y2 = 735 End Begin VB.Line Line1 Index = 4 X1 = 0 X2 = 2400 Y1 = 720 Y2 = 720 End Begin VB.Line Line1 BorderColor = &H00FFFFFF& Index = 3 X1 = 0 X2 = 2400 Y1 = 20 Y2 = 20 End Begin VB.Line Line1 Index = 2 X1 = 0 X2 = 2400 Y1 = 0 Y2 = 0 End Begin VB.Line Line1 Index = 1 X1 = 0 X2 = 2400 Y1 = 2980 Y2 = 2980 End Begin VB.Line Line1 BorderColor = &H00FFFFFF& Index = 0 X1 = 0 X2 = 2400 Y1 = 3000 Y2 = 3000 End Begin VB.Menu Gme Caption = "&Game" Begin VB.Menu About Caption = "&About" End Begin VB.Menu dsh Caption = "-" End Begin VB.Menu Ext Caption = "E&xit" End End End Attribute VB_Name = "Scrabble" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim Tm, CH, L, K, I, R, T, Lft, Pt As Integer Dim TmrTxt, Str As String Dim ST(50) As Variant Private Sub About_Click() Dim Responce As Boolean Responce = MsgBox("Saiyed Irfan Noor [ Email : sirfnvb@rediffmail.com]", vbInformation, "About") End Sub Private Sub CmdExt_Click() Unload Me End End Sub Private Sub CmdKey_Click(Index As Integer) Dim J As Integer Dim Chk As Boolean CmdKey(Index).Enabled = False Chk = False For J = 0 To T - 1 If CmdKey(Index).Caption = ST(J) Then Lbl(J).Caption = ST(J) Chk = True End If Next J If Chk = False Then LfTme End If End Sub Private Sub Command2_Click() Text1.DataField = "Computer" End Sub Private Sub Ext_Click() Unload Me End End Sub Private Sub FlmOpt_Click(Index As Integer) Dim K As Integer Pt = 0 For K = 0 To 9 If K <> Index Then FlmOpt(K).Value = False End If Next K If FlmOpt(Index).Value = True Then If Index = 0 Then Text1.DataField = "MovPer" ElseIf Index = 1 Then Text1.DataField = "Movies" ElseIf Index = 2 Then Text1.DataField = "VegFru" ElseIf Index = 3 Then Text1.DataField = "Animals" ElseIf Index = 4 Then Text1.DataField = "Sports" ElseIf Index = 5 Then Text1.DataField = "SportsPer" ElseIf Index = 6 Then Text1.DataField = "Vehicals" ElseIf Index = 7 Then Text1.DataField = "StatCit" ElseIf Index = 8 Then Text1.DataField = "Countries" ElseIf Index = 9 Then Text1.DataField = "Home App" ElseIf Index = 10 Then Text1.DataField = "Software" ElseIf Index = 11 Then Text1.DataField = "Hardware" End If Ldlbl For I = 0 To 25 CmdKey(I).Enabled = True Next I End If End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) StatLbl.Caption = KeyCode End Sub Private Sub Form_KeyPress(KeyAscii As Integer) Me.Caption = KeyAscii End Sub Private Sub Form_Load() Text1.Text = "" T = 1: Pt = 0 CH = 66 L = 1: Tm = 100 Data1.DatabaseName = App.Path & "\gme97.mdb" LdKey Ldlbl End Sub Sub LdKey() Do While CH <= 90 Load CmdKey(L) CmdKey(L).Visible = True CmdKey(L).Caption = Chr$(CH) If CmdKey(L).Caption = "O" Then CmdKey(L).Left = CmdKey(1).Left CmdKey(L).Top = CmdKey(1).Top + CmdKey(1).Height + 300 Else CmdKey(L).Left = CmdKey(L - 1).Left + CmdKey(L - 1).Width + 250 CmdKey(L).Top = CmdKey(L - 1).Top '+ CmdKey(1).Height + 100 End If CH = CH + 1 L = L + 1 Loop End Sub Sub Ldlbl() If T > 0 Then For I = 1 To T - 1 Unload Lbl(I) ST(I) = "" Next I Lbl(0).Caption = "" T = 1 End If 'Data1.Connect ' Data1.Database.Connect = "C:\irfan\vb\prog\gme\db1.mdb" Data1.Refresh Randomize R = Int(Rnd * 100) 'Text2.Text = R Data1.Recordset.MoveFirst For I = 1 To R - 1 Data1.Recordset.MoveNext Next I StatLbl.Caption = Text1.DataField K = Len(Text1.Text) 'lbl(0).Text = Mid(Text1.Text, 1, 1) ST(0) = Mid(Text1.Text, 1, 1) Lft = Lbl(0).Left For I = 1 To K - 1 'Str = Right(Text1.Text, I) Str = Mid(Text1.Text, I + 1, 1) If Str = " " Then Lft = Lft + Lbl(T - 1).Width '375 'lbl(I - 1).Width 'T = T - 1 GoTo Pss Else Load Lbl(T) Lbl(T).Visible = True 'Lbl(T).Locked = True Lft = Lft + Lbl(T).Width + 150 If Lft > Me.ScaleWidth - 500 Then Lbl(T).Left = Lbl(1).Left Lbl(T).Top = Lbl(1).Top + Lbl(1).Height + 100 Lft = Lbl(T).Left Else 'Lft = Lft + lbl(T).Width + 150 Lbl(T).Left = Lft + 50 Lbl(T).Top = Lbl(T - 1).Top End If ' lbl(T).Text = Str ST(T) = Str T = T + 1 End If Pss: Next I End Sub Private Sub Form_Resize() Line1(0).X2 = Me.ScaleWidth Line1(1).X2 = Me.ScaleWidth Line1(2).X2 = Me.ScaleWidth Line1(3).X2 = Me.ScaleWidth Line1(4).X2 = Me.ScaleWidth Line1(5).X2 = Me.ScaleWidth Line1(6).X2 = Me.ScaleWidth Line1(7).X2 = Me.ScaleWidth End Sub Private Sub lbl_Change(Index As Integer) Dim Chk As Boolean Dim Responce As String If Tm <> 0 Then For I = 0 To T - 1 If Lbl(I).Caption <> "" Then Chk = True Else Chk = False Exit For End If Next I End If If Chk = True Then Responce = MsgBox("Excellent Performance", vbInformation, "Challenge") For I = 0 To 25 CmdKey(I).Enabled = True Next I 'LdPnt Pt = Pt + 10 LblPnt.Caption = Pt Ldlbl End If End Sub Sub LfTme() Dim Responce As String Tm = Tm - 10 PgLbl.Width = PgLbl.Width - 355 PgLbl.Caption = Tm & " %" If Tm < 80 And Tm >= 60 Then PgLbl.BackColor = &HC0FFC0 'light green ElseIf Tm < 60 And Tm >= 40 Then PgLbl.BackColor = &HC0E0FF 'light orange ElseIf Tm < 40 And Tm > 10 Then PgLbl.BackColor = &HC0C0FF 'light red ElseIf Tm = 10 Then PgLbl.BackColor = &HFF& 'dark red End If If Tm = 0 Then For L = 0 To T - 1 Lbl(L).Caption = ST(L) Next L Responce = MsgBox(" You Dead!!!!!!!!!!!! ", vbCritical, "Challenge") Pt = Pt - 30 LblPnt.Caption = Pt For L = 0 To 25 CmdKey(L).Enabled = True Next L L = 1 'UnLoadPnt PgLbl.BackColor = &H80FF80 'dark green PgLbl.Caption = 100 & "%" Tm = 100 PgLbl.Width = 3555 Ldlbl End If End Sub Private Sub LblPnt_Change() If Pt < 0 Then LblPnt.BackColor = &H40C0& 'red ElseIf Pt >= 0 Then LblPnt.BackColor = &H808080 'gray ElseIf Pt >= 100 Then LblPnt.BackColor = &HC00000 'blue ElseIf Pt >= 1000 Then LblPnt.BackColor = &HC00000 'blue End If End Sub