Ubuntu中的Mono winforms应用全屏显示吗? [英] Mono winforms app fullscreen in Ubuntu?

查看:86
本文介绍了Ubuntu中的Mono winforms应用全屏显示吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想知道是否存在使Mono System.Windows.Forms应用程序在Ubuntu/Gnome上全屏显示的已知方法.

Just wondering if there's a known way of getting a Mono System.Windows.Forms application to go fullscreen on Ubuntu/Gnome.

单声道为2.4.2.3 Ubuntu是9.10

Mono is 2.4.2.3 Ubuntu is 9.10

在Windows上执行此操作需要输入密码,显然在这里是行不通的.

Doing it on Windows requires a pinvoke, clearly not going to work here.

这是我将窗口边框设置为无,窗口位置设置为中心,并设置为最大化的状态:

This is what I get setting window border to none, window position to centre, and state to maximised:

替代文本http://dl.dropbox.com/u/116092/misc /permalink/joggler/screenshot01.png

更新.

也尝试过:

  • this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
    this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

  • this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
    this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

CTRL-F11

文本= string.Empty; //没有标题
MaximizeBox = false;
MinimizeBox = false;
ControlBox =假;
FormBorderStyle =无;
WindowState =最大化;

Text = string.Empty; // No caption
MaximizeBox = false;
MinimizeBox = false;
ControlBox = false;
FormBorderStyle = None;
WindowState = Maximized;

FormBorderStyle = FormBorderStyle.None;
位置=新点(0,0);
大小= Screen.PrimaryScreen.Bounds.Size;

FormBorderStyle = FormBorderStyle.None;
Location = new Point(0, 0);
Size = Screen.PrimaryScreen.Bounds.Size;

所有这些我最终都得到相同的结果.

All of which I end up with the same result.

我遇到过一个牵涉到涉及_NET_WM_STATE_FULLSCREEN的pinvoke的线索,但据我所知.对此的任何指示将不胜感激.

I have come across a lead which involves a pinvoke involving _NET_WM_STATE_FULLSCREEN but that's as far as I've got with it. Any pointers on that would be appreciated.

推荐答案

_NET_WM_STATE_FULLSCREEN只会摆脱边界. GNOME面板仍会出现.

_NET_WM_STATE_FULLSCREEN will just get rid of the borders. The GNOME panel will still appear.

根据以下文章,秘诀是摆脱最小/最大尺寸,以便窗口管理器自行调整大小:

According to the following post, the secret is to get rid of the minimum/maximum sizes so that the window manager does the resizing itself:

http://linux.derkeiler.com/Mailing -Lists/GNOME/2010-01/msg00035.html

以下是有关本机规范的一些文档:

Here is some documentation on the native spec:

http://standards.freedesktop.org/wm-spec /wm-spec-latest.html

http://www.x.org/docs/ICCCM/icccm.pdf

要直接与X Window系统对话,您必须将其固定到XLib中.为了发送类似_NET_WM_STATE_FULLSCREEN的内容,您必须具有指向窗口以及显示的指针.

To talk directly to the X Window System you have to pinvoke into XLib. In order to send something like _NET_WM_STATE_FULLSCREEN you have to have a pointer to the window and also to the display.

我不确定如何找到显示内容,但是我可以帮助您找到指向窗口的指针.在X上运行时,属性Form.Handle应该是指向X窗口的指针.

I am not sure how to find the display but I can help with a pointer to the window. When running on X, the property Form.Handle should be a pointer to the X window.

这篇关于Ubuntu中的Mono winforms应用全屏显示吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