Solved

Process.StartInfo.WindowStyle not working

Posted on 2006-11-13
9
975 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

626 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