EATC

 找回密码
 立即注册
查看: 483|回复: 1

三段封装好的显示文本函数拿去用

[复制链接]

279

主题

1921

帖子

1079

积分

客服

Rank: 7Rank: 7Rank: 7

积分
1079
发表于 2022-12-14 11:38:18 | 显示全部楼层 |阅读模式


//| CreateTextLable() function


void CreateTextLable


(string TextLableName, string Text, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )


  {


//---


   ObjectCreate(TextLableName, OBJ_LABEL, 0, 0, 0);


   ObjectSet(TextLableName, OBJPROP_CORNER, TextCorner);


   ObjectSet(TextLableName, OBJPROP_XDISTANCE, X);


   ObjectSet(TextLableName, OBJPROP_YDISTANCE, Y);


   ObjectSetText(TextLableName,Text,TextSize,FontName,TextColor);


//----


  }






//| SetTextLable() function                                          |






void SetTextLable


(string TextLableName, string Text, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )


  {


//---


   ObjectSet(TextLableName, OBJPROP_CORNER, TextCorner);


   ObjectSet(TextLableName, OBJPROP_XDISTANCE, X);


   ObjectSet(TextLableName, OBJPROP_YDISTANCE, Y);


   ObjectSetText(TextLableName,Text,TextSize,FontName,TextColor);


//----


  }






//| TimeCount() function                                            |






void TimeCount


(string TextLableName, int StartNumber, int StopNumber, int Inerval, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )


  {


//---


   CreateTextLable(TextLableName,"-"+StartNumber+"-",TextSize,FontName,TextColor,TextCorner,X,Y);


   WindowRedraw();


   PlaySound("WAIT");


   for(int Count=StartNumber+1;Count<=StopNumber;Count++)


    {


     Sleep(Inerval);


     PlaySound("WAIT");


     SetTextLable(TextLableName,"-"+ Count+"-",TextSize,FontName,TextColor,TextCorner,X,Y);


     WindowRedraw();


    }


   Sleep(Inerval);


   ObjectDelete(TextLableName);


//----


  }


回复

使用道具 举报

2530

主题

4330

帖子

2万

积分

交易元老

Rank: 8Rank: 8

积分
22213
发表于 2024-1-19 10:00:54 | 显示全部楼层
谢谢美女
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

收藏本站|法律声明|Archiver|小黑屋|support@ea198.com|EATC ( 桂ICP备2022005787号 )

风险提示与免责声明:擅自从事外汇保证金交易的双方不受法律保护!社区内展示内容,均为网友自发分享,不构成投资建议,社区无法全面监控由第三方上传至社区的资源,因此不保证资源的合法性、安全性、完整性、真实性或品质等。您下载时,同意自行判断并承担所有风险。社区内的资源,仅限用于学习和研究目的,不得将用于商业或者非法用途,否则,一切后果请用户自负。社区信息来自网络,版权争议与社区无关,您下载后须在24个小时之内进行删除。如果您喜欢该内容,请支持正版。如有侵权请邮件与我们联系处理。