HOME | DD

SuprVillain — Replace Icons App

Published: 2011-01-25 22:50:02 +0000 UTC; Views: 11156; Favourites: 30; Downloads: 3910
Redirect to original
Description So I had this idea. People wanted to change the available icons from my last two apps, STR and StBM, and I made it possible, but what if they did not like the app's Icon itself?

This is a small app that should be very popular with hackers, themers and customizers. You can specify an app, to have it's display Icon changed, then choose the new Icon, and click on "Replace Icon".

If your currently running the app, it wont let you do the change, then app that your changeing the icon on cant be running or in use, or else you will get a message letting you that it cant be done.

Now, for the only limitation. This is a VB6 app. That means that it can only use icons that are 24bit depth or lower. I am trying to make this app in .NET (or i will try some time soon) so that we can use up to 32bit depth support.

But as far as now goes, your limited to 24bit depth icons, sorry.
Related content
Comments: 26

drsouvikkumar [2011-03-22 14:34:19 +0000 UTC]

i tried it for utorrent, but after successfully replaced icon, utorrent did not open,

👍: 0 ⏩: 1

SuprVillain In reply to drsouvikkumar [2011-03-22 15:53:32 +0000 UTC]

some, not many, apps are protected like that. Sorry. Your going to have to either re-download, or if you made a backup.exe, rename and use that.

👍: 0 ⏩: 0

bkult [2011-01-28 12:21:04 +0000 UTC]

frikkin awesome dude

👍: 0 ⏩: 0

zero1one0 [2011-01-28 03:09:37 +0000 UTC]

How do you actually revert to the original icon?

👍: 0 ⏩: 1

SuprVillain In reply to zero1one0 [2011-01-28 03:48:42 +0000 UTC]

If you left the "Backup before Replace" checkbox clicked, simply go to the folder, delete the file with the new icon, and find the file that has .bak at the end of the file name. Rename the file, just delete the ".bak" from the file name. Windows will ask you if you want to do this, click Yes / Ok / whatever it says. Now you have back the original file with the original icon.

👍: 0 ⏩: 0

samiwieciekto [2011-01-26 15:33:08 +0000 UTC]

...points for gui, concept - motivation ...critique for not writing that in .NET or anything else modern

Honestly, what is Your biggest issue with coding in .NET?

👍: 0 ⏩: 1

SuprVillain In reply to samiwieciekto [2011-01-26 16:48:29 +0000 UTC]

vb.net has a LOT of new things, and it can do so much it just fries my mind. I just need to take my time with it and get used to the new syntax i guess.

Also, VB has a runtime dependancy of about 9MB, as where .Net needs it's framework, and that is about 20MB, and there is .Net 1, 2, 3, 3.5, and now 4. If some one does not have the framework for the app that i wrote it's filesize increases alot, due to them having to download the framework.

👍: 0 ⏩: 1

samiwieciekto In reply to SuprVillain [2011-01-26 17:14:47 +0000 UTC]

.NET 2.0 is standard now (since XP SP1 if I recall) - You can change targeted framework in project page to desired one.

On syntax - it is mostly the same - what gives You most struggle?

👍: 0 ⏩: 1

SuprVillain In reply to samiwieciekto [2011-01-26 17:20:52 +0000 UTC]

almost all of it. I have tried importing some of my vb6 source code, code only, mind you, like classes and modules, and they dont work. I knew that there would be compatability problems, but that is redicilous.

👍: 0 ⏩: 1

samiwieciekto In reply to SuprVillain [2011-01-26 17:32:06 +0000 UTC]

Example of module, class - its function - You tried to convert?

👍: 0 ⏩: 1

SuprVillain In reply to samiwieciekto [2011-01-26 17:36:00 +0000 UTC]

no, i have not found a FREE vb6 to vb.net converter yet. Visual Studio 2008 is what i have.

👍: 0 ⏩: 1

samiwieciekto In reply to SuprVillain [2011-01-26 17:39:28 +0000 UTC]

