简体   繁体   English

cosmos在C#的控制台屏幕上显示Windows窗体

[英]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#? 如果可以,请您告诉我如何在C#中执行此操作?

Inside your console i think you can't. 在您的控制台内,我认为您不能。 But you can open a form. 但是您可以打开一个表单。

References/Assemblies/Framework find System.Windows.Forms 参考/装配体/框架查找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. 即使在最新的devkit中,绝对不可能在Cosmos中使用WinForms。 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. 您需要自己编写一个VGA / VBE驱动程序,插入System.Drawing,然后插入WinForms的后端才能与您的驱动程序和其他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. 即使那样,显示表单的速度仍然很慢,并且您将没有喘息的空间,因为我记得(在宇宙中)VGA不支持640x480以上的任何内容,在VBE中,最大IIRC为1280x1024。

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. 过一段时间,当图形变得更加成熟并且像FAT一样工作(创建驱动程序,然后向管理器注册)时,我肯定会移植WinForms或GTK#。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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