VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Hang the Computer

by Imtiaz Ahmed (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 4th April 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Hang the Computer

API Declarations


Private Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long

Rate Hang the Computer



       Timer1.Interval = 8000
       s = CreateRoundRectRgn(30, 30, 70, 70, Me.Width - 5, Me.Height - 5)
        Call SetWindowRgn(Me.hwnd, s, True)
End Sub

Private Sub Timer1_Timer()
      CreateForm

    a = Screen.Height
    b = Rnd() * a
    c = Screen.Height
    d = Rnd() * c
    Me.Move b, d
End Sub



'add a module andplace this code in it


Dim frm As Form1
Public Sub CreateForm()
    
    Set frm = New Form1
    frm.Show
    
End Sub

Download this snippet    Add to My Saved Code

Hang the Computer Comments

No comments have been posted about Hang the Computer. Why not be the first to post a comment about Hang the Computer.

Post your comment

Subject:
Message:
0/1000 characters