Meant what was function of what You tried to convert - did You use any API references, stream methods etc.

👍: 0 ⏩: 1

SuprVillain In reply to samiwieciekto [2011-01-26 18:03:05 +0000 UTC]

yes to api references, and stream methods really confuse me.

👍: 0 ⏩: 1

samiwieciekto In reply to SuprVillain [2011-01-26 18:35:38 +0000 UTC]

Did You gave snippets tool a look? It might be useful for You to grasp changes.

👍: 0 ⏩: 1

SuprVillain In reply to samiwieciekto [2011-01-26 18:39:54 +0000 UTC]

nope. i have not looked at it. thanks for the suggestions!

👍: 0 ⏩: 1

samiwieciekto In reply to SuprVillain [2011-01-26 20:08:48 +0000 UTC]

By the way:
Dim percent as integer=75
Dim height as integerercent *16\100
Dim handle as intptr
using image=new bitmap(16,16,system.drawing.imaging.imageformat.pargb32)
using gr = graphics.fromimage(image)
gr.fillrectangle(brushes.aquamarine,0,16-height,16,height)
end using
height = nothing
percent = nothing
handle = image.getHicon
Dim icon = icon.fromHandle(handle)
'theoretically You should destroy handle with DestroyIcon after using, implementing:
class soloicon
implements IDisposable
(...)
sub new(percent as integer)
(..)
end sub
sub dispose(disposing as boolean)
DestroyIcon(handle)
end sub
sub finalize
'destroy if not disposed for random reason
end sub
end class

might be better

👍: 0 ⏩: 1

SuprVillain In reply to samiwieciekto [2011-01-26 22:12:42 +0000 UTC]

source code for plotting an icon?

👍: 0 ⏩: 1

samiwieciekto In reply to SuprVillain [2011-01-26 22:32:15 +0000 UTC]

Black won't be returned 100% correctly (simplifying due to gethicon) - but yes.

👍: 0 ⏩: 1

SuprVillain In reply to samiwieciekto [2011-01-26 22:36:19 +0000 UTC]

black is not that big of a problem. I was thinking of doing a bitblt from the actual readout screen to a picturebox, then have the image load up the picturebox.image and set it as the icon, once a second.

👍: 0 ⏩: 1

samiwieciekto In reply to SuprVillain [2011-01-26 23:57:57 +0000 UTC]

WRONG Don't use picturebox, plus there is no need for bitblt, for what sake do You need creating dc's while You can keep it on basic level. On once a second I suggest setting - when icon changes enough to get change noticed. Also if You would decide to skip paint and use updatelayeredwindow instead it in theory could be considerably faster, plus easier to maintain like for example running in separate thread.

class soloimage
inherits control
sub new()
setstyle((...)doublebuffered or allpainting(...))
updatestyles()
end sub
protected overrides sub onpaint(...)
with e.graphics
using bufor=new bitmap(300,300)
using gr(...)
(...)
end using
using icon_image=new bitmap(16,16)
.drawimage(bufor,0,0,16,16)
end using
end using

.draw(...)
end with
end sub
end class

👍: 0 ⏩: 0

StDevilHeart [2011-01-26 10:44:16 +0000 UTC]

It's interesting how my name comes up relevantly in the preview

👍: 0 ⏩: 0

iDR3AM [2011-01-26 06:54:37 +0000 UTC]

Cool stuff!

👍: 0 ⏩: 0

soulcubee [2011-01-26 04:48:30 +0000 UTC]

nicee

👍: 0 ⏩: 0

sgtevmckay [2011-01-26 00:44:13 +0000 UTC]

\o/

👍: 0 ⏩: 0

tonosworld [2011-01-25 23:08:50 +0000 UTC]

Nice app!

👍: 0 ⏩: 1

SuprVillain In reply to tonosworld [2011-01-25 23:21:46 +0000 UTC]

Thanks! Glad that you like it!

👍: 0 ⏩: 0