我如何获得屏幕的大小
How do I get the size of the screen?
我想知道屏幕的宽度,以在win8应用中设置弹出窗口的宽度。
假设您是指屏幕的高度和宽度(或更准确的应用程序窗口的高度和宽度),您可以从window.bounds.bounds
中获取它例如,以下是一个按钮后面的代码,将在该窗口上的文本框中显示当前窗口的宽度:
void App68::MainPage::Button_Click_1(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
txtWidth->Text = Window::Current->Bounds.Width.ToString();
}
相关文章:
- 正在查找文档以获得PS4平台的C++中的设备信息
- 如何从C++中的依赖类型中获得它所依赖的类型
- 欧拉项目#8答案是大以获得有效答案
- 如何获得世界坐标屏幕(DX11,C )的射线方向
- 当光标锁定在屏幕中时,如何获得鼠标移动
- C 在Active Monitor上获得屏幕分辨率
- 我如何获得屏幕的大小
- 如何获得一个循环来在屏幕c++上转换输出
- 在java或UE4 c++中的三星Galaxy S7上获得真正的屏幕分辨率
- 为什么我的OpenGL引擎中没有从MyGUI获得任何屏幕输出
- 在没有 DirectX 的 Windows 上获得精确的屏幕刷新率
- 如何获得iPhone 6或6 Plus的确切屏幕尺寸
- SDL 2通过SpriteManager在屏幕上显示图像,获得指针中断
- 如何使用SDL2获得屏幕分辨率
- 如何获得其他附加显示器的屏幕分辨率
- Cinder:如何获得一个指针的数据帧生成,但从未显示在屏幕上
- 获得鼠标屏幕坐标点击
- Qt 5,获得鼠标在屏幕上的位置
- 我如何在屏幕上获得鼠标WM_MouseMove消息
- 可以为屏幕键盘获得物理键盘布局