button side project
********************
စာေတြကိုsideျပတာေတြကိုေတာ့သိပီးျကေလာက္ပီအခုbuttonေတြကိုေရြ႕လ်ွားေအာင္လုပ္ျကရေအာင္ က်ြန္ေတာ္လဲကို႔projectကမပီးေသးပါဒါေပမယ့္code testေလးရွိေနလို႔ေရးပီးတင္ေပးျဖစ္တာပါ(ေျကာ္ညာ)timer ေတကိုသံုးပီးေရးထားတာပါဘယ္ဘက္ကိုဘဲအေႏွးအျမန္sideျပထားတယ္။
********************
စာေတြကိုsideျပတာေတြကိုေတာ့သိပီးျကေလာက္ပီအခုbuttonေတြကိုေရြ႕လ်ွားေအာင္လုပ္ျကရေအာင္ က်ြန္ေတာ္လဲကို႔projectကမပီးေသးပါဒါေပမယ့္code testေလးရွိေနလို႔ေရးပီးတင္ေပးျဖစ္တာပါ(ေျကာ္ညာ)timer ေတကိုသံုးပီးေရးထားတာပါဘယ္ဘက္ကိုဘဲအေႏွးအျမန္sideျပထားတယ္။
main
---------
AddButton("btn1",24.4%x,30.5%y,51.5%x,10.7%y,"")
SetText("btn1","click me")
SetColor("btn1",0,cred)
---------
AddButton("btn1",24.4%x,30.5%y,51.5%x,10.7%y,"")
SetText("btn1","click me")
SetColor("btn1",0,cred)
AddButton("btn2",24.4%x,45%y,51.5%x,10.7%y,"")
SetText("btn2","Click me")
SetColor("btn2",0,cblue)
SetText("btn2","Click me")
SetColor("btn2",0,cblue)
SetTimer2Enabled(true)
SetTimer2Interval(20)
SetTimer2Interval(20)
AddButton("btn3",24.4%x,60%y,51.5%x,10.7%y,"")
SetText("btn3","Click me")
SetColor("btn3",0,cpurple)
SetText("btn3","Click me")
SetColor("btn3",0,cpurple)
SetTimer3Enabled(true)
SetTimer3Interval(40)
SetTimer3Interval(40)
SetTimer1Enabled(true)
SetTimer1Interval(5)
SetTimer1Interval(5)
event
----------
----------
Sub Label_Click(Who)
End Sub
End Sub
Sub Button_Click(Who)
select who
select who
case"btn1"
ShowToast("you Click",true)
ShowToast("you Click",true)
case"btn2"
ShowToast("you Click",true)
ShowToast("you Click",true)
case"btn3"
ShowToast("you Click",true)
ShowToast("you Click",true)
end select
End Sub
End Sub
Sub Button_LongClick(Who)
End Sub
End Sub
Sub Timer1_Tick
a=getleft("btn1")
a=a-1
If a<0-100%x then
a=100%x
End if
Setleft("btn1",a)
End Sub
a=getleft("btn1")
a=a-1
If a<0-100%x then
a=100%x
End if
Setleft("btn1",a)
End Sub
Sub Timer2_Tick
a=getleft("btn2")
a=a-1
If a<0-100%x then
a=100%x
End if
Setleft("btn2",a)
End Sub
a=getleft("btn2")
a=a-1
If a<0-100%x then
a=100%x
End if
Setleft("btn2",a)
End Sub
Sub Timer3_Tick
a=getleft("btn3")
a=a-1
If a<0-100%x then
a=100%x
End if
Setleft("btn3",a)
End Sub
a=getleft("btn3")
a=a-1
If a<0-100%x then
a=100%x
End if
Setleft("btn3",a)
End Sub
test now
sideing codeing

😄
sideing codeing

😄
Comments
Post a Comment