| Console window for a Windows application in .NET |
| hour ٥:٠٠ ب.ظ day ۱۳۸٧/۳/٤ |
|
Have your ever felt the need to attach a Console window to your winform application? If this is what you want, here is a article just for you. I have not come across any possible way to show the Console window for a Windows application. So I tried my way with the help of Win32 API calls. Here is the list of APIs which will be needed: [DllImport("kernel32.dll")] [DllImport("kernel32.dll")] [DllImport("kernel32.dll")] [DllImport("kernel32.dll")] [DllImport("kernel32.dll", SetLastError = true)] //And here is the enumeration CharacterAttributes public enum CharacterAttributes private void Form1_Load(object sender, EventArgs e) private void Form1_FormClosing(object sender, CancelEventArgs e) //Put a button on the form and write the following code in to the Click event handler of the button. private void button1_Click(object sender, EventArgs e) //code ends here Check this out, and if this is not you expected, then put your comments. Reference : vaibhavgaikwad.wordpress.com
Keywords :tips & tricks ،Keywords :command prompt ،Keywords :console application ،Keywords :windows application
|
|
| Author |
| Archive |
| Last Posts |
| Categories |
| Links |
| SMS |
|
|
| Selective Feeds |
|
|


