简体   繁体   中英

cosmos show windows form on console screen in C#

In cosmos, is there any way that I can show a window form on the console screen? If this is possible, will you please show me how to do this in C#?

Inside your console i think you can't. But you can open a form.

References/Assemblies/Framework find System.Windows.Forms

add to namespace :

using System.Windows.Forms;

and

Application.Run(new Form());

WinForms in Cosmos is definitely not possible even in the latest devkit. You'd need to code a VGA/VBE driver yourself, plug System.Drawing, and plug WinForms' backend to work with your driver and the rest of Cosmos.

Even then, displaying forms would be pretty slow, and you wouldn't have breathing room because VGA doesn't support anything above 640x480 as I recall (in cosmos that is), and VBE, 1280x1024 is the max IIRC.

In a while when graphics mature a bit more and work a lot more like FAT (create the driver then register it with a manager), I'll definitely port either WinForms or GTK# over.

在Cosmos OS中,您无法打开Windows表单,因为Cosmos OS在操作系统中没有Windows API。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM