start new, end old, keep new

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,

i have 2 winclient .EXEs; how do i start the 1st exe just to call the 2nd
exe and let the 1st exe stop running altogether but let the 2nd exe continue
running?

thanks,
rodchar
 
rodchar said:
i have 2 winclient .EXEs; how do i start the 1st exe just to call the 2nd
exe and let the 1st exe stop running altogether but let the 2nd exe
continue
running?

\\\
Shell("C:\App2.exe")
Me.Close()
///
 
Pipo said:
Do you also know how to do this in C#??

Notice that this is a VB.NET group and thus C# questions are off-topic here.
The C# group's name is microsoft.public.dotnet.languages.csharp. C#
solution:

\\\
using System.Diagnostics;
..
..
..
Process.Start(@"C:\foo.exe");
this.Close();
///
 
Pipo,

I would not believe that Herfried would give this answer as he did, normal
he says that this is not a C# newsgroup, so now I am as well alowed in my
opinion :-)

To give it exact as you asked, set in C# a reference to the
Microsoft.VisualBasic Net runtime and than this code.

\\\\
Microsoft.VisualBasic.Interaction.Shell
("@C:\App2.exe",Microsoft.VisualBasic.AppWinStyle.NormalFocus,false,-1);
this.Close();
///

However better is it to take the last answer from Herfried, that you can use
in VBNet as well by the way.

\\\\
Imports System.Diagnostics
..
Process.Start("C:\foo.exe")
me.Close()
///

I hope this helps?

:-)

Cor
 
Pipo,

Before it is understand wrong. He says normally "what has that for sense is
VBNet not much better" or something, I was sure he would give the C# answer
as he did now.

Cor
 
so at this point the 1st exe is no longer taking up resources anywhere,
correct?
 
rodchar said:
so at this point the 1st exe is no longer taking up resources anywhere,
correct?

If the process is terminated (which means you cannot see it any more in task
manager), it won't take up resources any more.
 
thanks again.

Herfried K. Wagner said:
If the process is terminated (which means you cannot see it any more in task
manager), it won't take up resources any more.
 
Henfried K. Wagner,

I know this is a VB.NET group.
But in my company it's 'forbidden' to use the 'old' VB6 syntax.
We have to code .NET and not to the reference of the VB6 syntax.
So that's why I asked you how it would be in C# ;->
All the functions in the VisualBasic libary have a .NET equivalent.
So I was just wondering what the .NET sysntax would be.

Many thanks for answering my question, although off topic
 
Hi Cor,

Thanks for the answer.
(No way I would ever reference the VisualBasic libary)
 
Hi Cor,

hahaha that discussion will never die, I'm affraid!! :-)
But you're correct, Cor, he did helped me great.

Many thanks to the both of you.
 
Pipo,

Pipo said:
But in my company it's 'forbidden' to use the 'old' VB6 syntax.
We have to code .NET and not to the reference of the VB6 syntax.
So that's why I asked you how it would be in C# ;->

LOL! Another company that wants people to write VB.NET code without using
VB.NET...
All the functions in the VisualBasic libary have a .NET equivalent.

What are the equivalents of 'AppActivate', 'Beep', 'InputBox', 'IIf',
'ControlChars', the financial functions, ...?
Many thanks for answering my question, although off topic

No problem :-).
 
Pipo said:
Thanks for the answer.
(No way I would ever reference the VisualBasic libary)

Gladly the reference to "Microsoft.VisualBasic.dll" cannot be removed...
:-).
 
Herfried K. Wagner,

I do believe that if you use the Visual Basic libary you are ' wanne be'
programming VB.NET, using the VB6 syntax.

The equivalents?
if there aren't any make them yourself ...

appactivate = System.Windows.Form.Activate or api call
inputbox, IIF make them yourself....
ControlChars??

Beep:
Console.WriteLine("\a"); // bell (for C# console)
OR
[DllImport("kernel32.dll")]
private static extern bool Beep(int freq, int dur);
Beep(3000, 200);

etc, etc..
No need for the old library....I didnt say it was the EASIEST way....!
 
Herfried K. Wagner,

This was refering to the C# solution of Cor, he suggested to reference the
Visual Basic library in a C#, red.
 
LOL! Another company that wants people to write VB.NET code without using
VB.NET...
I do believe that the VisualStudio library is there for backwords
compatibilty
And to make the learing curve for VB6 programmers to VB.NET smaller.
 
Pipo,
This was refering to the C# solution of Cor, he suggested to reference the
Visual Basic library in a C#, red.

I did absolutly not, I gave you an exact answer on your question, how to do
the code showed by Herfried in C# and told with that, that it is beter not
to use that.

(While I see not any reason to use that Shell from the time of the first
free with MS-Dos delivered Ms-Basic).

Please do not quote me incorrect?

Cor
 
Pipo,
I do believe that if you use the Visual Basic libary you are ' wanne be'
programming VB.NET, using the VB6 syntax.

No you are using a language, try to use from English only the Germanic kind
of words. You will see what a poor and strange language it will become.

English is a modern language that in contrast with a language as Dutch is
slowly accepting new words. An important reason for that is the wide spread
use of it, however English does, there disapear as well (for the same reason
slowly) words from the language.

And that is the same with VBNet

Just my thought,

Cor
 

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

Back
Top