by Philip Brookes *Rayza* (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 27th November 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
DOS impersonation, you can read the code, and see that its easy enough to add your own controls(cos there s not really a lot in it), all the
API Declarations
Dim command As String, var, temp As String, char As Integer, nums As Integer
Dim counter As Integer
TXTinput.Height = Form1.Height
TXTinput.Width = Form1.Width
TXTinput = "command: >"
char = 11
counter = 0
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If MsgBox("Are you sure you want to quit?", vbYesNo, "Quit?") = vbNo Then Cancel = 1
End Sub
Private Sub Form_Resize()
TXTinput.Height = Form1.Height
TXTinput.Width = Form1.Width
End Sub
Private Sub Timer1_Timer()
counter = counter + 1
If counter = nums Then
Me.Show
nums = 0
counter = 0
Timer1.Enabled = False
End If
End Sub
Private Sub TXTinput_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
command = Right(TXTinput, 3)
If LCase(command) = "cls" Then
TXTinput = "Command: >"
command = ""
GoTo errhandler
Else
command = ""
Do Until temp = ":"
temp = Mid(TXTinput, char, 1)
char = char + 1
If char > 119 Then GoTo errhandler
command = command + temp
Loop
Select Case UCase(command)
Case "EXIT:"
Unload Me
Case "HEIGHT:"
var = Mid(TXTinput, char)
Form1.Height = var
Case "WIDTH:"
var = Mid(TXTinput, char)
Form1.Width = var
Case "BACKSTATE:"
var = Mid(TXTinput, char)
Select Case UCase(var)
Case "YELLOW"
TXTinput.BackColor = vbYellow
Case "BLACK"
TXTinput.BackColor = vbBlack
Case "BLUE"
TXTinput.BackColor = vbBlue
Case "RED"
TXTinput.BackColor = vbRed
Case "GREEN"
TXTinput.BackColor = vbGreen
Case "WHITE"
TXTinput.BackColor = vbWhite
End Select
Case "FORESTATE:"
var = Mid(TXTinput, char)
Select Case UCase(var)
Case "YELLOW"
TXTinput.ForeColor = vbYellow
Case "BLACK"
TXTinput.ForeColor = vbBlack
Case "BLUE"
TXTinput.ForeColor = vbBlue
Case "RED"
TXTinput.ForeColor = vbRed
Case "GREEN"
TXTinput.ForeColor = vbGreen
Case "WHITE"
TXTinput.ForeColor = vbWhite
End Select
Case "SHELL:"
On Error GoTo errhandler
var = Mid(TXTinput, char)
Shell (var)
Case "RUN:"
On Error GoTo errhandler
var = Mid(TXTinput, char)
Shell (var)
Case "COMMANDS"
TXTinput = "shell:/run:<<program>> This runs a program" & vbCrLf & _
"forestate:<<color>> changes the text color between" & vbCrLf & _
"Yellow, black, blue, red, green and white." & vbCrLf & _
"Backstate:<<color>> changes the color of the background between" & vbCrLf & _
"Yellow, black, blue, red, green and white." & vbCrLf & _
"Height:<<number>> changes the height of the console" & vbCrLf & _
"Width:<<number>> changes the width of the console" & vbCrLf & _
"hide:<<number>> hides the console for that many seconds"
Case "HIDE:"
var = Mid(TXTinput, char)
If IsNumeric(var) Then
nums = Mid(TXTinput, char)
Me.Hide
Timer1.Enabled = True
Else: GoTo errhandler
End If
End Select
errhandler:
char = 11
temp = ""
command = ""
TXTinput.SelStart = Len(TXTinput)
End If
End If
End Sub
Private Sub TXTinput_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then KeyAscii = 0
End Sub
No comments have been posted about DOS impersonation, you can read the code, and see that its easy enough to add your own controls(cos. Why not be the first to post a comment about DOS impersonation, you can read the code, and see that its easy enough to add your own controls(cos.