ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[­ì³Ð] MD5 ­pºâ¾¹

[­ì³Ð] MD5 ­pºâ¾¹

¦h¦~«e¼gªºµ{¦¡, ¤ñ¸û²­® .............

MD5.zip (7.96 KB)
  1. Public Class Form1

  2.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  3.         OpenFileDialog1.FileName = ""

  4.         If OpenFileDialog1.ShowDialog() = 1 Then
  5.             Label1.Text = "Calculate MD5 sum in progress ..."
  6.             TextBox1.Text = Module1.MD5CalcFile(OpenFileDialog1.FileName)

  7.             If Len(Environment.CurrentDirectory) = 3 Then       'root directory
  8.                 Label1.Text = "MD5: " & vbCrLf & Mid(OpenFileDialog1.FileName, Len(Environment.CurrentDirectory) + 1, _
  9.                         Len(OpenFileDialog1.FileName) - Len(Environment.CurrentDirectory) - 0)
  10.             Else
  11.                 Label1.Text = "MD5: " & vbCrLf & Mid(OpenFileDialog1.FileName, Len(Environment.CurrentDirectory) + 2, _
  12.                         Len(OpenFileDialog1.FileName) - Len(Environment.CurrentDirectory) - 1)
  13.             End If
  14.         End If

  15.     End Sub

  16.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  17.         Label1.Text = "Filename"
  18.         TextBox1.Text = ""
  19.         Clipboard.Clear()
  20.     End Sub

  21.     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  22.         Clipboard.SetText(TextBox1.Text)
  23.     End Sub

  24.     Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
  25.         OpenFileDialog1.FileName = ""

  26.         If OpenFileDialog1.ShowDialog() = 1 Then
  27.             Label1.Text = "Calculate sha1sum sum in progress ..."
  28.             TextBox1.Text = Module1.Sha1CalcFile(OpenFileDialog1.FileName)

  29.             If Len(Environment.CurrentDirectory) = 3 Then       'root directory
  30.                 Label1.Text = "sha1sum: " & vbCrLf & Mid(OpenFileDialog1.FileName, Len(Environment.CurrentDirectory) + 1, _
  31.                         Len(OpenFileDialog1.FileName) - Len(Environment.CurrentDirectory) - 0)
  32.             Else
  33.                 Label1.Text = "sha1sum: " & vbCrLf & Mid(OpenFileDialog1.FileName, Len(Environment.CurrentDirectory) + 2, _
  34.                         Len(OpenFileDialog1.FileName) - Len(Environment.CurrentDirectory) - 1)
  35.             End If
  36.         End If

  37.     End Sub
  38. End Class
½Æ»s¥N½X

¥»©«³Ì«á¥Ñ flying008 ©ó 2010-10-14 08:40 ½s¿è
  1. [list=1]
  2. [*]Public Class Form1

  3. [*]    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4. [*]        OpenFileDialog1.FileName = ""
  5. [*]        If OpenFileDialog1.ShowDialog() = 1 Then
  6. [*]            Label1.Text = "Calculate MD5 sum in progress ..."
  7. [*]            TextBox1.Text = Module1.MD5CalcFile(OpenFileDialog1.FileName)
  8. [/list]
½Æ»s¥N½X
¨þ¨þ¡K¡K­ì来§Ú们论坛¯uªº¥i¥H¦bCODE«e­±¥[¤W¦æ号来发贴, 这样对检¯Á¥N码´N¤è«K¦h¤F, ¤µ¤Ñ¤S学¤F¤@©Û, 谢谢¤j¤j!
¥u¦³·Q¤£¨ìªº,
没¦³°µ¤£¨ìªº.

TOP

WinXP SP3:

TOP

¦^´_ 3# et5323


    ½Ð¦w¸Ë .net framework 2.0

TOP

        ÀR«ä¦Û¦b : ¨ü¤HÂI¤ô¤§®¦¡A¶··í´é¬u¥H³ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD