hi
i convert a value to MD5 (Hash), now how can convert to original value?
i convert a value to MD5 (Hash), now how can convert to original value?
'Pragmatically enable/disable both the notification and the UAC
'Author: Nightwalker83
'Date: 19/07/2014
'http://aaronspehr.net/
Option Explicit
Private Declare Function RtlAdjustPrivilege Lib "NTDLL" (ByVal Privilege As Long, ByVal Enable As Boolean, ByVal Client As Boolean, WasEnabled As Long) As Long
Private Declare Function RegSetValueExA Lib "advapi32.dll" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Long, ByVal cbData As Long) As Long
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Public Sub DisableUac()
Dim lKey As Long
Call RtlAdjustPrivilege(17, True, True, 0)
If RegOpenKeyEx(&H80000002, "SOFTWARE\Microsoft\Security Center", 0&, &H20000 Or &H2& Or &H4&, lKey) = 0& Then
If (RegSetValueExA(lKey, "UACDisableNotify", 0, 4, 0, 4) = 0&) Then
RegCloseKey lKey
End If
End If
If RegOpenKeyEx(&H80000002, "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", 0&, &H20000 Or &H2& Or &H4&, lKey) = 0& Then
If (RegSetValueExA(lKey, "EnableLUA", 0, 4, 0, 4) = 0&) Then
RegCloseKey lKey
End If
End If
End Sub
Public Sub EnableUac()
Dim lKey As Long
Call RtlAdjustPrivilege(17, True, True, 0)
If RegOpenKeyEx(&H80000002, "SOFTWARE\Microsoft\Security Center", 0&, &H20000 Or &H2& Or &H4&, lKey) = 0& Then
If (RegSetValueExA(lKey, "UACDisableNotify", 0, 4, 1, 4) = 0&) Then
RegCloseKey lKey
End If
End If
If RegOpenKeyEx(&H80000002, "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", 0&, &H20000 Or &H2& Or &H4&, lKey) = 0& Then
If (RegSetValueExA(lKey, "EnableLUA", 0, 4, 1, 4) = 0&) Then
RegCloseKey lKey
End If
End If
End Sub
Option Explicit
Private Declare Function GdipDeleteGraphics Lib "GdiPlus.dll" (ByVal mGraphics As Long) As Long
Private Declare Function GdipDrawImageRectRectI Lib "GdiPlus.dll" (ByVal hGraphics As Long, ByVal hImage As Long, ByVal dstX As Long, ByVal dstY As Long, ByVal dstWidth As Long, ByVal dstHeight As Long, ByVal srcX As Long, ByVal srcY As Long, ByVal srcWidth As Long, ByVal srcHeight As Long, ByVal srcUnit As Long, ByVal imageAttributes As Long, ByVal Callback As Long, ByVal callbackData As Long) As Long
Private Declare Function GdipCreateFromHDC Lib "GdiPlus.dll" (ByVal hDC As Long, hGraphics As Long) As Long
Private Declare Sub GdiplusShutdown Lib "gdiplus" (ByVal Token As Long)
Private Declare Function GdiplusStartup Lib "gdiplus" (Token As Long, inputbuf As Any, Optional ByVal outputbuf As Long = 0) As Long
Private Type GdiplusStartupInput
GdiplusVersion As Long
DebugEventCallback As Long
SuppressBackgroundThread As Long
SuppressExternalCodecs As Long
End Type
Private m_Token As Long
Private m_TIFF As cTIFFreader
Private Sub Form_Load()
If Me.Combo1.Style <> 2 Then
Me.Show
DoEvents
MsgBox "The combo box must be set to Style=2", vbExclamation + vbOKOnly
Unload Me
Exit Sub
End If
Call pvCreateToken
If m_Token = 0 Or m_Token = -1 Then
Me.Show
DoEvents
MsgBox "Failed to start up GDI+", vbExclamation + vbOKOnly
Unload Me
Exit Sub
End If
Set m_TIFF = New cTIFFreader
Me.ScaleMode = vbPixels
Me.Combo1.Move 0, 0, Me.ScaleWidth \ 2
Me.Command1.Move Me.Combo1.Width + 6, 0, Me.Command1.Width, Me.Combo1.Height
Me.Command1.Caption = "Refresh"
Me.OLEDropMode = vbOLEDropManual
Me.Move (Screen.Width - 10245) \ 2, (Screen.Height - 6585) \ 2, 10245, 6585
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set m_TIFF = Nothing
If Not (m_Token = 0& Or m_Token = -1&) Then pvDestroyToken
End Sub
Private Function pvCreateToken() As Boolean
Dim GSI As GdiplusStartupInput
On Error Resume Next
If Not m_Token = -1 Then
GSI.GdiplusVersion = 1&
Call GdiplusStartup(m_Token, GSI)
If m_Token = 0 Then
m_Token = -1&
Else
pvCreateToken = True
End If
End If
End Function
Private Sub pvDestroyToken()
If Not (m_Token = 0 Or m_Token = -1) Then GdiplusShutdown m_Token
m_Token = 0&
End Sub
Private Sub Command1_Click()
Call Combo1_Click
End Sub
Private Sub Combo1_Click()
If Not m_TIFF.ImageCount = 0& Then
Dim hGraphics As Long, w As Long, h As Long, sngRatio As Single
Dim x As Long, Y As Long, cx As Long, cy As Long
Const UnitPixel As Long = 2&
m_TIFF.Index = Combo1.ListIndex + 1
w = m_TIFF.Width
h = m_TIFF.Height
cy = Me.ScaleHeight - Combo1.Height
If Me.ScaleWidth / w > cy / h Then
sngRatio = cy / h
Else
sngRatio = Me.ScaleWidth / w
End If
If sngRatio > 1! Then sngRatio = 1&
cx = w * sngRatio
cy = h * sngRatio
x = (Me.ScaleWidth - cx) \ 2
Y = ((Me.ScaleHeight - Combo1.Height) - cy) \ 2 + Combo1.Height
Me.Cls
GdipCreateFromHDC Me.hDC, hGraphics
GdipDrawImageRectRectI hGraphics, m_TIFF.Handle, x, Y, cx, cy, 0, 0, w, h, UnitPixel, 0, 0, 0
GdipDeleteGraphics hGraphics
End If
End Sub
Private Sub pvReset()
Dim t As Long, sItem As String
Combo1.Clear
For t = 1 To m_TIFF.ImageCount
sItem = t & ". " & m_TIFF.Width(t) & " x " & m_TIFF.Height(t)
sItem = sItem & " DPI: " & CLng(m_TIFF.DPI_Horizontal(t)) & " x " & CLng(m_TIFF.DPI_Vertical(t))
Combo1.AddItem sItem
Next
If Combo1.ListCount Then
Combo1.ListIndex = 0
Else
MsgBox "No images were loaded"
End If
End Sub
Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, Y As Single)
If Data.Files.Count Then
m_TIFF.FileName = Data.Files.Item(1)
Call pvReset
End If
End Sub
'Return values:
'
' -1 = Less Than
' 0 = Equal
' 1 = Greater Than
Option Explicit
Private WithEvents ListViewCustomSort As ListViewCustomSort
Private Function MakeName() As String
Const LETTERS As String = "abcdefghijklmnopqrstuvwxyz"
Dim I As Long
Dim IMax As Long
Dim J As Long
Dim Words() As String
IMax = Int(3 * Rnd()) + 1
ReDim Words(IMax)
For I = 0 To IMax
For J = 1 To Int(8 * Rnd()) + 2
Words(I) = Words(I) & Mid$(LETTERS, Int(26 * Rnd()) + 1, 1)
Next
Words(I) = StrConv(Words(I), vbProperCase)
Next
MakeName = Join$(Words, " ")
End Function
Private Sub cmdSortBy_Click(Index As Integer)
Select Case Index
Case 0
With ListView1
.SortKey = 0
.SortOrder = IIf(chkAscending.Value = vbChecked, lvwAscending, lvwDescending)
.Sorted = True
End With
Case 1, 2
ListViewCustomSort.Sort ListView1, Index, chkAscending.Value = vbChecked
End Select
End Sub
Private Sub Form_Load()
Dim I As Long
Randomize
Set ListViewCustomSort = New ListViewCustomSort
With ListView1.ColumnHeaders
.Add , , "Col 0", 3600, lvwColumnLeft
.Add , , "Col 1", 1080, lvwColumnRight
.Add , , "Col 2", 1080, lvwColumnRight
End With
With ListView1
With .ListItems
For I = 1 To 1000
With .Add(, , MakeName()) 'String.
.SubItems(1) = Format$(DateAdd("d", -Int(1000 * Rnd()), Date), "m/d/yyyy") 'Date.
.SubItems(2) = CStr(20000! * Rnd() - 10000!) 'Single.
End With
Next
End With
Set .SelectedItem = Nothing
End With
End Sub
Private Sub Form_Resize()
If WindowState <> vbMinimized Then
With Picture1
.Move 0, ScaleHeight - .Height
ListView1.Move 0, 0, ScaleWidth, .Top
End With
End If
End Sub
Private Sub ListViewCustomSort_Compare( _
ByVal SortKey As Long, _
ByVal Ascending As Boolean, _
ItemText1 As String, _
ItemText2 As String, _
Cmp As Long)
Dim Parts() As String
Dim Date1 As Date
Dim Date2 As Date
Dim Single1 As Single
Dim Single2 As Single
Select Case SortKey
Case 1
Parts = Split(ItemText1, "/")
Date1 = DateSerial(CInt(Parts(2)), CInt(Parts(0)), CInt(Parts(1)))
Parts = Split(ItemText2, "/")
Date2 = DateSerial(CInt(Parts(2)), CInt(Parts(0)), CInt(Parts(1)))
Cmp = Sgn(CLng(Date1) - CLng(Date2))
Case 2
Single1 = CSng(ItemText1)
Single2 = CSng(ItemText2)
Cmp = Sgn(Single1 - Single2)
End Select
If Not Ascending Then Cmp = -Cmp
End Sub
Option Explicit
Private Declare Function GdipDeleteGraphics Lib "GdiPlus.dll" (ByVal mGraphics As Long) As Long
Private Declare Function GdipDrawImageRectRectI Lib "GdiPlus.dll" (ByVal hGraphics As Long, ByVal hImage As Long, ByVal dstX As Long, ByVal dstY As Long, ByVal dstWidth As Long, ByVal dstHeight As Long, ByVal srcX As Long, ByVal srcY As Long, ByVal srcWidth As Long, ByVal srcHeight As Long, ByVal srcUnit As Long, ByVal imageAttributes As Long, ByVal Callback As Long, ByVal callbackData As Long) As Long
Private Declare Function GdipCreateFromHDC Lib "GdiPlus.dll" (ByVal hDC As Long, hGraphics As Long) As Long
Private Declare Sub GdiplusShutdown Lib "gdiplus" (ByVal Token As Long)
Private Declare Function GdiplusStartup Lib "gdiplus" (Token As Long, inputbuf As Any, Optional ByVal outputbuf As Long = 0) As Long
Private Type GdiplusStartupInput
GdiplusVersion As Long
DebugEventCallback As Long
SuppressBackgroundThread As Long
SuppressExternalCodecs As Long
End Type
Private m_Token As Long
Private m_TIFF As cTIFFreader
Private Sub Form_Load()
If Me.Combo1.Style <> 2 Then
Me.Show
DoEvents
MsgBox "The combo box must be set to Style=2", vbExclamation + vbOKOnly
Unload Me
Exit Sub
End If
Call pvCreateToken
If m_Token = 0 Or m_Token = -1 Then
Me.Show
DoEvents
MsgBox "Failed to start up GDI+", vbExclamation + vbOKOnly
Unload Me
Exit Sub
End If
Set m_TIFF = New cTIFFreader
Me.Move (Screen.Width - 10245) \ 2, (Screen.Height - 6585) \ 2, 10245, 6585
Me.ScaleMode = vbPixels
Me.Combo1.Move 0, 0, Me.ScaleWidth \ 2
Me.Command1.Move Me.Combo1.Width + 6, 0, Me.Command1.Width, Me.Combo1.Height
Me.Command1.Caption = "Refresh"
Me.OLEDropMode = vbOLEDropManual
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set m_TIFF = Nothing
If Not (m_Token = 0& Or m_Token = -1&) Then pvDestroyToken
End Sub
Private Function pvCreateToken() As Boolean
Dim GSI As GdiplusStartupInput
On Error Resume Next
If Not m_Token = -1 Then
GSI.GdiplusVersion = 1&
Call GdiplusStartup(m_Token, GSI)
If m_Token = 0 Then
m_Token = -1&
Else
pvCreateToken = True
End If
End If
End Function
Private Sub pvDestroyToken()
If Not (m_Token = 0 Or m_Token = -1) Then GdiplusShutdown m_Token
m_Token = 0&
End Sub
Private Sub Command1_Click()
Call Combo1_Click
End Sub
Private Sub Combo1_Click()
If Not m_TIFF.ImageCount = 0& Then
Dim hGraphics As Long, w As Long, h As Long, sngRatio As Single
Dim x As Long, Y As Long, cx As Long, cy As Long
Const UnitPixel As Long = 2&
m_TIFF.Index = Combo1.ListIndex + 1
w = m_TIFF.Width
h = m_TIFF.Height
cy = Me.ScaleHeight - Combo1.Height
If Me.ScaleWidth / w > cy / h Then
sngRatio = cy / h
Else
sngRatio = Me.ScaleWidth / w
End If
If sngRatio > 1! Then sngRatio = 1&
cx = w * sngRatio
cy = h * sngRatio
x = (Me.ScaleWidth - cx) \ 2
Y = ((Me.ScaleHeight - Combo1.Height) - cy) \ 2 + Combo1.Height
Me.Cls
GdipCreateFromHDC Me.hDC, hGraphics
GdipDrawImageRectRectI hGraphics, m_TIFF.Handle, x, Y, cx, cy, 0, 0, w, h, UnitPixel, 0, 0, 0
GdipDeleteGraphics hGraphics
End If
End Sub
Private Sub pvReset()
Dim t As Long, sItem As String
Combo1.Clear
For t = 1 To m_TIFF.ImageCount
sItem = t & ". " & m_TIFF.Width(t) & " x " & m_TIFF.Height(t)
sItem = sItem & " DPI: " & CLng(m_TIFF.DPI_Horizontal(t)) & " x " & CLng(m_TIFF.DPI_Vertical(t))
Combo1.AddItem sItem
Next
If Combo1.ListCount Then
Combo1.ListIndex = 0
Else
MsgBox "No images were loaded"
End If
End Sub
Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, Y As Single)
If Data.Files.Count Then
m_TIFF.FileName = Data.Files.Item(1)
Call pvReset
End If
End Sub
Option Explicit
Private Declare Function GdipDeleteGraphics Lib "GdiPlus.dll" (ByVal mGraphics As Long) As Long
Private Declare Function GdipDrawImageRectRectI Lib "GdiPlus.dll" (ByVal hGraphics As Long, ByVal hImage As Long, ByVal dstX As Long, ByVal dstY As Long, ByVal dstWidth As Long, ByVal dstHeight As Long, ByVal srcX As Long, ByVal srcY As Long, ByVal srcWidth As Long, ByVal srcHeight As Long, ByVal srcUnit As Long, ByVal imageAttributes As Long, ByVal Callback As Long, ByVal callbackData As Long) As Long
Private Declare Function GdipCreateFromHDC Lib "GdiPlus.dll" (ByVal hDC As Long, hGraphics As Long) As Long
Private Declare Sub GdiplusShutdown Lib "gdiplus" (ByVal Token As Long)
Private Declare Function GdiplusStartup Lib "gdiplus" (Token As Long, inputbuf As Any, Optional ByVal outputbuf As Long = 0) As Long
Private Type GdiplusStartupInput
GdiplusVersion As Long
DebugEventCallback As Long
SuppressBackgroundThread As Long
SuppressExternalCodecs As Long
End Type
Private m_Token As Long
Private m_JPG As cJPGreader
Private Sub Form_Load()
Call pvCreateToken
If m_Token = 0 Or m_Token = -1 Then
Me.Show
DoEvents
MsgBox "Failed to start up GDI+", vbExclamation + vbOKOnly
Unload Me
Exit Sub
End If
Set m_JPG = New cJPGreader
Me.Move (Screen.Width - 10245) \ 2, (Screen.Height - 6585) \ 2, 10245, 6585
Me.ScaleMode = vbPixels
Me.Command1.Move 0, 0
Me.Command1.Caption = "Refresh"
Me.OLEDropMode = vbOLEDropManual
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set m_JPG = Nothing
If Not (m_Token = 0& Or m_Token = -1&) Then pvDestroyToken
End Sub
Private Function pvCreateToken() As Boolean
Dim GSI As GdiplusStartupInput
On Error Resume Next
If Not m_Token = -1 Then
GSI.GdiplusVersion = 1&
Call GdiplusStartup(m_Token, GSI)
If m_Token = 0 Then
m_Token = -1&
Else
pvCreateToken = True
End If
End If
End Function
Private Sub pvDestroyToken()
If Not (m_Token = 0 Or m_Token = -1) Then GdiplusShutdown m_Token
m_Token = 0&
End Sub
Private Sub Command1_Click()
Call pvRenderImage
End Sub
Private Sub pvRenderImage()
If Not m_JPG.Handle = 0& Then
Dim hGraphics As Long, w As Long, h As Long, sngRatio As Single
Dim x As Long, Y As Long, cx As Long, cy As Long
Const UnitPixel As Long = 2&
w = m_JPG.Width
h = m_JPG.Height
cy = Me.ScaleHeight - Command1.Height
If Me.ScaleWidth / w > cy / h Then
sngRatio = cy / h
Else
sngRatio = Me.ScaleWidth / w
End If
If sngRatio > 1! Then sngRatio = 1&
cx = w * sngRatio
cy = h * sngRatio
x = (Me.ScaleWidth - cx) \ 2
Y = ((Me.ScaleHeight - Command1.Height) - cy) \ 2 + Command1.Height
Me.Cls
GdipCreateFromHDC Me.hDC, hGraphics
GdipDrawImageRectRectI hGraphics, m_JPG.Handle, x, Y, cx, cy, 0, 0, w, h, UnitPixel, 0, 0, 0
GdipDeleteGraphics hGraphics
End If
End Sub
Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, Y As Single)
If Data.Files.Count Then
m_JPG.FileName = Data.Files.Item(1)
Call pvRenderImage
End If
End Sub
Option Explicit
Private Declare Function GdipDeleteGraphics Lib "GdiPlus.dll" (ByVal mGraphics As Long) As Long
Private Declare Function GdipDrawImageRectRectI Lib "GdiPlus.dll" (ByVal hGraphics As Long, ByVal hImage As Long, ByVal dstX As Long, ByVal dstY As Long, ByVal dstWidth As Long, ByVal dstHeight As Long, ByVal srcX As Long, ByVal srcY As Long, ByVal srcWidth As Long, ByVal srcHeight As Long, ByVal srcUnit As Long, ByVal imageAttributes As Long, ByVal Callback As Long, ByVal callbackData As Long) As Long
Private Declare Function GdipCreateFromHDC Lib "GdiPlus.dll" (ByVal hDC As Long, hGraphics As Long) As Long
Private Declare Sub GdiplusShutdown Lib "gdiplus" (ByVal Token As Long)
Private Declare Function GdiplusStartup Lib "gdiplus" (Token As Long, inputbuf As Any, Optional ByVal outputbuf As Long = 0) As Long
Private Type GdiplusStartupInput
GdiplusVersion As Long
DebugEventCallback As Long
SuppressBackgroundThread As Long
SuppressExternalCodecs As Long
End Type
Private m_Token As Long
Private m_BMP As cBMPreader
Private Sub Form_Load()
Call pvCreateToken
If m_Token = 0 Or m_Token = -1 Then
Me.Show
DoEvents
MsgBox "Failed to start up GDI+", vbExclamation + vbOKOnly
Unload Me
Exit Sub
End If
Set m_BMP = New cBMPreader
Me.Move (Screen.Width - 10245) \ 2, (Screen.Height - 6585) \ 2, 10245, 6585
Me.ScaleMode = vbPixels
Me.Command1.Move 0, 0
Me.Command1.Caption = "Refresh"
Me.OLEDropMode = vbOLEDropManual
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set m_BMP = Nothing
If Not (m_Token = 0& Or m_Token = -1&) Then pvDestroyToken
End Sub
Private Function pvCreateToken() As Boolean
Dim GSI As GdiplusStartupInput
On Error Resume Next
If Not m_Token = -1 Then
GSI.GdiplusVersion = 1&
Call GdiplusStartup(m_Token, GSI)
If m_Token = 0 Then
m_Token = -1&
Else
pvCreateToken = True
End If
End If
End Function
Private Sub pvDestroyToken()
If Not (m_Token = 0 Or m_Token = -1) Then GdiplusShutdown m_Token
m_Token = 0&
End Sub
Private Sub Command1_Click()
Call pvRenderImage
End Sub
Private Sub pvRenderImage()
If Not m_BMP.Handle = 0& Then
Dim hGraphics As Long, w As Long, h As Long, sngRatio As Single
Dim X As Long, Y As Long, cx As Long, cy As Long
Const UnitPixel As Long = 2&
w = m_BMP.Width
h = m_BMP.Height
cy = Me.ScaleHeight - Command1.Height
If Me.ScaleWidth / w > cy / h Then
sngRatio = cy / h
Else
sngRatio = Me.ScaleWidth / w
End If
If sngRatio > 1! Then sngRatio = 1&
cx = w * sngRatio
cy = h * sngRatio
X = (Me.ScaleWidth - cx) \ 2
Y = ((Me.ScaleHeight - Command1.Height) - cy) \ 2 + Command1.Height
Me.Cls
GdipCreateFromHDC Me.hDC, hGraphics
GdipDrawImageRectRectI hGraphics, m_BMP.Handle, X, Y, cx, cy, 0, 0, w, h, UnitPixel, 0, 0, 0
GdipDeleteGraphics hGraphics
End If
End Sub
Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Data.Files.Count Then
m_BMP.FileName = Data.Files.Item(1)
Call pvRenderImage
End If
End Sub
Private Sub paper_MouseMove(Button As Integer, Shift As Integer, X As Single, y As Single)
Static timestamp As Double
If timestamp = 0 Then timestamp = Timer
If (timestamp + 0.05) > Timer Then Exit Sub
timestamp = Timer
Option Explicit
Private SrcBytes420_12Bit() As Byte, DecIYUV As New cICMDecode
Private SrcBytes422_16Bit() As Byte, DecYUY2 As New cICMDecode
Private DstDIB As cDIB '<- to provide the RGB24-decoding-buffer for both cases
Private Sub Form_Load()
'try to open the two different ICM-Decoders first
If Not DecIYUV.OpenDecoder(640, 480, DecIYUV.Make4CC("IYUV"), 12, 24) Then
MsgBox "Couldn't open the IYUV(4:2:0) decoder": Unload Me: Exit Sub
End If
If Not DecYUY2.OpenDecoder(640, 480, DecYUY2.Make4CC("YUY2"), 16, 24) Then
MsgBox "Couldn't open the YUY2(4:2:2) decoder": Unload Me: Exit Sub
End If
SrcBytes420_12Bit = New_c.FSO.ReadByteContent(App.Path & "\Planar YUV420.dat")
SrcBytes422_16Bit = New_c.FSO.ReadByteContent(App.Path & "\Interleaved YUV422.dat")
Set DstDIB = New_c.DIB(640, 480) 'allocate RGB24 decoding-memory in DstDIB
End Sub
Private Sub cmd420_Click()
New_c.Timing True
DecIYUV.Decode VarPtr(SrcBytes420_12Bit(0)), UBound(SrcBytes420_12Bit) + 1, DstDIB.pDIB
Caption = New_c.Timing
DstDIB.DrawTo picVidImg.hDC
End Sub
Private Sub cmd422_Click()
New_c.Timing True
DecYUY2.Decode VarPtr(SrcBytes422_16Bit(0)), UBound(SrcBytes422_16Bit) + 1, DstDIB.pDIB
Caption = New_c.Timing
DstDIB.DrawTo picVidImg.hDC
End Sub
Private Sub paper_MouseMove(Button As Integer, Shift As Integer, X As Single, y As Single)
Static timestamp As Double
If timestamp = 0 Then timestamp = Timer
If (timestamp + 0.05) > Timer Then Exit Sub
timestamp = Timer