找回密码
 加入
搜索
查看: 1388|回复: 2

[AU3基础] 谁会将这段OSD的VB源码转为AU3源码?

[复制链接]
发表于 2011-2-7 23:04:44 | 显示全部楼层 |阅读模式
Dim XX As Long, TotalFrame As Long, ImageIndex As Long
Dim WW As Long

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long


Private Sub Command1_Click()
Dim TmpStr As String
Dim Pos As Integer, Pos2 As Integer

On Error GoTo ErrRow
Cmdlg.ShowOpen
TmpStr = Cmdlg.FileName
Pos = InStr(TmpStr, "_")
Pos2 = InStrRev(TmpStr, ".")
TotalFrame = CInt(Mid(TmpStr, Pos + 1, Pos2 - Pos - 1))

LoadImageFileRmOSD TmpStr, TotalFrame
Text1.Text = 250: Text2.Text = 150

ErrRow:
End Sub

Private Sub Command2_Click()
ShellExecute Me.hwnd, "open", App.Path & "\SDK_OSD.htm", vbNullString, vbNullString, 0
End Sub

Private Sub Form_Load()

SetRegSn ""

If InitRmOSD < 0 Then MsgBox "初始化失败!", vbInformation, "提示"

XX = 610

TotalFrame = 6

ImageIndex = 0

Timer1.Interval = 500
Timer1.Enabled = True
End Sub

Private Sub Form_Unload(Cancel As Integer)
FreeRmOSD
End Sub


Private Sub HVol_Change()
ChangeVolumeRmOSD CInt(Text3.Text), CInt(Text4.Text), HVol.Value
End Sub

Private Sub HVol_Scroll()
ChangeVolumeRmOSD CInt(Text3.Text), CInt(Text4.Text), HVol.Value
End Sub


Private Sub Label1_Click()

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
 If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> 8 Then KeyAscii = 0
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
 If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> 8 Then KeyAscii = 0
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
 If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> 8 Then KeyAscii = 0
End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)
 If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> 8 Then KeyAscii = 0
End Sub

Private Sub Timer1_Timer()
ClearBufferRmOSD
XX = XX - 10
WW = GetWidthOSDTextRmOSD(TxtChar.Text)
If XX < -WW Then XX = 601
AddOsdTextItemsRmOSD XX, 120, 30, TxtChar.Text, "宋体", RGB(0, 0, 255), RGB(0, 0, 0)
AddOsdTextItemsRmOSD XX, 220, 30, TxtChar.Text, "宋体", RGB(255, 0, 0), RGB(0, 0, 0)
AddOsdTextItemsRmOSD XX, 320, 30, TxtChar.Text, "宋体", RGB(255, 255, 0), RGB(255, 0, 0)

SetImagePropertyRmOSD CInt(Text1.Text), CInt(Text2.Text), ImageIndex, True, True
ImageIndex = ImageIndex + 1
If TotalFrame > 0 Then ImageIndex = ImageIndex Mod TotalFrame
UpdateBufferRmOSD

End Sub
发表于 2011-2-8 21:47:02 | 显示全部楼层
你因该把VB工程传上来,否则无法调试。我把代码重新编译无法成功。
 楼主| 发表于 2011-2-9 07:52:55 | 显示全部楼层
附近是程序+源码,会的朋友帮忙看看。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-15 18:53 , Processed in 0.080064 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表