DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: VB6 and Dos

  1. #1
    Join Date
    Jan 2005

    VB6 and Dos

    Hi, I just started coding again, and was wondering if it was possible to run a DOS command in vb6 without opening the cmd prompt. Basically Running a batch file within the form and not opening it in cmd prompt.

    Im using this code to create and run a batch file, but i want it to load and execute in the form, not cmd prompt.

    Private Sub Command1_Click()
    Open "c:\echo.bat" For Output As #1
    Print #1, "@echo off"
    Print #1, "Echo Test Test Test"
    Print #1, "Ping"
    Print #1, "pause"
    Close #1
    x = Shell("c:\echo.bat", 1)
    End Sub
    If that isnt possible, would i be able to execute my batch, and have it run in the cmd prompt, but have the cmd prompt hidden completely?
    I'm here to learn :S

  2. #2
    Join Date
    Dec 2003
    Microsoft MVP (Visual Basic)

Similar Threads

  1. VB6 Question
    By rolandoreyes in forum VB Classic
    Replies: 2
    Last Post: 03-23-2006, 06:21 PM
  2. It's a jungle out there...
    By iGadget in forum .NET
    Replies: 36
    Last Post: 10-22-2002, 03:11 PM
  3. creating Isam files from within VB6
    By Larry Pope in forum VB Classic
    Replies: 1
    Last Post: 05-07-2002, 12:55 AM
  4. VB6 to DOS
    By Douglas in forum VB Classic
    Replies: 2
    Last Post: 09-09-2000, 08:16 PM
  5. VB6 to DOS
    By Douglas in forum VB Classic
    Replies: 0
    Last Post: 09-09-2000, 06:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

By using this site, you agree to the Privacy Policy