开发者

Console apps like cmd edit

开发者 https://www.devze.com 2023-03-12 18:51 出处:网络
Is it possible to create console apps like the Edit app in CMD with visual basic or C#? I want the program to respond to mouse input, have menubar, mssgboxes and wind开发者_C百科ows.Yes, this is possi

Is it possible to create console apps like the Edit app in CMD with visual basic or C#? I want the program to respond to mouse input, have menubar, mssgboxes and wind开发者_C百科ows.


Yes, this is possible! Instead of doing it completely from scratch, check out Curses Sharp. It is a wrapper for the curses library, which helps in building applications like this.

I must admit though, I have never used it. Please let us know how it goes.


Console API provided with .NET is not suitable for that sort of development. You'll need to do lots of P/Invoke to the platform console API. I would really suggest WinForms/WPF if you need GUI.

If you really want to do it anyway, you'll need to implement low level mouse/keyboard hooks. This will get you started: http://blogs.msdn.com/b/toub/archive/2006/05/03/589468.aspx


If you want it to run on DOS, you can't (because C#/vb.net don't run on DOS). If you want it to run on Windows, I think you're better off using Windows Forms or WPF.

To answer your question; it is probably possible but it would take an enormous amount of work and for the above reasons I don't think it would have any payoff.

0

精彩评论

暂无评论...
验证码 换一张
取 消