firemonkey 得到屏幕信息
type
TO_MONITOR = class
hm: HMONITOR;
end; function EnumMonitorsProc(hm: HMONITOR; dc: HDC; r: PRect; Data: Pointer): Boolean; stdcall;
var
L: TList;
M: TO_MONITOR;
begin
L := TList(Data);
M := TO_MONITOR.Create;
M.hm:= hm;
L.Add(M);
Result := True;
end; procedure TFormVedio.FormShow(Sender: TObject);
var
FMonitors: Tlist;
l_Handle: HMONITOR;
rect: trect;
MonInfo: TMonitorInfo;
begin
FMonitors := TList.Create;
EnumDisplayMonitors(0, nil, @EnumMonitorsProc, LongInt(FMonitors));
MonInfo.cbSize := SizeOf(MonInfo);
GetMonitorInfo(1, @MonInfo);
rect := MonInfo.rcMonitor;
if FMonitors.Count > 1 then
self.SetBounds(rect.Left, rect.Top, rect.Width, rect.Height);
FMonitors.Free;
end;
//从D7的VCL源码中提取的
firemonkey 得到屏幕信息的更多相关文章
- [Swift实际操作]七、常见概念-(13)使用UIScreen查询设备屏幕信息
本文将为你演示,如何获得设备的屏幕信息,了解设备的屏幕尺寸等信息,才能做出适配性更好的应用程序. 首先导入需要使用到的界面工具框架 import UIKit 然后通过UIScreen类,就可以获得设备 ...
- js----Navigator对象,查看浏览器信息,Screen对象,查看屏幕信息
Navigator对象 Navigator 对象包含有关浏览器的信息,通常用于检测浏览器与操作系统的版本. 对象属性: 查看浏览器的名称和版本,代码如下: <script type=" ...
- JS window对象 screen对象 screen对象用于获取用户的屏幕信息。 语法: window.screen.属性
screen对象 screen对象用于获取用户的屏幕信息. 语法: window.screen.属性 对象属性:
- Android屏幕信息获取
Android中有时需要获取屏幕的size信息以便对控件位置进行动态控制,最近做了一些研究,现在将获取屏幕大小信息的方法总结如下,可能存在一些地方理解的不全面. 1.getMetrics Displa ...
- Android笔记:获取屏幕信息
像素密度(dpi) float xdpi = getResources().getDisplayMetrics().xdpi;float ydpi = getResources().getDispla ...
- Android开发之获取设备的屏幕信息和px dp之间的转换
DisplayMetrics metric = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metr ...
- screen获取屏幕信息
<script type="text/javascript" language="javascript"> document.write(" ...
- Qt 获取屏幕信息
void GetScreenInfo() { QDesktopWidget* desktopWidget = QApplication::desktop(); //获取可用桌面大小 QRect des ...
- firemonkey 手机屏幕自适应程序问题
我是新手.在我才学了2个星期的时候,那个白痴老板说什么手机屏幕自适应程序,我当时不能理解呀,觉得用Delphi的布局设计不就行了吗.结果他说:我就是想让控件内容什么的放在小屏幕手机上也不出来.我就说, ...
随机推荐
- yii 数据库迁移
在我们开发程序的过程中,数据库的结构也是不断调整的.我们的开发中要保证代码和数据库库的同步.因为我们的应用离不开数据库.例如: 在开发过程中,我们经常需要增加一个新的表,或者我们后期投入运营的产品,可 ...
- python的内存管理机制 图解+Django Web开发学习笔记
http://www.cnblogs.com/CBDoctor/p/3781078.html http://www.cnblogs.com/vamei/p/3232088.html http://bl ...
- java_Cookies_1_商品浏览历史记录servlet2
public class CookiesServlet2 extends HttpServlet { // 显示商品详细信息 public void doGet(HttpServletRequest ...
- SerialPort基本小例
SerialPort是用于串口通信的控件与VB6中的MSCOMM控件相似,使用很方便... vb.net CodeImports System.IO.PortsImports System.TextP ...
- 从Eclipse里导出Android程序到手机里
参考自:http://wenku.baidu.com/view/e28bb57c1711cc7931b716a7.html
- (转)fastdfs group通过添加硬盘扩容
通过给group的机器添加硬盘的方式,实现某个group的扩容. fastdfs在一台服务器支持多个store_path,每个store_path指向一个存储路径.url “M00/3F/E1/oYY ...
- mapping 详解3(Meta-Fields)
文档标识相关元数据字段 _index 当执行多索引查询时,可能需要添加特定的一些与文档有关联的索引的子句. _index 字段可以用在 term.terms 查询,聚合(aggregations)操作 ...
- 基于 JQUERY 网页 banner
demo.html <html> <head> <title>demo</title> <link href="css/PaPaBann ...
- JDBC入门try/catch型
package com.itheima.domain; import java.sql.Connection; import java.sql.DriverManager; import java.s ...
- JAXB - Annotations, Type Mapping: XmlSchemaType
The annotation XmlSchemaType defines a mapping between an arbitrary Java type and a simple schema bu ...