VB icon

...ooo0000 Modem Thing 0000ooo...

Email
Submitted on: 1/3/2015 12:04:00 AM
By: Jake McCurry (from psc cd)  
Level: Not Given
User Rating: By 8 Users
Compatibility: VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 2458
 
     It turns your modem on and off an amount of times that you define. Good for annoying someone on the phone that is pissing you off!
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
'**************************************
' Name: ...ooo0000 Modem Thing 0000ooo...
' Description:It turns your modem on and off an amount of times that you define. Good for 
annoying someone on the phone that is pissing you off!
' By: Jake McCurry (from psc cd)
'
' Side Effects:It might be possible that this could hurt your modem. I have done this 6000 times before and it didn't affect it any...
'**************************************

'make a command button name Command1 make its caption "Begin"
'make a Textbox name Textbox1
'make a timer called Timer1 and make it unenabled interval = 500
'make a timer called Timer2 and make its interval 455
'Make a label called Label1
Private Sub Command1_Click()
Do Until Label1.Caption = Text1.Text
Timer1.Enabled = True
PhoneNumber$ = "123-4567" 'isn't important never dials
Open "COM2:" For Output As #1 'or COM1
Print #1, "ATDT" & PhoneNumber$ & Chr$(13)
Label1.Caption = Label1.Caption + 1
Close #1
Loop
End Sub
Private Sub Form_Resize()
On Error GoTo a
Form1.Height = 2715
Form1.Width = 3690
'another good way to do this is makes form1.borderstyle = 1
a:
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyReturn:
Do Until Label1.Caption = Text1.Text
Timer1.Enabled = True
PhoneNumber$ = "123-4567" 'this number isn't important it never dials!
Open "COM2:" For Output As #1 'or COM1
Print #1, "ATDT" & PhoneNumber$ & Chr$(13)
Label1.Caption = Label1.Caption + 1
Close #1
Loop
End Select
End Sub
Private Sub Timer1_Timer()
If Label1.Caption = Text1.Text Then
Label1.Caption = "0"
End If
End Sub
Private Sub Timer2_Timer()
Dim a
a = Int(Rnd * 15) + 1
Text1.ForeColor = QBColor(a)
End Sub


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.