VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



The Matrix Has You, this text appears on the screen just like in the hit movie. Intended for beginn

by Joey Sullivan (JoeySoft) (1 Submission)
Category: Games
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Mon 15th July 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

The Matrix Has You, this text appears on the screen just like in the hit movie. Intended for beginners or nerdy children who want to play

API Declarations


'You will need to make a label, preferably font fixedsys, color green
'You will need to make a timer.
'Wash your hands after use.

Rate The Matrix Has You, this text appears on the screen just like in the hit movie. Intended for beginn



'The Matrix has YOU

'
'By Joey Sullivan
'JoeySoft (C) 2002
'[email protected]
'
'Some code snippets where used
'in the process of making The Matrix
'with the author's permission
'
'Wash your hands after use.



Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Private Declare Function ShowCursor& Lib "user32" (ByVal bShow As Long)
Dim a As Integer
Const SM_CXSCREEN = 0
Const SM_CYSCREEN = 1
Const HWND_TOP = 0
Const SWP_SHOWWINDOW = &H40

'Wanna quit early?  Press any key and its all gone.
Private Sub Form_KeyPress(KeyAscii As Integer)
'Reincarnate the cursor
ShowCursor (True)
End
End Sub

Private Sub Form_Load()
Dim cx As Long
Dim cy As Long
Dim RetVal As Long
' Determine if screen is already maximized.
If Me.WindowState = vbMaximized Then
   ' Set window to normal size
   Me.WindowState = vbNormal
End If         ' Get full screen width.
cx = GetSystemMetrics(SM_CXSCREEN)         ' Get full screen height.
cy = GetSystemMetrics(SM_CYSCREEN)
' Call API to set new size of window.
RetVal = SetWindowPos(Me.hwnd, HWND_TOP, 0, 0, cx, cy, SWP_SHOWWINDOW)

'Murder the cursor
ShowCursor (False)



End Sub





Private Sub Timer1_Timer()
'Make the time between each letter printed random.
Randomize
Timer1.Interval = Int((1 * Rnd) + 300)
'The text, this is editable to whatever you wish.
sMarquee = "The Matrix has you..."
'Take one more letter each time and put it on the screen
a = a + 1
Label1.Caption = Left$(sMarquee, a)
'If it is a few seconds after the whole text is printed,
If a > Len(sMarquee) + 3 Then
'Then reincarnate the cursor
ShowCursor (True)
'and kill my app
End

End If
End Sub


Download this snippet    Add to My Saved Code

The Matrix Has You, this text appears on the screen just like in the hit movie. Intended for beginn Comments

No comments have been posted about The Matrix Has You, this text appears on the screen just like in the hit movie. Intended for beginn. Why not be the first to post a comment about The Matrix Has You, this text appears on the screen just like in the hit movie. Intended for beginn.

Post your comment

Subject:
Message:
0/1000 characters