Hi,
I think I've tried everything I can without success. I want to bundle an
application that can run unattended or not. That's means it can behave like
a normal window application or a command line one i.e. with a standard
input, output and error.
If I make a console application, I can't seem to be able to get rid of the
console window by any means. Anyway, it would probably popup in "window
mode" since it has to execute a bit before being hidden and that would be
kind of ugly.
If I make a window application, I don't have standard streams. I've been
trying to find the process that started me to see if I could use its
standard streams. I don't know if it's even possible!
If it is, can someone show me some pointers? If not, any alternative besides
having two executable?
Thanks!
Eric Robert 6 2751
You can rid of console using SetParent (Win32 api) with HWND_MESSAGE
parameter.
Check both in Platform SDK.
Tested and works
HTH
Alex
"Eric Robert" <sy******@spam.hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hi, I think I've tried everything I can without success. I want to bundle an application that can run unattended or not. That's means it can behave
like a normal window application or a command line one i.e. with a standard input, output and error. If I make a console application, I can't seem to be able to get rid of the console window by any means. Anyway, it would probably popup in "window mode" since it has to execute a bit before being hidden and that would be kind of ugly. If I make a window application, I don't have standard streams. I've been trying to find the process that started me to see if I could use its standard streams. I don't know if it's even possible! If it is, can someone show me some pointers? If not, any alternative
besides having two executable?
Thanks!
Eric Robert
Sorry but this is not what I want. The console window isn't my child window.
It "could" be my parent (if only I could find how to know that...). But your
suggestion is to hide the child window. This makes no sense...
"AlexS" wrote: You can rid of console using SetParent (Win32 api) with HWND_MESSAGE parameter. Check both in Platform SDK.
Tested and works HTH Alex
"Eric Robert" wrote: Hi, I think I've tried everything I can without success. I want to bundle an application that can run unattended or not. That's means it can behave like a normal window application or a command line one i.e. with a standard input, output and error. If I make a console application, I can't seem to be able to get rid of
the console window by any means. Anyway, it would probably popup in "window mode" since it has to execute a bit before being hidden and that would
be kind of ugly. If I make a window application, I don't have standard streams. I've been trying to find the process that started me to see if I could use its standard streams. I don't know if it's even possible! If it is, can someone show me some pointers? If not, any alternative besides having two executable?
Thanks!
Eric Robert
Just to clarify things. If you create a C# window application and change it
to console after (via the property menu), you have 2 windows poping up - one
is the console and the other is the form. If I put a button and break in it,
I see only one thread. If I look at both windows, the form isn't responding
(that's fine) and the other behave normaly. So, they must be in separate
process... right? I don't see how it could be otherwise.
So, it can't be my parent window. It is my "parent" process's window. And it
is those streams that I'm after!
Eric Robert Sorry but this is not what I want. The console window isn't my child
window. It "could" be my parent (if only I could find how to know that...). But
your suggestion is to hide the child window. This makes no sense...
"AlexS" wrote: You can rid of console using SetParent (Win32 api) with HWND_MESSAGE parameter. Check both in Platform SDK.
Tested and works HTH Alex
"Eric Robert" wrote: Hi, I think I've tried everything I can without success. I want to bundle
an application that can run unattended or not. That's means it can behave like a normal window application or a command line one i.e. with a standard input, output and error. If I make a console application, I can't seem to be able to get rid of the console window by any means. Anyway, it would probably popup in
"window mode" since it has to execute a bit before being hidden and that would be kind of ugly. If I make a window application, I don't have standard streams. I've
been trying to find the process that started me to see if I could use its standard streams. I don't know if it's even possible! If it is, can someone show me some pointers? If not, any alternative besides having two executable?
Thanks!
Eric Robert
Eric,
just try the suggestion. To understand what's going on and who's whose child
you might need to read Platform SDK docs on consoles. It's very different
type of beast than standard forms. Console class in .Net exposes some of
properties of this beast, but not all of them. That's why to do this trick
you have to use SetParent. You can forget about child windows...
I suggested this because it works for me - I can hide/show console at will,
control its size and location, colors etc. and make it my child window
HTH
Alex
"Eric Robert" <sy******@spam.hotmail.com> wrote in message
news:ex**************@TK2MSFTNGP11.phx.gbl... Just to clarify things. If you create a C# window application and change
it to console after (via the property menu), you have 2 windows poping up -
one is the console and the other is the form. If I put a button and break in
it, I see only one thread. If I look at both windows, the form isn't
responding (that's fine) and the other behave normaly. So, they must be in separate process... right? I don't see how it could be otherwise.
So, it can't be my parent window. It is my "parent" process's window. And
it is those streams that I'm after!
Eric Robert
Sorry but this is not what I want. The console window isn't my child window. It "could" be my parent (if only I could find how to know that...). But your suggestion is to hide the child window. This makes no sense...
"AlexS" wrote: You can rid of console using SetParent (Win32 api) with HWND_MESSAGE parameter. Check both in Platform SDK.
Tested and works HTH Alex
"Eric Robert" wrote: > Hi, > > > > I think I've tried everything I can without success. I want to
bundle an > application that can run unattended or not. That's means it can
behave like > a normal window application or a command line one i.e. with a
standard > input, output and error. > > > > If I make a console application, I can't seem to be able to get rid
of the > console window by any means. Anyway, it would probably popup in "window > mode" since it has to execute a bit before being hidden and that
would be > kind of ugly. > > > > If I make a window application, I don't have standard streams. I've been > trying to find the process that started me to see if I could use its > standard streams. I don't know if it's even possible! > > > > If it is, can someone show me some pointers? If not, any alternative besides > having two executable? > > > > > Thanks! > > > > > Eric Robert > >
Well, I've tried to use that function... And I have look in the Platform SDK
but maybe you're right and I have miss something. I just wish I'd know what
;-)
Thanks anyway!
Eric Eric,
just try the suggestion. To understand what's going on and who's whose
child you might need to read Platform SDK docs on consoles. It's very different type of beast than standard forms. Console class in .Net exposes some of properties of this beast, but not all of them. That's why to do this trick you have to use SetParent. You can forget about child windows...
I suggested this because it works for me - I can hide/show console at
will, control its size and location, colors etc. and make it my child window
HTH Alex "Eric Robert" <sy******@spam.hotmail.com> wrote in message news:ex**************@TK2MSFTNGP11.phx.gbl... Just to clarify things. If you create a C# window application and change it to console after (via the property menu), you have 2 windows poping up - one is the console and the other is the form. If I put a button and break in it, I see only one thread. If I look at both windows, the form isn't responding (that's fine) and the other behave normaly. So, they must be in separate process... right? I don't see how it could be otherwise.
So, it can't be my parent window. It is my "parent" process's window.
And it is those streams that I'm after!
Eric Robert
Sorry but this is not what I want. The console window isn't my child window. It "could" be my parent (if only I could find how to know that...).
But your suggestion is to hide the child window. This makes no sense...
"AlexS" wrote: > You can rid of console using SetParent (Win32 api) with HWND_MESSAGE > parameter. > Check both in Platform SDK. > > Tested and works > HTH > Alex > > "Eric Robert" wrote: > > Hi, > > > > > > > > I think I've tried everything I can without success. I want to bundle an > > application that can run unattended or not. That's means it can behave > like > > a normal window application or a command line one i.e. with a standard > > input, output and error. > > > > > > > > If I make a console application, I can't seem to be able to get
rid of the > > console window by any means. Anyway, it would probably popup in "window > > mode" since it has to execute a bit before being hidden and that would be > > kind of ugly. > > > > > > > > If I make a window application, I don't have standard streams.
I've been > > trying to find the process that started me to see if I could use
its > > standard streams. I don't know if it's even possible! > > > > > > > > If it is, can someone show me some pointers? If not, any
alternative > besides > > having two executable? > > > > > > > > > > Thanks! > > > > > > > > > > Eric Robert > > > > > >
Maybe try system tray? and not basing code in a form but instead in a class
instantiated by the Main method?
--
Eric Newton
C#/ASP Application Developer er**@cc.ensoft-software.com [remove the first "CC."]
"Eric Robert" <sy******@spam.hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hi, I think I've tried everything I can without success. I want to bundle an application that can run unattended or not. That's means it can behave
like a normal window application or a command line one i.e. with a standard input, output and error. If I make a console application, I can't seem to be able to get rid of the console window by any means. Anyway, it would probably popup in "window mode" since it has to execute a bit before being hidden and that would be kind of ugly. If I make a window application, I don't have standard streams. I've been trying to find the process that started me to see if I could use its standard streams. I don't know if it's even possible! If it is, can someone show me some pointers? If not, any alternative
besides having two executable?
Thanks!
Eric Robert
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dmitry |
last post by:
Hi folks!
I need to find a way to switch to a different Unix user from within
the Perl script that is currently ran unattended. Script must switch
user in order to execute proper profile for...
|
by: J. Baute |
last post by:
I'm caching data in the Application object to speed up certain pages on a website
The main reason is that the retrieval of this data takes quite a while (a few seconds) and fetching the same data...
|
by: ACI |
last post by:
Auto Close Idle helps you utilize your multi-user concurrent users licenses
more efficiently. It closes unattended clients remotely after a certain
period of time or manually. Furthermore, clients...
|
by: Amit Dedhia |
last post by:
Hi
I am developing a Dot net application (involving image processing) on
a uni processor. It works well on my machine. I then take all my code
on a multi processor, build and run the application...
|
by: Soren Mikkelsen |
last post by:
Dear all,
I am not sure this is the right forum so please bare with me that I've
posted the same on fora:
microsoft.public.dotnet.faq
microsoft.public.dotnet.framework.setup...
|
by: 28tommy |
last post by:
Hi,
I'm trying to automate an installation of some SW that is installed on
Windows (you know - 'Start' ==> 'Next' ==> 'Next' ==> 'Finish' kind of
installation). Is ther any way to perform that...
|
by: steveeisen |
last post by:
I'm a long-time VB6 programmer in a shop that is mostly moving to VB
..NET 2005. And I'm confused about coding the start of solutions for
unattended operations.
Much of what I write is old-time...
|
by: sp |
last post by:
I am looking for a files .net 1.1 .net 2.0 .net 3.0 that can I integrate
with Windows XP installation CD for unattended install.
I am looking for an patches for it also.
|
by: =?Utf-8?B?Q29saW4gQmFrZXI=?= |
last post by:
Hi,
I recently read an article (and video) on MSDN about making a Windows Mobile
device enter unattended mode instead of suspended mode when the the
standby/power button is pressed. This allows...
|
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: 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: 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: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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: 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...
| |