Solved

Process.StartInfo.WindowStyle not working

Posted on 2006-11-13
9
911 Views
Last Modified: 2008-01-09
I'm simply trying to start a Windows app using System.Diagnostics.Process and make it "invisible" to the user.  Can someone tell me why this isnt working?  The program starts, but always shows up.

        Dim procQWS As New Process()

        procQWS.StartInfo.UseShellExecute = False
        procQWS.StartInfo.CreateNoWindow = True
        procQWS.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
        procQWS.StartInfo.FileName = "C:\Program Files\QWS3270 Plus\qws3270p.exe"
        procQWS.Start()
0
Comment
Question by:Epiphany1105
9 Comments
 
LVL 6

Expert Comment

by:riyazthad
ID: 17931428
Try after removing this line

procQWS.StartInfo.UseShellExecute = False

Thad
0
 
LVL 35

Expert Comment

by:YZlat
ID: 17931475
try

Dim procQWS As New Process()
Dim startInfo as ProcessStartInfo= new ProcessStartInfo()
        startInfo.UseShellExecute = False
        startInfo.CreateNoWindow = True
        startInfo.WindowStyle = ProcessWindowStyle.Hidden
        startInfo.FileName = "C:\Program Files\QWS3270 Plus\qws3270p.exe"
        procQWS.Start(startInfo)
0
 
LVL 1

Author Comment

by:Epiphany1105
ID: 17931725
riyazthad and YZlat,
     I tried both of your suggestions and the program is still visible to the user.
0
 
LVL 1

Author Comment

by:Epiphany1105
ID: 17931741
I notice that if I switch out the app i'm trying to use (C:\Program Files\QWS3270 Plus\qws3270p.exe) with Notepad (notepad.exe), notepad starts and is not visible.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 1

Author Comment

by:Epiphany1105
ID: 17931985
I figured it out.  QWS was setting a flag in the registry named zoomed which was causing it to maximize itself.  
0
 
LVL 6

Expert Comment

by:riyazthad
ID: 17932101
I just tried with a small program, and it is working fine. So your application setting was the problem.?

0
 
LVL 1

Author Comment

by:Epiphany1105
ID: 17932122
Yes.  I figure that it was deciding weather it should maximize itself based on that setting.
0
 
LVL 1

Accepted Solution

by:
kodiakbear earned 0 total points
ID: 17975465
Closed, 250 points refunded.
kb
Experts Exchange Moderator
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now