• Log in or sign up for an account here: https://www.sythe.org/login

[Source] Easy Icon Extractor

Sweet Celestia

Newcomer
Joined
Jun 20, 2012
Sythe Gold
0
Messages
1
Location
America
[Source] Easy Icon Extractor
small little program that uses GDI+ to get an image from any file type.

You need:
2 buttons
1 picturebox

Code:
Imports System.Drawing
Imports System.Drawing.Imaging

Open button:
Code:
Dim OpenFileDialog As New OpenFileDialog

        OpenFileDialog.Title = "Select File"
        OpenFileDialog.Filter = "All Files (*.*)|*.*"

        If OpenFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then

            PictureBox.Image = Drawing.Icon.ExtractAssociatedIcon(OpenFileDialog.FileName).ToBitmap

        End If

Then just save the image loaded into the picturebox with this.

Save Icon button:
Code:
Dim saveDialog As New SaveFileDialog

        SaveFileDialog.Title = "Save Image"
        SaveFileDialog.Filter = _
            "Image File Types (*.bmp,*.gif,*.ico,*.jpg,*.jpeg,*.png)|*.bmp;*.gif;*.ico;*.jpg;*.jpeg;*.png"

        If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then

            PictureBox.Image.Save(SaveFileDialog.FileName)

        End If

Just copy and paste!

I churned this out yesterday and I thought I would share.
Here are the project files if you desire them.

Download Project Files (ZIP Format)

+ a standalone executable if you wish.

Download Standalone (EXE Format)
 
Runescape Gamblingrunescape gambling
Back
Top