Solved

Process.StartInfo.WindowStyle not working

Posted on 2006-11-13
9
938 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

786 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