|
-
Jan 9th, 2009, 10:17 PM
#1
Thread Starter
Member
[RESOLVED] Can you help a noob out?
Well I am very young but I am ready to start useing VB. I already made a simple text editor (just like notepad almost) and I am looking to expand. Anyway I have 2 questions first of all is there any way I can change the skin of my project to make it look cooler? And secondly what is the code for linking to a website I want to put a button is that links to my site. How would I go about doing these to things? I am sorry if I posted in the wrong section but I am very new to this. I am useing VB 08 express ed. by the way
-
Jan 10th, 2009, 11:17 AM
#2
Re: Can you help a noob out?
Yeah you should of posted this in the Vb.NET section as vb 08, 05 or 03 all use Vb.NET. Here's a link to the correct place: http://www.vbforums.com/forumdisplay.php?f=25
Anyway, to answer your questions:
1. To change the 'skin' of your app, the easiest way is to download some third party components, www.componentfactory.com do a nice "Office 2007 style" form that is free (as part of the Krypton Toolkit) but im sure there are others out there.
2. To link to a website, you can just use the Process.Start method to make your website address open in the user's default web browser, like this:
vb Code:
Process.Start("http://www.mywebsite.com")
Although there are other ways of doing it, thats just my preference.
-
Jan 10th, 2009, 12:34 PM
#3
Thread Starter
Member
Re: Can you help a noob out?
Thankyou very much. I will try to post in the write section next time xD so once I download the skins how do I put them in? or will the automaticly appera. And how would I go about changing the icon of my application? Once again thankyou very much for the help.
-
Jan 10th, 2009, 05:53 PM
#4
Re: Can you help a noob out?
No the new skin wont automatically appear, nothing is that simple with programming i'm afraid I'll use the Krypton Form that I mentioned above as an example but note that the process may differ for other third party forms and it is also possible to create your own form designs but as you are new to VB.NET then I think that may be a little hard for you at the moment. By all means look into it though, do some google searches and search on these forums as well as I know plenty of other people (including myself) have asked the same question in the past.
Anyway, for the Krypton Forms you would do this:
1. you need to do is download and install the krypton toolkit.
2. Add a reference to the ComponentFactory.KryptonToolkit.dll file
3. Add a new form to your project
4. Click the "Show all files" button in Solution Explorer within Visual Studio and then open up the designer.resx file that is under your new form and change the line at the top that says this:
Inherits Windows.Forms.Form
to this:
Inherits ComponentFactory.Kryptontoolkit.KryptonForm
5. Save and close the designer file, then re-open your form and you should now see that it has a new border etc.
Once you have installed the kryptontoolkit you can also add nicer looking versions of buttons, checkboxes etc etc (note that they look pretty much exactly the same as the Vista buttons etc so will only looks different if your on XP). To add these just right click somewhere in the toolbox and go to Choose Items, then in the filter box type Krypton and then tick all of the krypton items apart from KryptonRibbon, KryptonGallery and KryptonNavigator (or something like that) as you have to pay for these 3 controls.
I'm sure there will be some parts of what I described above that you dont understand so you might want to watch some of the beginner videos on http://msdn.microsoft.com/en-gb/vstu...aspx#beginners to get more familiar with Visual Studio itself.
As for adding an icon, just double click on the "My Project" label/icon in Solution Explorer (on the right hand side) and then on the first screen that appears you should see a drop down box that lets you choose an icon.
-
Jan 11th, 2009, 10:53 AM
#5
Thread Starter
Member
Re: Can you help a noob out?
yeah I have tried to insert an icon but it says my icon is not a valid icon file. It has the .ico extention and the size is 32x32
-
Jan 11th, 2009, 10:54 AM
#6
Re: Can you help a noob out?
strange, have you tried other icon files?
-
Jan 11th, 2009, 10:59 AM
#7
Thread Starter
Member
Re: Can you help a noob out?
What do you mean? Othere than with the extension .ico? I didn't know there were other types
-
Jan 11th, 2009, 12:26 PM
#8
Re: Can you help a noob out?
no I mean are you just trying the same icon file over and over or have you tried selecting a different file to be used as your icon (just as a test)
-
Jan 11th, 2009, 12:33 PM
#9
Thread Starter
Member
Re: Can you help a noob out?
yeah. I've tried 3 differnt ones
-
Jan 11th, 2009, 01:42 PM
#10
Re: Can you help a noob out?
Where did the ICO files that you are trying come from then? Did you create them yourself or did you download them from a website and if so can you provide a link so that I can try them out and see if I have the same problem?
-
Jan 11th, 2009, 05:10 PM
#11
Thread Starter
Member
Re: Can you help a noob out?
-
Jan 11th, 2009, 05:57 PM
#12
Re: Can you help a noob out?
well that will be why then, how did you convert them to ICO files?
-
Jan 11th, 2009, 07:51 PM
#13
Thread Starter
Member
Re: Can you help a noob out?
I made them spesificly as icons. I created them by making the dementions 32x32 and after it was done I clicked save as and put the extension .ICO on it.
-
Jan 11th, 2009, 07:56 PM
#14
Re: Can you help a noob out?
just typing an extension doesnt mean they are ICO files. Thats exactly what Visual Studio is trying to tell you - not valid icon files.
Yes you can just type a file extension in, you can give any file any file extension you want but that doesnt change anything about the actual file itself. File extensions just exist to help tell programs (and Windows) what type of data format to expect within a file and of course they are also used to help windows select which program should open what type of files.
So you just typing .ICO at the end of the file means that Visual Studio will see it when you browse for icon files but when you try and load it then Visual Studio will realise that this doesnt contain the correct data for an ICO file.
So, here's what you need to do: download an ICO file converter to convert your Paint images into 'proper' ICO files or download some pre-made icons. Google will help you out either way.
-
Jan 11th, 2009, 08:02 PM
#15
Thread Starter
Member
Re: Can you help a noob out?
Ok thanks i'll check it out
-
Jan 13th, 2009, 08:10 PM
#16
Thread Starter
Member
Re: Can you help a noob out?
I can't seem to find the ComponentFactory.KryptonToolkit.dll file I only have the explorer and 2 installers
-
Jan 14th, 2009, 04:24 AM
#17
Re: Can you help a noob out?
Well yeah you have to install it first
-
Jan 14th, 2009, 07:30 AM
#18
Thread Starter
Member
Re: Can you help a noob out?
All I got was the explorer after I installed.
-
Jan 14th, 2009, 07:45 AM
#19
Re: Can you help a noob out?
In Visual Studio, go to the Toolbox and right click on it somewhere, then select "Choose Items". When a new window eventually appears, enter Krypton in the filter box and you should then see all of the Krypton controls. Tick all of the ones that you want to be added to your toolbox and then click OK. Now you can drag and drop these onto your form.
To change the form itself, once you have dragged one of the krypton controls onto your form it will have automatically added a reference to the DLL I mentioned so you can just do as I said in my other post to change the form style.
If you need more help on the krypton stuff just go here: www.componentfactory.com/forums/index.php
-
Jan 14th, 2009, 08:03 AM
#20
Thread Starter
Member
Re: Can you help a noob out?
oh ok I got it thanks alot. Sorry if my noob questions drove you insane xD
-
Feb 8th, 2009, 02:27 PM
#21
Addicted Member
Re: [RESOLVED] Can you help a noob out?
A great program to use for icons is icofx, its a free download. just google and you will find. With this you are able to use anything and turn it into an icon. You can use .bmp, or convert another .ico file that will now work with vb.
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
|