|
-
Mar 31st, 2001, 10:11 PM
#1
Thread Starter
Hyperactive Member
Alrighty then...
Questions. Here they are.
What would be the best (easiest) way to create a 'command' prompt based application (ie: mIRC) with a DOS style command output? I have tried putting together an app with a small text box at the bottom, and a large one at the top for the output, but the code used to identify each command and it's parameters is where I have trouble.
Is there any code (API, more than likely) to run a shell command, but open the program within the MDI of the VB application, as a child?
-
Mar 31st, 2001, 10:26 PM
#2
Thread Starter
Hyperactive Member
*YAWN* (yet again...)
crypo... where art thou.?
-
Mar 31st, 2001, 11:12 PM
#3
Thread Starter
Hyperactive Member
Anybody?
...
-
Mar 31st, 2001, 11:14 PM
#4
Good Ol' Platypus
You could find the hWnd of the shelled window, then restrict it to where your form is, so basically it is a child form... I dunno, why do you want to do this?
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Mar 31st, 2001, 11:32 PM
#5
Thread Starter
Hyperactive Member
Well...
I'm creating a restricted windows shell
-
Mar 31st, 2001, 11:45 PM
#6
Find the handle of the window, and use the SetParent API function to capture and place the window in your child form.
Code:
Private Declare Function SetParent Lib "user32" _
(ByVal hWndChild As Long, ByVal hWndNewParent As _
Long) As Long
-
Mar 31st, 2001, 11:48 PM
#7
And thou shalt be more patient and wait for people to answer rather than keep posting and posting expecting someone to answer.
Here is the answer to your first question.
http://www.vb-world.net/articles/console/
-
Apr 1st, 2001, 12:26 AM
#8
Thread Starter
Hyperactive Member
Actually
Sorry Matt, but I don't want to write an ACTUAL console application... I want to create an mIRC style interface (obviously much more basic for starts) that you would enter commands a parameters into Text1 and hit [Enter] and then it would process it and display the results of the command in Text2. Assume I made a program that would use a WinSock control to make a connection, how would I take the following command:
connect 127.0.0.1:10325
;and using code pull it apart. How would I determine what command has been entered, (ie: connect)? or how would I put the IP and Port into proper variables?
Follow?
-
Apr 1st, 2001, 01:18 PM
#9
Thread Starter
Hyperactive Member
crypt, you'r good with these... c'mon
-
Apr 1st, 2001, 01:30 PM
#10
Assume I made a program that would use a WinSock control to make a connection, how would I take the following command:
connect 127.0.0.1:10325
;and using code pull it apart. How would I determine what command has been entered, (ie: connect)? or how would I put the IP and Port into proper variables?
Follow?
well, if you have a consistent format. ie:
Code:
connect 127.0.0.1:10325
Command{space}IP:PORT
then you should be able to use the Split function
to break up the command line, and execute it from that point...
Code:
arrTemp = Split(txtCommand.Text, " ")
Select Case arrTemp(0)
Case "connect"
arrTemp2 = Split(arrTemp(1),":")
winsock1.RemoteHostIP = arrTemp2(0)
winsock1.RemotePort = CInt(arrTemp2(1))
End Select
like that...?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|