Hack Forums
[.NET] watch screen capture in listview [src] vb.net - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] watch screen capture in listview [src] vb.net (/showthread.php?tid=4757983)



watch screen capture in listview [src] vb.net - xVipX - Apr 1, 2015

hey today i have coding simple function to add image gif or somthing
in imaglist then in listview imageindx then controle the size of image with
listview.coloumns(0).widith this is image gif show y how it work
[img]http://up.dev-point.com/uploads1/3186b2f295f21.gif[/img]

source:
coder <--- me
http://www.mediafire.com/download/73f31pq60hwwus4/screen+by+xvipx.rar


good luck :)


* - evilivid - Apr 1, 2015

Code
Dim b As New ListViewItem
    'coded by xvipx  
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      l1.ContextMenuStrip = ContextMenuStrip1

    End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

      Try
      Dim bounds As Rectangle
      Dim screenshot As System.Drawing.Bitmap
      Dim graph As Graphics
      bounds = Screen.PrimaryScreen.Bounds
      screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
      graph = Graphics.FromImage(screenshot)
      graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
      PictureBox1.Image = screenshot
      l1.SmallImageList = img
      l1.LargeImageList = img
      img.Images.Clear()
      Dim size As New Size(l1.Columns(0).Width, l1.Columns(0).Width)
      ' Dim x As New Size(HScrollBar1.Value, HScrollBar1.Value) ' controle size by hscorlba

      ' img.ImageSize = x

      img.ImageSize = size
      img.Images.Add(PictureBox1.Image)
      PictureBox1.Hide()

      Catch ex As Exception
      End Try

    End Sub

    Private Sub JffffToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles JffffToolStripMenuItem.Click
      Timer1.Start()
      b.SubItems.Add("xvipx")
      b.ImageIndex = 0
      l1.Items.Add(b)
    End Sub

Much easier than downloading your entire project files.


* - Only3 - Apr 1, 2015

why listview
Me.Controls.Add(New PictureBox With {.Dock = DockStyle.Fill, .SizeMode = PictureBoxSizeMode.StretchImage, .Image = Screen})


* - xVipX - Apr 2, 2015

(Apr 1, 2015 03:17 PM)Only3 Wrote:  why listview
Me.Controls.Add(New PictureBox With {.Dock = DockStyle.Fill, .SizeMode = PictureBoxSizeMode.StretchImage, .Image = Screen})
yes i now :p
i put this to show for all how to add image gif ... in listview & controle the size
of imagelist