社区
Delphi
帖子详情
怎样初始化一个二维结构数组常量?如Shape : Array[0..9,0..9] of TPoint = (???);
chen_jianxiong
2002-09-18 08:18:05
怎样初始化一个二维结构数组常量?如Shape : Array[0..9,0..9] of TPoint = (???);我想定义一个二维数组常量,数组中的值是点,怎样初始化?
...全文
96
6
打赏
收藏
怎样初始化一个二维结构数组常量?如Shape : Array[0..9,0..9] of TPoint = (???);
怎样初始化一个二维结构数组常量?如Shape : Array[0..9,0..9] of TPoint = (???);我想定义一个二维数组常量,数组中的值是点,怎样初始化?
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
CHENGXB
2002-09-19
打赏
举报
回复
99523193
chen_jianxiong
2002-09-19
打赏
举报
回复
Thanks。Would you like to tell me your QQ?
CHENGXB
2002-09-18
打赏
举报
回复
Shape:Array[0..2,0..1] of Tpoint=(
((x:1;y:1),(x:1;y:1)),
((x:1;y:1),(x:1;y:1)),
((x:1;y:1),(x:1;y:1)));
blazingfire
2002-09-18
打赏
举报
回复
靠!慢了几分钟!
blazingfire
2002-09-18
打赏
举报
回复
const
Arry:array[0..2,0..1]of char=(('a','b'),('c','a'),('b','c'));
liang_z
2002-09-18
打赏
举报
回复
a : array[0..2,0..2]of integer=((0,0,1),(0,0,1),(0,0,1));
Delphi版华容道游戏.rar
Delphi华容道游戏源码,人物取材于三国传,在DELPHI7下编译通过,Position:
array
[0..9,0..1] of integer; //用于保存或设置每个Images组件的Left和Top属性 WidthHeight:
array
[0..9,0..1] of integer; //用于保存每个Images组件的宽度和高度 Images:
array
[0..9] of TImage;//TImage
数组
PrepareMove:Boolean; //用于显示是否准备移动 Moveward:TDragWord; //移动方向 BeginPosition:T
Point
; //用户拖动Images组件时的起始位置 Procedure ImagesMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Procedure ImagesMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Function InvalidMove(X:integer;Y:Integer;ButtonNumber:integer):Boolean;//判断是否允许用户的拖动
使用Delphi实现票据精确打印
一、概述 在银行,税务,邮政等行业的实际工作中,经常涉及到在印刷好具有固定格式的汇款单,储蓄凭证, 税票等单据上的确定位置打印输出相关的信息。在此类需求中,精确地定位单据并打印相关信息, 是解决问题的关键。一般情况下,开发者都是通过在打印机上通过重复的测试来达到实际需求。 那么,有没有简单有效而又灵活的方法实现上述功能呢?
delphi10.1通过SendInput模拟鼠标移动点击的示例
delphi10.1通过SendInput模拟鼠标移动点击的示例,给初学者的
Delphi 实现图像热点功能.rar
Delphi 实现图像热点功能,实现一张图片上不同形状区域的热点,定义椭圆形、四边形、三角形的区域变量的热点,相关代码如下: var the
point
:
array
[1..8] of t
point
;//存储多边形顶点坐标 count:integer;
point
num:
array
[1..2] of integer; begin //四边形顶点坐标,首末点封闭 the
point
[1]:=
point
(135,99); the
point
[2]:=
point
(105,183); the
point
[3]:=
point
(129,201); the
point
[4]:=
point
(188,92); the
point
[5]:=
point
(135,99); count:=5;//四边形顶点数目,首末点为一点 fourE_rgn:=CreatePolygonRgn(the
point
,count,WINDING);//生成四边形区域 elli_rgn:=CreateEllipticRgn(64,221,231,263);// 生成椭圆形区域 //第一个三角形顶点坐标 the
point
[1]:=
point
(118,67); the
point
[2]:=
point
(32,28); the
point
[3]:=
point
(17,90); the
point
[4]:=
point
(118,67); //第二个三角形顶点坐标 the
point
[5]:=
point
(155,44); the
point
[6]:=
point
(202,91); the
point
[7]:=
point
(277,44); the
point
[8]:=
point
(155,44);
point
num[1]:=4;//第一个三角形顶点数目
point
num[2]:=4;//第二个三角形顶点数目 count:=2;//三角形数目 //生成由两个三角形构成的三角形区域 tri_rgn:=CreatePolyPolygonRgn(the
point
,
point
num,count,WINDING); end;
类似QQ,MSN的窗口震动效果
类似QQ,MSN的窗口震动效果,里面有源代码。 unit ShakeWindow; interface uses Classes, Windows, Forms; const Max_PTCount = 40; type TShakeThread = class(TThread) private FForm: TCustomForm; FXStrength: Integer; FYStrength: Integer; FPT
Array
:
array
[0..Max_PTCount - 1] of T
Point
; procedure InitPT
Array
; procedure SetXStrength(const Value: Integer); procedure SetYStrength(const Value: Integer); protected procedure Execute; override; public property Form: TCustomForm read FForm write FForm; property XStrength: Integer read FXStrength write SetXStrength; property YStrength: Integer read FYStrength write SetYStrength; end; procedure Shake(valForm: TCustomForm; valXStrength: Integer = 4; valYStrength: Integer = 4); implementation uses Math; procedure Shake(valForm: TCustomForm; valXStrength: Integer = 4; valYStrength: Integer = 4); begin with TShakeThread.Create(True) do begin Form := valForm; XStrength := valXStrength; YStrength := valYStrength; FreeOnTerminate := True; Resume; end; end; procedure TShakeThread.Execute; var I: Integer; P: T
Point
; begin InitPT
Array
; P :=
Point
(FForm.Left, FForm.Top); for I := Max_PTCount - 1 downto 0 do begin SetWindowPos(FForm.Handle, 0, P.X + FPT
Array
[I].X, P.Y + FPT
Array
[I].Y, 0, 0, SWP_NOSIZE or SWP_NOREPOSITION); Sleep(20); end; end; procedure TShakeThread.InitPT
Array
; var I: Integer; function Sign(): Integer; begin Result := IfThen(RandomRange(0, 36635) mod 2 = 0, -1, 1); end; begin Randomize; for I := Max_PTCount - 1 downto 0 do begin FPT
Array
[i].X := Sign()*RandomRange(0, 36635) mod FXStrength*i div 10; FPT
Array
[i].Y := Sign()*RandomRange(0, 36635) mod FYStrength*i div 10; end; end; procedure TShakeThread.SetXStrength(const Value: Integer); begin if Value < 4 then FXStrength := 4 else if Value > 20 then FXStrength := 20 else FXStrength := Value; end; procedure TShakeThread.SetYStrength(const Value: Integer); begin if Value < 4 then FYStrength := 4 else if Value > 20 then FYStrength := 20 else FYStrength := Value; end; end.
Delphi
5,930
社区成员
262,936
社区内容
发帖
与我相关
我的任务
Delphi
Delphi 开发及应用
复制链接
扫一扫
分享
社区描述
Delphi 开发及应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章