Icon Ripper

Post your questions regarding programming in Visual Basic 6 in here.
13 posts Page 2 of 2
Contributors
User avatar
Hli4S
VIP - Donator
VIP - Donator
Posts: 7
Joined: Fri Sep 18, 2009 4:25 pm

Re: Icon Ripper
Hli4S
thnxx...!!!
Hli4S.net Website Design & Development!

http://www.hli4s.net/
User avatar
bjm0008
Dedicated Member
Dedicated Member
Posts: 69
Joined: Thu Aug 13, 2009 2:35 am

Re: Icon Ripper
bjm0008
Code: Select all
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
Image
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

Re: Icon Ripper
Usman55
Hello everyone!

I also made a file of this type. It worked in this way:

1. Click the browse button and select the file whose icon you want, it can get the icon of any file you can think of! The icon will be placed (automatically) in the picturebox.

2. Press the save button and you could save it as an image of any type except Icon (lol).

I use a file called Icon Converter. It can convert images to icons or you can choose a file to extract the icon and save it in .ico format.

The programmer said that he made it entirely programmed in VB 2008!

Thanks.
Image
13 posts Page 2 of 2
Return to “General coding help”