How to create console ?

  • Thread starter Thread starter Guest
  • Start date Start date
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 ?
 
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/[email protected]>
 
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.

This link doesn't compile
InitializeComponent() is undefined
 
Some progress... it works now, not sure why it didn't before.
Now there is a new problem, only read works, write doesn't.
 

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