Solved

Hide DOS window using VB.NET

Posted on 2002-06-27
3
249 Views
Last Modified: 2007-12-19
We are trying to hide a DOS batch file window using VB.NET.

This is the code that a consultant from long ago (and far, far away) wrote for us, but we're having trouble getting it running - is the syntax different for VB.NET?  (Or are we just ignorant?)  Anyway, here's what we're using:

                   ***
                   R = WinExec("dosprmpt.pif /c *.BAT", _SW_HIDE)

                   Do While GetModuleUsage(R) > 0

                       DoEvents

                   Loop
                   ***

Not being a programmer, I need the most specific code possible.  500 points for something that actually works!

Another note:  when the DOS window is hidden, it should NOT BE SEEN ANYWHERE ELSE EITHER (not even  the taskbar for a split second).  Is this possible???
 We're using NT - if it matters...
0
Comment
Question by:yazooka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 500 total points
ID: 7114772
0
 
LVL 15

Expert Comment

by:ameba
ID: 7114810
That is 16-bit code (Win 3.1) and it won't work on Win95 or better OS.

Hope AzraSound can help you.

I can only direct you to another VB6 shell code, but I cannot translate it to VB.NET.
0
 
LVL 2

Expert Comment

by:flytiger
ID: 7114887
Shell("d:\abc.bat", AppWinStyle.Hide)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month4 days, 15 hours left to enroll

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question