把A版的代码换了个颜色
Local $text = '+-×÷﹢﹣±/=≈≡≠∧∨∑∏∪∩∈⊙⌒⊥∥∠' & _
'∽≌<>≦≧≮≯∧∨√ ﹙﹚[]﹛﹜∫∮∝∞⊙∏'
GUICreate('字符格子例子 By Afan', 400, 200)
GUISetBkColor(0xFFFFFF)
GUISetFont(11)
GUICtrlCreateLabel('', 90, 10, 302, 90)
;~ GUICtrlSetBkColor(-1, 0xCBCED5)
GUICtrlSetBkColor(-1, 000000)
GUICtrlSetState(-1, 128)
Local $aTxt = StringRegExp($text, '.', 3)
Local $_c = UBound($aTxt), $Label[$_c]
For $x = 1 To $_c
$Label[$x - 1] = GUICtrlCreateLabel($aTxt[$x - 1], 92 + 25 * ($x - (Int(($x - 1) / 12) * 12 + 1)), _
12 + 22 * Int(($x - 1) / 12), 23, 20, 0x201)
Next
Local $LD = GUICtrlCreateLabel('', 160, 100, 80, 80, 0x201)
GUICtrlSetFont(-1, 50)
GUICtrlSetColor(-1, 0xCBCED5)
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $msg
Case -3
Exit
Case $Label[0] To $Label[$_c - 1]
GUICtrlSetData($LD, $aTxt[$msg - 4])
GUICtrlSetColor($LD, 000000)
EndSwitch
WEnd
|