Re: Icon Ripper
Posted: Fri Sep 18, 2009 6:00 pm
thnxx...!!!
Sharing, Teaching and Supporting coders of all ages and levels since 2009
https://www.codenstuff.com/forum/
Imports System.Drawing
Imports System.IO
Public Class Form1
Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
Dim savedialog1 As New SaveFileDialog
SaveFileDialog1.Filter = "Portable Network Graphic(*.png)|*.png |All Files | *.*"
If SaveFileDialog1.ShowDialog() = DialogResult.OK Then
PictureBox1.Image.Save(SaveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Icon)
End If
End Sub
Private Sub BrowseRip_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BrowseRip.Click
Using ofd As New OpenFileDialog
ofd.Filter = ".exe (*exe*)|*.exe*"
ofd.Title = "Select File"
If ofd.ShowDialog() = Windows.Forms.DialogResult.OK Then
TextBox1.Text = ofd.FileName
End If
End Using
Dim ricon As Icon = Drawing.Icon.ExtractAssociatedIcon(TextBox1.Text)
PictureBox1.Image = ricon.ToBitmap
End Sub
End Class