Results 1 to 10 of 10

Thread: 2 Questions. Need Help. O. K. lol

  1. #1

    Thread Starter
    Hyperactive Member tomcatexodus's Avatar
    Join Date
    Feb 2001
    Posts
    372

    Talking

    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?
    IWS

  2. #2

    Thread Starter
    Hyperactive Member tomcatexodus's Avatar
    Join Date
    Feb 2001
    Posts
    372

    Red face *YAWN* (yet again...)

    crypo... where art thou.?
    IWS

  3. #3

    Thread Starter
    Hyperactive Member tomcatexodus's Avatar
    Join Date
    Feb 2001
    Posts
    372

    Unhappy Anybody?

    ...
    IWS

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    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)

  5. #5

    Thread Starter
    Hyperactive Member tomcatexodus's Avatar
    Join Date
    Feb 2001
    Posts
    372

    Well...

    I'm creating a restricted windows shell
    IWS

  6. #6
    Guest
    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

  7. #7
    Guest
    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/

  8. #8

    Thread Starter
    Hyperactive Member tomcatexodus's Avatar
    Join Date
    Feb 2001
    Posts
    372

    Unhappy 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?
    IWS

  9. #9

    Thread Starter
    Hyperactive Member tomcatexodus's Avatar
    Join Date
    Feb 2001
    Posts
    372

    Talking

    crypt, you'r good with these... c'mon
    IWS

  10. #10
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    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
  •  



Click Here to Expand Forum to Full Width