473,386 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

.NET 2.0 and AllocConsole

Ok, This is weird... I just love quirks with .NET 2.0

I create a Window Application in VS IDE 2005
I create a Console... via AllocConsole, all it fine
I create an application context, set the mainform to a form, for
'theContext'
I run the context via Application.Run(theContext)
The minute the Application.Run is done, all events that SHOULD go to
the Console window are blocked and seem to be routed to 'theContext'
mainform.

This does not happen in .NET 1.0, or 1.1.

Since the Console window is a user selectable item, if I do...

Do
DoEvents
Loop While (theMain.IsDisposed)

(Where theMain Closed Event calls Applicatiion.Exit of course)

The console events are NOT trapped and everything works as expected.

If not Console is open, just just call Application.Run(theContext) as
expected.

Anyone has any ideas on how to get events to an attached console to a
Windows application routed to the console window as expected?

Nov 27 '05 #1
0 1814

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Thomas Heller | last post by:
py2exe 0.6.1 released ===================== py2exe is a Python distutils extension which converts python scripts into executable windows programs, able to run without requiring a python...
11
by: objectref | last post by:
Hi to all, i have a window app and i want to display some info in a console window. I figured out (after a very long search...) how am i supposed to do it and i try using the following code. ...
12
by: Stefano Camaiani | last post by:
Hello, As i think, ther is no way to use ReadConsoleOutput and ReadConsoleOutPutCharacter with VB.Net or C#. Someone have some code for me? Please.... Stefano
7
by: Stefano Camaiani | last post by:
Hello, i need to find the STD_OUTPUT_HANDLE of a new process or a shelled process... I should not use standard redirections like MyProcess.StandardOutput.... I really need to find only this...
3
by: colmag | last post by:
I read in a previous post by Tom Shelton that you can call AllocConsole via p/invoke to allocate a console window to a form application. I've searched for info on how to do this, but have drawn a...
9
by: Dragon | last post by:
Hello all, I ran into trouble with GetStdHandle API. When I'm trying to get standard output with GetStdHandle(-11I), it returns strange values such as 1548, 1876. If I try to WriteConsole() into...
3
by: James | last post by:
I'm interested in learning C++. I'm not sure exactly what this means. I'm currently a VB.NET/C#.NET programmer (both Windows Forms and ASP.NET). I am totally clueless when it comes to C++. I've...
5
by: Selva Chinnasamy | last post by:
Hi I have a Windows application written in VB which has many functions. In addition it also reads a database and generates a output file. Currently this function is called when ever user clicks...
5
by: jacob navia | last post by:
One of the many questions asked by people is that even if they write into standard output, the output doesn't show in the screen. This happens in windows systems since quite a long time. To...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
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...
1
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...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.