#exepath="C:\ivy_xor66.bin"
size.l=?exeend-?exestart
*Buffer = AllocateMemory(size)
For i = 0 To size-1
d.b=PeekB(?exestart+i)
d=d ! 66
PokeB(*Buffer+i,d)
Next
DataSection
exestart:
IncludeBinary #exepath
exeend:
EndDataSection
-----------------------------------------------
#exepath="C:\t.bin"
size.l=?exeend-?exestart
*Buffer = AllocateMemory(size)
For i = 0 To size-1
d.b=PeekB(?exestart+i)
d=d ! 66
PokeB(*Buffer+i,d)
Next
file.s="ivy_xor.bin"
If CreateFile(0, file)
WriteData(0,*Buffer,size)
CloseFile(0) ;
EndIf
DataSection
exestart:
IncludeBinary #exepath
exeend:
EndDataSection
2013年2月21日 星期四
2013年2月10日 星期日
2013年2月9日 星期六
evb big screen
Option Explicit
Private Sub Form_Load()
vsbMove.Max = fraData.Height - 4020
vsbMove.Min = 0
vsbMove.SmallChange = vsbMove.Max / 100
vsbMove.LargeChange = vsbMove.Max / 10
End Sub
Private Sub Form_OKClick()
App.End
End Sub
Private Sub vsbMove_Change()
fraData.Move 0, -vsbMove.Value
End Sub
Private Sub Form_Load()
vsbMove.Max = fraData.Height - 4020
vsbMove.Min = 0
vsbMove.SmallChange = vsbMove.Max / 100
vsbMove.LargeChange = vsbMove.Max / 10
End Sub
Private Sub Form_OKClick()
App.End
End Sub
Private Sub vsbMove_Change()
fraData.Move 0, -vsbMove.Value
End Sub
evb 龜兔賽跑
Option Explicit
Const intGoalPosition = 3000
Const intImageHeight = 615
Dim intRabbitPosition, intTurtlePosition, intDragonPosition As Integer
Dim blnStartFlag As Boolean
Dim intStep As Integer
Dim strRabbitImg(2), strTurtleImg(2), strDragonImg(2) As String
Dim strPath As String
Private Sub Form_Load()
Randomize
strPath = App.Path
If strPath = "\" Then
strPath = ""
End If
InitData
End Sub
Private Sub InitData()
blnStartFlag = False
intStep = 1
tmrGame.Enabled = False
imgGoal.Picture = strPath & "\goal.bmp"
strRabbitImg(1) = "\rabbit1.bmp"
strRabbitImg(2) = "\rabbit2.bmp"
strTurtleImg(1) = "\turtl1.bmp"
strTurtleImg(2) = "\turtl2.bmp"
strDragonImg(1) = "\dragon1.bmp"
strDragonImg(2) = "\dragon2.bmp"
imgRabbit.Picture = strPath & strRabbitImg(1)
imgTurtle.Picture = strPath & strTurtleImg(1)
imgDragon.Picture = strPath & strDragonImg(1)
imgRabbit.Move imgRabbit.Left, 0
imgTurtle.Move imgTurtle.Left, 0
imgDragon.Move imgDragon.Left, 0
lblResult.Caption = ""
End Sub
Private Sub cmdGo_Click()
If cmdGo.Caption = "GO!" Then
cmdGo.Enabled = False
cmdGo.Caption = "Clear"
blnStartFlag = True
tmrGame.Enabled = True
ElseIf cmdGo.Caption = "Clear" Then
InitData
cmdGo.Caption = "GO!"
End If
End Sub
Private Sub Form_OKClick()
App.End
End Sub
Private Sub tmrGame_Timer()
If blnStartFlag Then
'Int( (要產生亂數的上界 - 下界 + 1) * Rnd + 下界)
'Int( (200 – 10 + 1) * Rnd + 10) = Int(191 * Rnd +10)
imgRabbit.Move imgRabbit.Left, imgRabbit.Top + Int(191 * Rnd + 10)
imgTurtle.Move imgTurtle.Left, imgTurtle.Top + Int(191 * Rnd + 10)
imgDragon.Move imgDragon.Left, imgDragon.Top + Int(191 * Rnd + 10)
If intStep = 1 Then
imgRabbit.Picture = strPath & strRabbitImg(1)
imgTurtle.Picture = strPath & strTurtleImg(1)
imgDragon.Picture = strPath & strDragonImg(1)
intStep = 2
ElseIf intStep = 2 Then
imgRabbit.Picture = strPath & strRabbitImg(2)
imgTurtle.Picture = strPath & strTurtleImg(2)
imgDragon.Picture = strPath & strDragonImg(2)
intStep = 1
End If
End If
intRabbitPosition = imgRabbit.Top + intImageHeight
intTurtlePosition = imgTurtle.Top + intImageHeight
intDragonPosition = imgDragon.Top + intImageHeight
If (intRabbitPosition > intTurtlePosition) And (intRabbitPosition > intDragonPosition) Then
If intRabbitPosition >= intGoalPosition Then
lblResult.Caption = " 兔子獲勝!"
blnStartFlag = False
tmrGame.Enabled = False
cmdGo.Enabled = True
End If
End If
If (intDragonPosition > intRabbitPosition) And (intDragonPosition > intTurtlePosition) Then
If intDragonPosition >= intGoalPosition Then
lblResult.Caption = " 土龍獲勝!"
blnStartFlag = False
tmrGame.Enabled = False
cmdGo.Enabled = True
End If
End If
If (intTurtlePosition > intRabbitPosition) And (intTurtlePosition > intDragonPosition) Then
If intTurtlePosition >= intGoalPosition Then
lblResult.Caption = " 烏龜獲勝!"
blnStartFlag = False
tmrGame.Enabled = False
cmdGo.Enabled = True
End If
End If
End Sub
Private Sub lblResult_Click()
MsgBox "by 李永隆,2001", vbOKOnly + vbInformation, "About"
End Sub
Const intGoalPosition = 3000
Const intImageHeight = 615
Dim intRabbitPosition, intTurtlePosition, intDragonPosition As Integer
Dim blnStartFlag As Boolean
Dim intStep As Integer
Dim strRabbitImg(2), strTurtleImg(2), strDragonImg(2) As String
Dim strPath As String
Private Sub Form_Load()
Randomize
strPath = App.Path
If strPath = "\" Then
strPath = ""
End If
InitData
End Sub
Private Sub InitData()
blnStartFlag = False
intStep = 1
tmrGame.Enabled = False
imgGoal.Picture = strPath & "\goal.bmp"
strRabbitImg(1) = "\rabbit1.bmp"
strRabbitImg(2) = "\rabbit2.bmp"
strTurtleImg(1) = "\turtl1.bmp"
strTurtleImg(2) = "\turtl2.bmp"
strDragonImg(1) = "\dragon1.bmp"
strDragonImg(2) = "\dragon2.bmp"
imgRabbit.Picture = strPath & strRabbitImg(1)
imgTurtle.Picture = strPath & strTurtleImg(1)
imgDragon.Picture = strPath & strDragonImg(1)
imgRabbit.Move imgRabbit.Left, 0
imgTurtle.Move imgTurtle.Left, 0
imgDragon.Move imgDragon.Left, 0
lblResult.Caption = ""
End Sub
Private Sub cmdGo_Click()
If cmdGo.Caption = "GO!" Then
cmdGo.Enabled = False
cmdGo.Caption = "Clear"
blnStartFlag = True
tmrGame.Enabled = True
ElseIf cmdGo.Caption = "Clear" Then
InitData
cmdGo.Caption = "GO!"
End If
End Sub
Private Sub Form_OKClick()
App.End
End Sub
Private Sub tmrGame_Timer()
If blnStartFlag Then
'Int( (要產生亂數的上界 - 下界 + 1) * Rnd + 下界)
'Int( (200 – 10 + 1) * Rnd + 10) = Int(191 * Rnd +10)
imgRabbit.Move imgRabbit.Left, imgRabbit.Top + Int(191 * Rnd + 10)
imgTurtle.Move imgTurtle.Left, imgTurtle.Top + Int(191 * Rnd + 10)
imgDragon.Move imgDragon.Left, imgDragon.Top + Int(191 * Rnd + 10)
If intStep = 1 Then
imgRabbit.Picture = strPath & strRabbitImg(1)
imgTurtle.Picture = strPath & strTurtleImg(1)
imgDragon.Picture = strPath & strDragonImg(1)
intStep = 2
ElseIf intStep = 2 Then
imgRabbit.Picture = strPath & strRabbitImg(2)
imgTurtle.Picture = strPath & strTurtleImg(2)
imgDragon.Picture = strPath & strDragonImg(2)
intStep = 1
End If
End If
intRabbitPosition = imgRabbit.Top + intImageHeight
intTurtlePosition = imgTurtle.Top + intImageHeight
intDragonPosition = imgDragon.Top + intImageHeight
If (intRabbitPosition > intTurtlePosition) And (intRabbitPosition > intDragonPosition) Then
If intRabbitPosition >= intGoalPosition Then
lblResult.Caption = " 兔子獲勝!"
blnStartFlag = False
tmrGame.Enabled = False
cmdGo.Enabled = True
End If
End If
If (intDragonPosition > intRabbitPosition) And (intDragonPosition > intTurtlePosition) Then
If intDragonPosition >= intGoalPosition Then
lblResult.Caption = " 土龍獲勝!"
blnStartFlag = False
tmrGame.Enabled = False
cmdGo.Enabled = True
End If
End If
If (intTurtlePosition > intRabbitPosition) And (intTurtlePosition > intDragonPosition) Then
If intTurtlePosition >= intGoalPosition Then
lblResult.Caption = " 烏龜獲勝!"
blnStartFlag = False
tmrGame.Enabled = False
cmdGo.Enabled = True
End If
End If
End Sub
Private Sub lblResult_Click()
MsgBox "by 李永隆,2001", vbOKOnly + vbInformation, "About"
End Sub
evb 正弦函數計算機
Option Explicit
Private Sub Form_Click()
Dim Angle, Result As Single
Angle = InputBox("請輸入要計算的角度:", "正弦函數計算機", 30)
Result = Sin(AngleToRad(Angle))
Print "計算結果:sin(" & Angle & ") = " & Result
End Sub
Private Sub Form_Load()
welcome
End Sub
Private Sub Form_OKClick()
App.End
End Sub
Private Sub welcome()
MsgBox "歡迎使用sin函數計算系統", vbOKOnly, "Sin"
End Sub
Private Function AngleToRad(ang As Single)
Dim PI As Single
PI = Atn(1) * 4
AngleToRad = (ang * PI) / 180
End Function
Private Sub Form_Click()
Dim Angle, Result As Single
Angle = InputBox("請輸入要計算的角度:", "正弦函數計算機", 30)
Result = Sin(AngleToRad(Angle))
Print "計算結果:sin(" & Angle & ") = " & Result
End Sub
Private Sub Form_Load()
welcome
End Sub
Private Sub Form_OKClick()
App.End
End Sub
Private Sub welcome()
MsgBox "歡迎使用sin函數計算系統", vbOKOnly, "Sin"
End Sub
Private Function AngleToRad(ang As Single)
Dim PI As Single
PI = Atn(1) * 4
AngleToRad = (ang * PI) / 180
End Function
evbevc的安裝
- 安裝PPC2002_SDK.exe
- 安裝EVCVB_2.ISO(on vm, only Platform SDK for Pocket PC)
- 安裝evt2002web_min.exe
2013年2月8日 星期五
evb msgbox
Option Explicit
Private Sub Form_Click()
Dim intReturn As Integer
intReturn = MsgBox("請按下?一個按?", vbYesNoCancel, "傳回值測?")
Select Case intReturn
Case vbYes
Print "你按下Yes?!"
Case vbNo
Print "你按下No?"
Case vbCancel
Print "你按下Cancel?"
End Select
End Sub
Private Sub Form_OKClick()
App.End
End Sub
Private Sub Form_Click()
Dim intReturn As Integer
intReturn = MsgBox("請按下?一個按?", vbYesNoCancel, "傳回值測?")
Select Case intReturn
Case vbYes
Print "你按下Yes?!"
Case vbNo
Print "你按下No?"
Case vbCancel
Print "你按下Cancel?"
End Select
End Sub
Private Sub Form_OKClick()
App.End
End Sub
evb inputbox
Option Explicit
Private Sub Form_Click()
Dim strResult As String
strResult = InputBox("請輸入公司名稱", "親愛的客戶您好", "株式會社")
Print "您好," & strResult
End Sub
Private Sub Form_OKClick()
App.End
End Sub
evb timer
Option Explicit
Private Sub Form_OKClick()
App.End
End Sub
Private Sub tmrClock_Timer()
frmClock.Cls
Print Time
End Sub
訂閱:
文章 (Atom)