Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Process.StartInfo.WindowStyle not working

Posted on 2006-11-13
9
Medium Priority
?
995 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
[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
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

670 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