设为首页 收藏本站 切换语言

三段封装好的显示文本函数拿去用——小名叫雷锋  

| 发表于 2022-5-24 09:25:32 | 显示全部楼层 |复制链接
  1. //| CreateTextLable() function
  2. void CreateTextLable
  3. (string TextLableName, string Text, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )
  4.   {
  5. //---
  6.    ObjectCreate(TextLableName, OBJ_LABEL, 0, 0, 0);
  7.    ObjectSet(TextLableName, OBJPROP_CORNER, TextCorner);
  8.    ObjectSet(TextLableName, OBJPROP_XDISTANCE, X);
  9.    ObjectSet(TextLableName, OBJPROP_YDISTANCE, Y);
  10.    ObjectSetText(TextLableName,Text,TextSize,FontName,TextColor);
  11. //----
  12.   }
  13. //| SetTextLable() function                                          |
  14. void SetTextLable
  15. (string TextLableName, string Text, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )
  16.   {
  17. //---
  18.    ObjectSet(TextLableName, OBJPROP_CORNER, TextCorner);
  19.    ObjectSet(TextLableName, OBJPROP_XDISTANCE, X);
  20.    ObjectSet(TextLableName, OBJPROP_YDISTANCE, Y);
  21.    ObjectSetText(TextLableName,Text,TextSize,FontName,TextColor);
  22. //----
  23.   }
  24. //| TimeCount() function                                            |
  25. void TimeCount
  26. (string TextLableName, int StartNumber, int StopNumber, int Inerval, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )
  27.   {
  28. //---
  29.    CreateTextLable(TextLableName,"-"+StartNumber+"-",TextSize,FontName,TextColor,TextCorner,X,Y);
  30.    WindowRedraw();
  31.    PlaySound("WAIT");
  32.    for(int Count=StartNumber+1;Count<=StopNumber;Count++)
  33.     {
  34.      Sleep(Inerval);
  35.      PlaySound("WAIT");
  36.      SetTextLable(TextLableName,"-"+ Count+"-",TextSize,FontName,TextColor,TextCorner,X,Y);
  37.      WindowRedraw();
  38.     }
  39.    Sleep(Inerval);
  40.    ObjectDelete(TextLableName);
  41. //----
  42.   }
复制代码
举报

评论 使用道具

热门主题

精彩评论51

qwe11
CCC
| 发表于 2022-5-24 09:27:01 | 显示全部楼层
谢谢分享
举报

点赞 评论 使用道具

whl
DD
| 发表于 2022-5-24 09:39:14 | 显示全部楼层
谢谢分享
举报

点赞 评论 使用道具

pengjhl
CC
| 发表于 2022-5-24 11:07:17 | 显示全部楼层
谢谢分享
举报

点赞 评论 使用道具

紫竹青荷
CC
| 发表于 2022-5-24 11:56:49 | 显示全部楼层
感谢楼主分享
举报

点赞 评论 使用道具

daerbushen
DD
| 发表于 2022-5-24 12:49:59 | 显示全部楼层
路过看看
举报

点赞 评论 使用道具

kenlee1628
DDD
| 发表于 2022-5-24 13:51:47 | 显示全部楼层
感谢分享
举报

点赞 评论 使用道具

古希腊恶人
D
| 发表于 2022-5-24 15:16:51 | 显示全部楼层
感谢分享
举报

点赞 评论 使用道具

bin
DD
| 发表于 2022-5-24 16:01:11 | 显示全部楼层
谢谢分享
举报

点赞 评论 使用道具

ssbienhild
DD
| 发表于 2022-5-24 21:14:40 | 显示全部楼层
谢谢分享
举报

点赞 评论 使用道具

JOKEEBOSS
DD
| 发表于 2022-5-24 21:48:34 | 显示全部楼层
路过路过
举报

点赞 评论 使用道具

不忘初心的远航
D
| 发表于 2022-5-25 02:23:12 | 显示全部楼层
感谢楼主分享,好好学习,天天向上!
举报

点赞 评论 使用道具

刘先生io
未及格
| 发表于 2022-5-25 07:20:29 | 显示全部楼层
感谢分享
举报

点赞 评论 使用道具

lihua22
D
| 发表于 2022-5-25 08:35:50 | 显示全部楼层
谢谢分享
举报

点赞 评论 使用道具

jongjongyoshen
D
| 发表于 2022-5-25 08:55:21 | 显示全部楼层
路过看看
举报

点赞 评论 使用道具

ea12213
C
| 发表于 2022-6-17 20:41:25 | 显示全部楼层
谢谢分享
举报

点赞 评论 使用道具

huxu8777
DD
| 发表于 2022-6-17 23:40:54 | 显示全部楼层
确有见解
举报

点赞 评论 使用道具

pengjhl
CC
| 发表于 2022-6-19 10:57:59 | 显示全部楼层
感谢分享
举报

点赞 评论 使用道具

jordan1984
DDD
| 发表于 2022-6-19 11:06:27 | 显示全部楼层
我就看看
举报

点赞 评论 使用道具

nanaliu
CC
| 发表于 2022-6-19 11:43:22 | 显示全部楼层
看看。。感谢分享。。。。
举报

点赞 评论 使用道具

123下一页
发新帖
EA交易
您需要登录后才可以评论 登录 | 立即注册

简体中文
繁體中文
English(英语)
日本語(日语)
Deutsch(德语)
Русский язык(俄语)
بالعربية(阿拉伯语)
Türkçe(土耳其语)
Português(葡萄牙语)
ภาษาไทย(泰国语)
한어(朝鲜语/韩语)
Français(法语)