Solved

Process.StartInfo.WindowStyle not working

Posted on 2006-11-13
9
964 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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