Process.start problem

  • Thread starter Jag Chat via .NET 247
  • Start date
J

Jag Chat via .NET 247

I would like to call a .NET executable file in a windows serviceat certain intervals of time. The following is the codesnippet, I put in. I am not receiving any error in my errorhandling routine (as it writes as a log entry). But my problemis, the respective application doesn't popup on screen and getvisible. I desperately need the application to be visible whenit does some work (just to know basically the status andprogress of the process it is doing). I copied calc.exe intothe root to test it. But I didn't test with anything else. Cananybody help me please.

'first method
'Dim proc As Process = Process.Start("c:\calc.exe")

'second method
'Dim startInfo As New ProcessStartInfo("c:\calc.exe")
'startInfo.CreateNoWindow = False
'startInfo.WindowStyle = ProcessWindowStyle.Normal
'Process.Start(startInfo)

'third method
'Shell("c:\calc.exe"), AppWinStyle.NormalFocus, False)
 
J

jamie

I think what you are looking for is:
..AppActivate

Dim ProcID As Integer
' Start the Calculator application, and store the process
id.
ProcID = Shell("CALC.EXE", AppWinStyle.NormalFocus)
' Activate the Calculator application.
AppActivate(ProcID)'Activates an application window.
SendKeys.SendWait("22")
SendKeys.SendWait("*")
SendKeys.SendWait("44")
SendKeys.SendWait("=")

-----Original Message-----
I would like to call a .NET executable file in a windows
service at certain intervals of time. The following is
the code snippet, I put in. I am not receiving any error
in my error handling routine (as it writes as a log
entry). But my problem is, the respective application
doesn't popup on screen and get visible. I desperately
need the application to be visible when it does some work
(just to know basically the status and progress of the
process it is doing). I copied calc.exe into the root to
test it. But I didn't test with anything else. Can
anybody help me please.
 
J

jamie

I just might hold back on that last solution.
I remember hearing someting about services not alowed
to display things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top