473,491 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to create console ?

How do I add a console to a graphical app?
Nov 21 '05 #1
8 2257
<guy> schrieb:
How do I add a console to a graphical app?


P/invoke on 'AttachConsole' (see Google and MSDN for more info).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
P/invoke, where is it ?
Nov 21 '05 #3
<guy> schrieb:
P/invoke, where is it ?


C# Programmer's Reference -- Platform Invoke Tutorial
<URL:http://msdn.microsoft.com/library/en-us/csref/html/vcwlkPlatformInvokeTutorial.asp>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #4
Errata:
C# Programmer's Reference -- Platform Invoke Tutorial
<URL:http://msdn.microsoft.com/library/en-us/csref/html/vcwlkPlatformInvokeTutorial.asp>


Sorry, wrong link...

Visual Basic Language Concepts -- Walkthrough: Calling Windows APIs
<URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconCallingWindowsAPIs.asp>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #5
I am a little confused why you sent me this link. I do know how to
use declare for ConsoleAlloc

Private Declare Function AllocConsole Lib "kernel32" () As Boolean

However I am not sure what is P/Invoke. I looked up P/Invoke in the msdn
and nothing comes up. Is it some sort of short hand notation / colloquialism
?

I do know that a Form has an Invoke method, is that what you mean?

Anyway, I tried to simply call ConsoleAlloc from Button1_click, and I
do get a console window, but Console.WriteLine is not recognisable
by the editor ?

Nov 21 '05 #6
<guy> schrieb:
I am a little confused why you sent me this link. I do know how to
use declare for ConsoleAlloc

Private Declare Function AllocConsole Lib "kernel32" () As Boolean

However I am not sure what is P/Invoke. I looked up P/Invoke in
the msdn and nothing comes up.
In the MSDN documentation, you'll find information about p/invoke under the
term "platform invoke" the list of topics (if you have the MSDN Library
installed locally).
I do know that a Form has an Invoke method, is that what you
mean?
That's something different. Platform invocation is (simplified) about
calling methods provided by the "platform" (in our case, Windows), either
through 'Declare' (in VB.NET) or 'DllImport' (in VB.NET and other .NET
programming languages).
Anyway, I tried to simply call ConsoleAlloc from Button1_click, and I
do get a console window, but Console.WriteLine is not recognisable
by the editor ?


Are you sure the 'System' namespace is imported?

<URL:http://www.google.de/groups?selm=uTwr3p7CDHA.2392%40TK2MSFTNGP11.phx.gb l>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #7
> In the MSDN documentation, you'll find information about p/invoke under
the
term "platform invoke" the list of topics (if you have the MSDN Library
installed locally).
In the context sensitive help of the installed msdn "p/invoke" does not
appear. Try typing p/ you will see.
Are you sure the 'System' namespace is imported?
System is imported. When I type in button1_click
console.
I get 'form1' in the suggested list of choosables.
When I try to do
dim a as new console, it doesn't accept it either.

<URL:http://www.google.de/groups?selm=uTw...FTNGP11.phx.gb
l>


This link doesn't compile
InitializeComponent() is undefined

Nov 21 '05 #8
Some progress... it works now, not sure why it didn't before.
Now there is a new problem, only read works, write doesn't.
Nov 21 '05 #9

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

Similar topics

8
12416
by: W.Davis | last post by:
Group, I'm using ver 5 with winXP. I can access the test database, but can't create a table. I can't create ANY database as I keep getting error 1044 (42000): Access denied for user: '...
1
1843
by: citytroop | last post by:
Hi I am creating a form for vieweing and editing faxes. I read the fax tiff file into the picturebox. And I have two problems: 1.I want to add a function for the users to be able to select an...
6
1918
by: Tomas Machala | last post by:
Hi, how can I create non-visual application in Visual Studio 2003? Theoretically I could just make windows form invisible but it's not much elegant. I've also tried to use console application but...
0
1102
by: richb330 | last post by:
Hi, I have code from the msdn to crate a user in an AD domain. I have set the code and changed the necessary parameters for the ldap queries but was wondering how i can execute this code on a...
2
2670
by: §iD` | last post by:
Hi! I would like to create a virtual folder (which I want to mount) and populate managing his content by a DLL or something like that in VB.NET (2.0). How can I acomplish this? Thanks to...
2
1615
by: Michael D. Ober | last post by:
Is there a way to create a System.Console from code. I periodically have a WinForms app that needs to open a console window for progress tracking. Thanks, Mike Ober.
4
31824
by: Chris | last post by:
Hi this time I am interested in console applications only. Now I need to create a simple .dll. How to do that? I am totally newbie in dll creation so be patient ;) I have searched internet but I...
27
3739
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
2
17692
by: Senthil | last post by:
Hi All I need to create an Excel report and create a command button and have to run a macro on the click event that will print all the pages in the Excel workbook. I am able to create the report...
1
2644
by: Tony Freixas | last post by:
Hello, I'm trying to create a wrapper for a program. I want to execute program 'X' by running program 'Y', such that 'Y' appears to function pretty much like 'X' both in the way command line...
0
7115
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
7154
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
7190
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...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.