?? t_fillgrid.bas
字號:
Attribute VB_Name = "T_FillWriteGrid"
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_GetVersion Lib "tvctrl32.dll" () As Integer
' Purpose: Get the version of this Dll.
' Parameter: none.
' Return: MMmm, M is major number, m is minor number.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_Init Lib "tvctrl32.dll" () As Integer
' Purpose: Initialize Tvctrl32.dll.
' Parameter: none.
' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_Exit Lib "tvctrl32.dll" () As Integer
' Purpose: Terminate Tvctrl32.dll.
' Parameter: none.
' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetVideoSource Lib "tvctrl32.dll" (ByVal nSource As Integer) As Integer
'' Purpose: Set the audio and video source.
'' Parameter: nSource: 0 to 2, 0 is AV, 1 is TV, 2 is SVHS.
'' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetVideoStandard Lib "tvctrl32.dll" (ByVal nStandard As Integer) As Integer
'' Purpose: Set the video standard of the current AV source.
'' Parameter: nStandard: 0 to 2, 0 is NTSC, 1 is PAL, 2 is SECAM for
'' SAA7110 decoder, PAL M or PAL N for SAA7111 decoder.
'' To select between PAL M and PAL N, use the "Configuration"
'' applet to choose the desired standard.
'' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetBrightness Lib "tvctrl32.dll" (ByVal nBrightness As Integer) As Integer
'' Purpose: Set the video brightness of the current AV source.
'' Parameter: nBrightness: 0 to 100, 0 is minimum.
'' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetContrast Lib "tvctrl32.dll" (ByVal nContrast As Integer) As Integer
'' Purpose: Set the video contrast of the current AV source.
'' Parameter: nContrast: 0 to 100, 0 is minimum.
'' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetHue Lib "tvctrl32.dll" (ByVal nHue As Integer) As Integer
'' Purpose: Set the video hue of the current AV source.
'' Parameter: nHue: 0 to 100, 0 is minimum.
'' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetSaturation Lib "tvctrl32.dll" (ByVal nSaturation As Integer) As Integer
'' Purpose: Set the video saturation of the current AV source.
'' Parameter: nSaturation: 0 to 100, 0 is minimum.
'' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetTVFrequency Lib "tvctrl32.dll" (ByVal fFrequency As Single) As Integer
' Purpose: Tune to desired TV station.
' Parameter: fFrequency: TV station frequency.
' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_CheckVideoSignal Lib "tvctrl32.dll" () As Integer
' Purpose: Determine if the current video source has any input. Usually
' used with TV station scanning function to determine if there
' is broadcast in the current frequency.
' Parameter: none.
' Return: 1 if valid, 0 if not
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetVolume Lib "tvctrl32.dll" (ByVal nVolume As Integer) As Integer
' Purpose: Set the audio volume of the current AV source.
' Parameter: nVolume: 0 to 63, 0 is minimum.
' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetBalance Lib "tvctrl32.dll" (ByVal nBalance As Integer) As Integer
' Purpose: Set the balance of audio of the current AV source.
' Parameter: -20 to 20, -20 is left most, 0 is both side balanced.
' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetBass Lib "tvctrl32.dll" (ByVal nBass As Integer) As Integer
' Purpose: Set the audio bass of the current AV source.
' Parameter: 0 to 15, 0 is minimum.
' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetTreble Lib "tvctrl32.dll" (ByVal nTreble As Integer) As Integer
' Purpose: Set the audio treble of the current AV source.
' Parameter: 0 to 15, 0 is minimum.
' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetStereo Lib "tvctrl32.dll" (ByVal bStereo As Integer) As Integer
' Purpose: Toggle the current AV source's audio between stereo or not.
' Parameter: 1: Setero, 0: Mono.
' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Declare Function TVCtrl32_SetMute Lib "tvctrl32.dll" (ByVal bMute As Integer) As Integer
' Purpose: Mute the current AV source's audio or not.
' Parameter: 1: Mute, 0: Unmute.
' Return: 1 if successful, 0 if fail.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Global nChannel%
Global nVolume%
Global bMute%
Global NTSC_IF As Single
Global NTSC_USA_CABLE(99) As Single
Sub InitChannelTable()
NTSC_IF = 45.75
NTSC_USA_CABLE(1) = 73.25
NTSC_USA_CABLE(2) = 55.25
NTSC_USA_CABLE(3) = 61.25
NTSC_USA_CABLE(4) = 67.25
NTSC_USA_CABLE(5) = 77.25
NTSC_USA_CABLE(6) = 83.25
NTSC_USA_CABLE(7) = 175.25
NTSC_USA_CABLE(8) = 181.25
NTSC_USA_CABLE(9) = 187.25
NTSC_USA_CABLE(10) = 193.25
NTSC_USA_CABLE(11) = 199.25
NTSC_USA_CABLE(12) = 205.25
NTSC_USA_CABLE(13) = 211.25
NTSC_USA_CABLE(14) = 121.25
NTSC_USA_CABLE(15) = 127.25
NTSC_USA_CABLE(16) = 133.25
NTSC_USA_CABLE(17) = 139.25
NTSC_USA_CABLE(18) = 145.25
NTSC_USA_CABLE(19) = 151.25
NTSC_USA_CABLE(20) = 157.25
NTSC_USA_CABLE(21) = 163.25
NTSC_USA_CABLE(22) = 169.25
NTSC_USA_CABLE(23) = 217.25
NTSC_USA_CABLE(24) = 223.25
NTSC_USA_CABLE(25) = 229.25
NTSC_USA_CABLE(26) = 235.25
NTSC_USA_CABLE(27) = 241.25
NTSC_USA_CABLE(28) = 247.25
NTSC_USA_CABLE(29) = 253.25
NTSC_USA_CABLE(30) = 259.25
NTSC_USA_CABLE(31) = 265.25
NTSC_USA_CABLE(32) = 271.25
NTSC_USA_CABLE(33) = 277.25
NTSC_USA_CABLE(34) = 283.25
NTSC_USA_CABLE(35) = 289.25
NTSC_USA_CABLE(36) = 295.25
NTSC_USA_CABLE(37) = 301.25
NTSC_USA_CABLE(38) = 307.25
NTSC_USA_CABLE(39) = 313.25
NTSC_USA_CABLE(40) = 319.25
NTSC_USA_CABLE(41) = 325.25
NTSC_USA_CABLE(42) = 331.25
NTSC_USA_CABLE(43) = 337.25
NTSC_USA_CABLE(44) = 343.25
NTSC_USA_CABLE(45) = 349.25
NTSC_USA_CABLE(46) = 355.25
NTSC_USA_CABLE(47) = 361.25
NTSC_USA_CABLE(48) = 367.25
NTSC_USA_CABLE(49) = 373.25
NTSC_USA_CABLE(50) = 379.25
NTSC_USA_CABLE(51) = 385.25
NTSC_USA_CABLE(52) = 391.25
NTSC_USA_CABLE(53) = 397.25
NTSC_USA_CABLE(54) = 403.25
NTSC_USA_CABLE(55) = 409.25
NTSC_USA_CABLE(56) = 415.25
NTSC_USA_CABLE(57) = 421.25
NTSC_USA_CABLE(58) = 427.25
NTSC_USA_CABLE(59) = 433.25
NTSC_USA_CABLE(60) = 439.25
NTSC_USA_CABLE(61) = 445.25
NTSC_USA_CABLE(62) = 451.25
NTSC_USA_CABLE(63) = 457.25
NTSC_USA_CABLE(64) = 463.25
NTSC_USA_CABLE(65) = 469.25
NTSC_USA_CABLE(66) = 475.25
NTSC_USA_CABLE(67) = 481.25
NTSC_USA_CABLE(68) = 487.25
NTSC_USA_CABLE(69) = 493.25
NTSC_USA_CABLE(70) = 499.25
NTSC_USA_CABLE(71) = 505.25
NTSC_USA_CABLE(72) = 511.25
NTSC_USA_CABLE(73) = 517.25
NTSC_USA_CABLE(74) = 523.25
NTSC_USA_CABLE(75) = 529.25
NTSC_USA_CABLE(76) = 535.25
NTSC_USA_CABLE(77) = 541.25
NTSC_USA_CABLE(78) = 547.25
NTSC_USA_CABLE(79) = 553.25
NTSC_USA_CABLE(80) = 559.25
NTSC_USA_CABLE(81) = 565.25
NTSC_USA_CABLE(82) = 571.25
NTSC_USA_CABLE(83) = 577.25
NTSC_USA_CABLE(84) = 583.25
NTSC_USA_CABLE(85) = 589.25
NTSC_USA_CABLE(86) = 595.25
NTSC_USA_CABLE(87) = 601.25
NTSC_USA_CABLE(88) = 607.25
NTSC_USA_CABLE(89) = 613.25
NTSC_USA_CABLE(90) = 619.25
NTSC_USA_CABLE(91) = 625.25
NTSC_USA_CABLE(92) = 631.25
NTSC_USA_CABLE(93) = 637.25
NTSC_USA_CABLE(94) = 643.25
NTSC_USA_CABLE(95) = 91.25
NTSC_USA_CABLE(96) = 97.25
NTSC_USA_CABLE(97) = 103.25
NTSC_USA_CABLE(98) = 109.25
NTSC_USA_CABLE(99) = 115.25
End Sub
'車牌號碼轉換成16進制
Function Cardno_To_Hex(MStr As String) As String
On Error Resume Next
Dim mCount As Integer
Dim mCharStr As String
Dim mCharStr1 As String
mCharStr = ""
For mCount = 1 To Len(MStr)
If mCount = 1 Then
If Left(MStr, 2) = "WJ" Then
mCharStr1 = Hex(Asc(Chain_To_English(Mid(MStr, mCount, 2))))
mCount = mCount + 1
Else
mCharStr1 = Hex(Asc(Chain_To_English(Mid(MStr, mCount, 1))))
End If
Else
mCharStr = mCharStr & Chain_To_English(Mid(MStr, mCount, 1))
End If
Next mCount
Cardno_To_Hex = Hex(Left(mCharStr, 9))
Cardno_To_Hex = mCharStr1 & String(8 - Len(Cardno_To_Hex), "0") & Cardno_To_Hex
Cardno_To_Hex = Cardno_To_Hex & String(4 - Len(Hex(Right(mCharStr, 5))), "0") & Hex(Right(mCharStr, 5))
End Function
'十六進制轉成十進制
Public Function Hex_To_Dec(mInt As String) As Long
On Error GoTo Error
Dim Temp As String
Dim Ilen As Integer
Dim i As Integer
Dim Temp1 As Integer
Dim TempLong As Long
Dim j As Integer
Ilen = Len(mInt)
j = Ilen - 1
For i = 1 To Ilen
Temp = Mid(mInt, i, 1)
Select Case UCase(Temp)
Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
Temp1 = Temp
Case "A"
Temp1 = 10
Case "B"
Temp1 = 11
Case "C"
Temp1 = 12
Case "D"
Temp1 = 13
Case "E"
Temp1 = 14
Case "F"
Temp1 = 15
End Select
TempLong = TempLong + Temp1 * 16 ^ j
j = j - 1
Next i
Hex_To_Dec = TempLong
Exit Function
Error:
Hex_To_Dec = TempLong
End Function
'16進制轉換成車牌號碼
Function Hex_To_Cardno(MStr As String) As String
On Error Resume Next
Dim mCount As Integer
Dim mCharStr1 As String
Dim mCharStr2 As String
Dim mCharStr As String
Dim mCharStr3 As String
Hex_To_Cardno = English_To_Chain(Chr(Hex_To_Dec(Left(MStr, 2))))
mCharStr1 = ""
mCharStr1 = Mid(MStr, 3, 8)
mCharStr2 = ""
mCharStr2 = Right(MStr, 4)
mCharStr1 = String(9 - Len(Trim(T_frmMenu.Jsykt_1.HexToDec(mCharStr1))), "0") & Trim(T_frmMenu.Jsykt_1.HexToDec(mCharStr1))
mCharStr2 = String(5 - Len(Trim(T_frmMenu.Jsykt_1.HexToDec(mCharStr2))), "0") & Trim(T_frmMenu.Jsykt_1.HexToDec(mCharStr2))
mCharStr = mCharStr1 & mCharStr2
For mCount = 1 To Len(mCharStr)
mCharStr3 = mCharStr3 & English_To_Chain(Mid(mCharStr, mCount, 2))
mCount = mCount + 1
Next mCount
Hex_To_Cardno = Hex_To_Cardno & mCharStr3
End Function
Function Chain_To_English(MStr As String) As String
Select Case MStr
Case "粵"
Chain_To_English = "a"
Case "軍"
Chain_To_English = "b"
Case "警"
Chain_To_English = "c"
Case "WJ"
Chain_To_English = "d"
Case "港"
Chain_To_English = "e"
Case "京"
Chain_To_English = "f"
Case "津"
Chain_To_English = "g"
Case "滬"
Chain_To_English = "h"
Case "翼"
Chain_To_English = "i"
Case "豫"
Chain_To_English = "j"
Case "晉"
Chain_To_English = "k"
Case "魯"
Chain_To_English = "l"
Case "桂"
Chain_To_English = "m"
Case "滇"
Chain_To_English = "n"
Case "黔"
Chain_To_English = "o"
Case "川"
Chain_To_English = "p"
Case "蘇"
Chain_To_English = "q"
Case "浙"
Chain_To_English = "r"
Case "湘"
Chain_To_English = "s"
Case "鄂"
Chain_To_English = "t"
Case "新"
Chain_To_English = "u"
Case "藏"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -