Advertisement
enos

Globalmodule.vb

Jul 25th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.73 KB | None | 0 0
  1. Module GlobalModule
  2.     Public tipePengguna As String
  3.     Public Sub powerutility(ByVal kar As String)
  4.         System.Diagnostics.Process.Start("shutdown", "/" & kar)
  5.     End Sub
  6.     Public Function Crop(ByVal bmp As Bitmap) As Bitmap
  7.         Dim tmp As New Bitmap(100, 100)
  8.  
  9.         For i As Integer = 1 To 100
  10.             For j As Integer = 1 To 100
  11.                 tmp.SetPixel(i - 1, j - 1, bmp.GetPixel(i + 96, j + 56))
  12.             Next
  13.         Next
  14.         Return tmp
  15.     End Function
  16.     Public Function Konvert(ByVal img() As Byte) As Image
  17.         Dim ms As New IO.MemoryStream(img)
  18.         Dim pict As New PictureBox
  19.         pict.Image = Image.FromStream(ms)
  20.         Return pict.Image
  21.     End Function
  22. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement