|
-
Feb 15th, 2009, 02:04 PM
#1
Thread Starter
Addicted Member
Changing the Icon in a VB Form
THREAD RESOLVED
Hi, how do you change the Icon in the top left of a form? I tried to change it and it couldn't find any of my pictures. Do they have to be a particular size or file type?
Thanks
Last edited by Pantero; Feb 16th, 2009 at 02:20 PM.
Im using visual basic 2008 express edition so any posts that include coding or stuff PLEASE refer to vb 2008.
"A clever person solves problems, a wise person avoids them" 
-
Feb 15th, 2009, 02:11 PM
#2
Re: Changing the Icon in a VB Form
Hey,
This is how you would do it at runtime:
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Icon = New Icon("1.ico")
End Sub
However, at design time, you can set this property in Visual Studio.
Gary
-
Feb 15th, 2009, 02:12 PM
#3
Re: Changing the Icon in a VB Form
And yes, in order to show correctly, they would have to be the same size as the default icon which shows on the form. I think this is 16x16.
Gary
-
Feb 15th, 2009, 02:33 PM
#4
Thread Starter
Addicted Member
Re: Changing the Icon in a VB Form
how can i get it to the required size? And the actual size is 32X32 but what units? Also when you said "you can set this property in Visual Studio" do u mean by going on the properties of the form and clicking on the "Icon" bit?
Im using visual basic 2008 express edition so any posts that include coding or stuff PLEASE refer to vb 2008.
"A clever person solves problems, a wise person avoids them" 
-
Feb 15th, 2009, 02:38 PM
#5
Re: Changing the Icon in a VB Form
You would need to resize the image. You can do this in any drawing package.
And yes, that is what I mean about going to the properties.
-
Feb 15th, 2009, 03:05 PM
#6
Thread Starter
Addicted Member
Re: Changing the Icon in a VB Form
yes i used paint to resize it but it still cant seem to find it. Any more ideas?
Im using visual basic 2008 express edition so any posts that include coding or stuff PLEASE refer to vb 2008.
"A clever person solves problems, a wise person avoids them" 
-
Feb 15th, 2009, 03:22 PM
#7
Re: Changing the Icon in a VB Form
If you look at the properties of the main form, there is a property called "Icon" where you can click and open a browser. Browse to the file and select it. It is expected to be of type "ico".
-
Feb 15th, 2009, 03:37 PM
#8
Thread Starter
Addicted Member
Re: Changing the Icon in a VB Form
yes i clicked the "Icon" and i searched for my file but it still cant seem to find it. How do i make my picture of type "ico"?
Im using visual basic 2008 express edition so any posts that include coding or stuff PLEASE refer to vb 2008.
"A clever person solves problems, a wise person avoids them" 
-
Feb 15th, 2009, 03:57 PM
#9
Re: Changing the Icon in a VB Form
-
Feb 16th, 2009, 02:13 AM
#10
Re: Changing the Icon in a VB Form
yes i clicked the "Icon" and i searched for my file but it still cant seem to find it. How do i make my picture of type "ico"?
What do you mean you can't seem to find it?
-
Feb 16th, 2009, 02:16 AM
#11
Re: Changing the Icon in a VB Form
How do i make my picture of type "ico"?
There is actually an icon editor within Visual Studio. Right Click on your project, add new item, and then select Icon File.
Gary
-
Feb 16th, 2009, 01:39 PM
#12
Thread Starter
Addicted Member
Re: Changing the Icon in a VB Form
i mean i cant find my picture when im looking for it through visual studio. I dont think its the right size.
Im using visual basic 2008 express edition so any posts that include coding or stuff PLEASE refer to vb 2008.
"A clever person solves problems, a wise person avoids them" 
-
Feb 16th, 2009, 02:09 PM
#13
Thread Starter
Addicted Member
Re: Changing the Icon in a VB Form
oh i just saw bulldogs link and i downloaded the program and succesfully converted the icon. It is now working. Thanks
THREAD RESOLVED
Im using visual basic 2008 express edition so any posts that include coding or stuff PLEASE refer to vb 2008.
"A clever person solves problems, a wise person avoids them" 
-
Feb 16th, 2009, 02:15 PM
#14
Re: Changing the Icon in a VB Form
Got there in the end!
Please mark the thread resolved.
-
Feb 16th, 2009, 02:20 PM
#15
Thread Starter
Addicted Member
Re: Changing the Icon in a VB Form
i cant mark it resolved because i have a problem with the java script or so ive been told instead i will edit my first post and say it is resolved from there. I have already rated u positive so i cant give you positive feedback for a while. Thanks for your help bulldog and gep
Im using visual basic 2008 express edition so any posts that include coding or stuff PLEASE refer to vb 2008.
"A clever person solves problems, a wise person avoids them" 
-
Feb 16th, 2009, 02:56 PM
#16
Member
Re: Changing the Icon in a VB Form
even though the thread is resolved, you can convert your images into Icons with
http://convertico.com
VB 2008 Beginner
I'll Try And Help As Much As I Can
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|