delphi 设置多屏幕
//poScreenCenter时,窗体会显示到主显示器的中央
MainForm.Position := poScreenCenter;
function TGAEAMainForm.GetWorkArea(var R : TRect) : Boolean;
var
I : Integer;
begin
Result := False;
for I := 0 to Screen.MonitorCount -1 do
if Screen.Monitors[I].Primary then
begin
R := Screen.Monitors[I].WorkareaRect;
Result := True;
Break;
end;
end;
procedure TGAEAMainForm.TempInitForm;
procedure SetFormMonitor(Form:TCustomForm;MonitorIndex:integer);
begin
if (MonitorIndex>-1) and (MonitorIndex<Screen.MonitorCount) then //保证屏幕索引在范围内
begin
Form.Left := 0;
Form.Top := 0;
Form.SetBounds(Screen.Monitors[MonitorIndex].Left + ((Screen.Monitors[MonitorIndex].Width - Form.Width) div 2),Screen.Monitors[MonitorIndex].Top + ((Screen.Monitors[MonitorIndex].Height - Form.Height) div 2),Form.Width, Form.Height);
end;
end;
function GetPriMaryScreenIndex: Integer;
var
I : Integer;
begin
for I := 0 to Screen.MonitorCount -1 do
if Screen.Monitors[I].Primary then
begin
Result := I;
Break;
end;
end;
var
vR: TRect;
vPrimaryIndex: Integer;
begin
vPrimaryIndex := GetPriMaryScreenIndex;
if vPrimaryIndex <> -1 then
SetFormMonitor(MainForm, vPrimaryIndex);
// if GetWorkArea(vR) then
// begin
// MainForm.Left := vR.Left;
// MainForm.Top := vR.Top;
// end;
end;
delphi 设置多屏幕的更多相关文章
- delphi 在桌面屏幕上模拟鼠标单击
delphi 在桌面屏幕上模拟鼠标单击 procedure TFrmUnicom.Button1Click(Sender: TObject); var oldPoint, newPoint: TPoi ...
- iOS 设置系统屏幕亮度
// 设置系统屏幕亮度 // [UIScreen mainScreen].brightness = value; // 或者 [[UIScreen mainScreen] se ...
- delphi 窗体自适应屏幕分辨率
delphi 窗体自适应屏幕分辨率 这是个困惑我很长时间的问题,到今天终于得到解决了. 话说Delphi有个很强的窗体设计器,这一点让VC粉丝垂涎三尺而不可得.但是,Delphi里设计的窗体并没有自动 ...
- android 设置系统屏幕亮度
/** * 获得当前屏幕亮度的模式 * SCREEN_BRIGHTNESS_MODE_AUTOMATIC=1 为自动调节屏幕亮度 * SCREEN_BRIGHTNESS_MODE_MANUAL=0 为 ...
- 【转载】51CTO-Android设置模拟器屏幕大小
在Eclipse Android中设置模拟器屏幕大小是本文要介绍的内容,主要是来了解并学习Eclipse Android中模拟器的设置,具体关于Eclipse Android内容的详解来看本文. ...
- 用delphi写多屏幕程序
http://blog.csdn.net/zyyjc/article/details/6530728 别现在有些POS机是双屏幕的(比如卡西瓦POS机),一个屏幕可以当顾客显示屏用,当闲时也可以显示一 ...
- 在Eclipse Android中设置模拟器屏幕大小
在Eclipse Android中设置模拟器屏幕大小是本文要介绍的内容,主要是来了解并学习Eclipse Android中模拟器的设置,具体关于Eclipse Android内容的详解来看本文. 方法 ...
- DELPHI设置枚举类型size
delphi枚举类型长度默认为2个字节(单字),而在C中枚举为4个字节(双字),如果需要跨这两个平台编程,传输结构时会由于数据长度不一造成灾难. 经过查找资料,原来delphi可以通过{$Z+} {$ ...
- Android Toast 设置到屏幕中间,自定义Toast的实现方法,及其说明
http://blog.csdn.net/wangfayinn/article/details/8065763 Android Toast用于在手机屏幕上向用户显示一条信息,一段时间后信息会自动消失. ...
随机推荐
- nginx 服务脚本编写模板
编写nginx服务脚本:脚本内容如下: [root@www ~]# cat /etc/init.d/nginx #!/bin/bash # nginx Startup script for the N ...
- python的paramiko模块
paramiko是用python语言写的一个模块,遵循SSH2协议,支持以加密和认证的方式,进行远程服务器的连接.paramiko支持Linux, Solaris, BSD, MacOS X, ...
- linux后台执行./run.py提示python syntax error near unexpected token `('
python脚本中的#!/usr/bin/python 估计有不少人注意过一些python脚本开头有这么行东东: #!/usr/bin/python 它是用来干嘛的?貌似没有它对脚本功能也没啥 ...
- Codeforces 1101F Trucks and Cities dp (看题解)
Trucks and Cities 一个很显然的做法就是二分然后对于每个车贪心取check, 这肯定会TLE, 感觉会给人一种贪心去写的误导... 感觉有这个误导之后很难往dp那个方向靠.. dp[ ...
- gitlab之三: gitlab邮件通知的配置
参考 : https://www.cnblogs.com/lovelinux199075/p/9072265.html gitlab 添加新用户后,会自动发送邮件到填写的邮箱. 实验版本: 11. ...
- 蓝桥杯 跳蚱蜢 (bfs)
转载自:https://blog.csdn.net/wayway0554/article/details/79715658 本题的解题关键就在于将蚱蜢在跳转换为盘子在跳. 当使用string当做每一个 ...
- JavaEE 之 Spring Data JPA
1.事务 a.事务的关键属性(ACID) ①原子性(atomicity):事务的原子性确保动作要么全部完成,要么完全不起作用 ②一致性(consistency):一旦所有事务动作完成,事务就被提交.也 ...
- TF之AE:AE实现TF自带数据集AE的encoder之后decoder之前的非监督学习分类—Jason niu
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt #Import MNIST data from t ...
- 解决ant Design dva ajax跨越请求 (status=0)
今天实现了antd作为前端展现,python flask作为后端的数据填充,完全两个独立的服务:过程中遇到ajax跨越请求问题,导致status一直等于0,原来是这么写的: xmlhttp.open( ...
- SpringBoot使用WebFlux响应式编程操作数据库
这一篇文章介绍SpringBoot使用WebFlux响应式编程操作MongoDb数据库. 前言 在之前一篇简单介绍了WebFlux响应式编程的操作,我们在来看一下下图,可以看到,在目前的Spring ...