Hi,
My application uses SHELL command to run external programs, like this :
Shell("program.exe", AppWinStyle.MinimizedNoFocus, True)
or
Shell("program.exe", AppWinStyle.Hide, True)
It runs OK, but my application don't refresh, I can't see the logs of my
application's listbox, nothing, it like it freezes/hangs alghought that
isn't true because all batch jobs runs 1 by 1 until the end
Just want to refresh my application, I tried doEvents but without success
thank you 7 2786
You have set the boolean to wait.
does program.exe also quit?
"martins" <xx*@hotmail.com> schreef in bericht
news:OR*************@TK2MSFTNGP09.phx.gbl... Hi,
My application uses SHELL command to run external programs, like this :
Shell("program.exe", AppWinStyle.MinimizedNoFocus, True)
or
Shell("program.exe", AppWinStyle.Hide, True)
It runs OK, but my application don't refresh, I can't see the logs of my application's listbox, nothing, it like it freezes/hangs alghought that isn't true because all batch jobs runs 1 by 1 until the end
Just want to refresh my application, I tried doEvents but without success
thank you
"newbie" <as***@aswin.be> wrote in message
news:43***********************@news.skynet.be... You have set the boolean to wait. does program.exe also quit?
Yes it quits, I need that boolean ON because I have several jobs to run in
batch mode and I need to wait until each job ends
The only problem is that I can't activate my program - it says "not
responding"
but this is not true
Is it impossible to refresh my application or give it some focus ?
application.doenvents doesn't work, Shell's option of
AppWinStyle.MinimizedNoFocus or Hide, doesn't work
This jobs needs very processor and memory recurses
Shell is the old way of launching programs. You will find that you have
much better control useing the System.Diagnostics namespace.
Dim SI As New System.Diagnostics.ProcessStartInfo
SI.FileName = "program.exe"
SI.WindowStyle = ProcessWindowStyle.Hidden
Dim p As System.Diagnostics.Process =
System.Diagnostics.Process.Start(SI)
p.WaitForExit()
Me.Refresh()
what if your program is to busy to laubching all the programs?
Try to add a slow process like ( slow process = doesn't quit directly )
shell("ping www.google.be", .... )
your CPU = 99% ?
"martins" <xx*@hotmail.com> schreef in bericht
news:OR*************@TK2MSFTNGP09.phx.gbl... Hi,
My application uses SHELL command to run external programs, like this :
Shell("program.exe", AppWinStyle.MinimizedNoFocus, True)
or
Shell("program.exe", AppWinStyle.Hide, True)
It runs OK, but my application don't refresh, I can't see the logs of my application's listbox, nothing, it like it freezes/hangs alghought that isn't true because all batch jobs runs 1 by 1 until the end
Just want to refresh my application, I tried doEvents but without success
thank you
I tried that process launch solution instead of shell command
Like this :
Dim SI As New System.Diagnostics.ProcessStartInfo
SI.FileName = startupfolder & "DVDAuthor\dvdauthor -o test -x " &
WorkingPath & "dvdauthor.xml"
SI.WindowStyle = ProcessWindowStyle.Hidden
Dim p As System.Diagnostics.Process =
System.Diagnostics.Process.Start(SI)
p.WaitForExit()
Me.Refresh()
And I always get an error on filename
But if I use shell command :
Shell(startupfolder & "DVDAuthor\dvdauthor -o test -x " & WorkingPath &
"dvdauthor.xml", AppWinStyle.Hide, True)
note: startupfolder is Application.ExecutablePath under I have all external
programs
It works, but my program freezes doesn't show the logs of all batch
processes, although IT WORKS WELL
The title of my application says always (NOT RESPONDING)
I'm stuck with this
My program is just an GUI for DVDAuthoring, I'm doing this for my personal
use
And you know that encoding video/audio takes a lot of memory and cpu usage
I'm using DVDAuthoring tools from sourceforge, they are free, and an decoder
software that is...hummm...you know...
but as I said, this is for my personal use and is a case study
this batch threads are making me nuts because my app runs well but without
responding
"martins" <xx*@hotmail.com> wrote in message
news:ec*************@TK2MSFTNGP15.phx.gbl... I tried that process launch solution instead of shell command Like this : Dim SI As New System.Diagnostics.ProcessStartInfo SI.FileName = startupfolder & "DVDAuthor\dvdauthor -o test -x " & WorkingPath & "dvdauthor.xml" SI.WindowStyle = ProcessWindowStyle.Hidden Dim p As System.Diagnostics.Process = System.Diagnostics.Process.Start(SI) p.WaitForExit() Me.Refresh() And I always get an error on filename But if I use shell command : Shell(startupfolder & "DVDAuthor\dvdauthor -o test -x " & WorkingPath & "dvdauthor.xml", AppWinStyle.Hide, True) note: startupfolder is Application.ExecutablePath under I have all external programs
It works, but my program freezes doesn't show the logs of all batch processes, although IT WORKS WELL The title of my application says always (NOT RESPONDING) I'm stuck with this
uff :)
problem of hard batch jobs solved
I just must use/launch a system thread
simple, the program responds now and shows the logs
"martins" <xx*@hotmail.com> wrote in message
news:OR*************@TK2MSFTNGP09.phx.gbl... Hi,
My application uses SHELL command to run external programs, like this :
Shell("program.exe", AppWinStyle.MinimizedNoFocus, True)
or
Shell("program.exe", AppWinStyle.Hide, True)
It runs OK, but my application don't refresh, I can't see the logs of my application's listbox, nothing, it like it freezes/hangs alghought that isn't true because all batch jobs runs 1 by 1 until the end
Just want to refresh my application, I tried doEvents but without success
thank you This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bigbowser |
last post by:
Hi all,
I'm trying to create a sub shell environment ( i
haven't really got a reason, its more of a test,
although hopefully it will make life easier ;P )
but whenever i try to call the...
|
by: Siemel Naran |
last post by:
Hi. I'm writing a command shell that reads commands from standard input.
At this point I have the command in a std::string. Now I want to execute
this command in the shell. From the Borland...
|
by: Amjad |
last post by:
I'm trying to create a folder, append text file to
another, and delete files using the "Shell" command. But
I always get the error "File Not Found".
How do I use DOS commands from Visual Basic?...
|
by: John Salerno |
last post by:
Hi all. I just installed Ubuntu and I'm learning how to use the bash
shell. Aside from the normal commands you can use, I was wondering if
it's possible to use Python from the terminal instead of...
|
by: Bin Chen |
last post by:
Hi,
I want to do following: get a user input regex, then pass this as a
parameter to grep, and then get the result from grep.
Any code snip to implement the similar function? I am a python...
|
by: Anastasios Hatzis |
last post by:
I'm looking for a pattern where different client implementations can use the
same commands of some fictive tool ("foo") by accessing some kind of API.
Actually I have the need for such pattern for...
|
by: Riccardo Maria Bianchi |
last post by:
Hello! :)
I'm trying to run shell commands both with os.system() and
subprocess.Popen() class.
But I can't run aliases or function defined in my .bashrc file, like in
the login interactive...
|
by: raocheng |
last post by:
Please see the following code.
Suppose I have many shell commands to be executed. And I don't want to
fork a sub shell for each command(eg: status,output =
commands.getstatusoutput(cmd)) because...
|
by: inetquestion |
last post by:
I am looking for a web interface for shell commands or shell scripts.
Does anyone know of any exexisting php scripts which would solve this
requirement?
PHP form accepts input from a user, then...
|
by: Samuel A. Falvo II |
last post by:
I have a shell script script.sh that launches a Java process in the
background using the &-operator, like so:
#!/bin/bash
java ... arguments here ... &
In my Python code, I want to invoke...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |