DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: VB6 and Dos

  1. #1
    Join Date
    Jan 2005
    Posts
    24

    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.

    Code:
    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 127.0.0.1"
    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
    Posts
    2,750
    Paul
    ~~~~
    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

Bookmarks

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links