Free VB Icons and Image Resources! | Updated – July 23rd, 2012

Click Star to Rate Post
1 Star2 Stars3 Stars4 Stars5 Stars (37 votes, average: 4.11 out of 5)

Completely Free VB Icons and Visual Basic.NET icons for your programs and applications!


For sure Icons/Images can really make your Visual Basic 6.0 and Visual Basic.NET applications stand out and shine. Unfortunately alot of the Icons you find either cost money and/or will not allow you to use them in a commercial based application. So that is where this little post comes in. I will continue to add free VB icons sources as they are found.

Note: While Visual Basic 5.0/6.0 and Visual Basic.NET 2002/2003 may come with icons, and VB 2005/2008 as well, you might want something alittle more unique.

Starting below are Free VB Icons and Visual Basic.NET icons sources


Added 07-23-2012

Icon Search Engine- This site has a very nice collection of icons for you to search. I found many icons in many different formats like tiff, and png. Even Transparent icons as well. Very simple to download without a ton of add or restrictions. Very few ads you have to wade through before you get to what your looking for!

Free VB Icons at Icon Site Search webpage

Added 08-27-2010

Icon Archive - There are quite a few Icons available at this site. It has a huge mixture of Completely Free-Royalty Free icons, Free for Non-Commercial, and Pay Icons. The site is organized pretty well and is easy to get the icon you want. Just remember to look at the license to decide if the license will fulfill your needs or not. Be sure to check out the rest of this page. Enjoy!

Added 06-12-10

FREE Stock Icons - This site has a huge list of icons that are not only Free but is also Royalty Free (RF, Basically means you don’t have to pay them anything if they are used in a money making application or whatever.). The free versions has possible limited image sizes and file formats. All of the free images are at least jpeg which is a perfectly fine format for most people. You can easily convert them to .ico if you want. If you want many different sizes and multiple image formats you can Sign-Up for a account for a certain fee depending on what kind of access you want. Still the 100% free icon images were good quality and had a few different sizes and came in jpeg and .png formats. Most sizes has a Watermark but I think the 48×48 has no Watermark at all and is fully compatible and free  for your applications! The ones I downloaded at least…

Simple screenshot of the website for free VB icons


FamFam Mini Icons - These are about 144 various icons that you can use for ANY purpose. Completely royalty FREE and are actually good quality as well.


FamFam Flag Icons - This link has alot of various Flag based icons and images. These are completely Royalty FREE and you can use them in ANY type of application, whether its free, shareware or even commercial.


FamFam Silk Icons - These are probably close to the BEST Icons you can get that are COMPLETELY FREE with absolutely NO limitations and Royalty Free. He has available more than 700! 16×16 Icons in the download. High Quality as well!

Note: If you find these FamFamFam based icons useful and you want to support him in his work. It would be good if you could send him any amount, especially since he lets you do whatever you want with his icons. He has a link to donate on most of the download pages.


Farsight Icon Pack by deviantART - While they do not cost anything, the license does NOT allow them to be used in a commercial based application.

There are alot of other various free VB icons and images at deviantART as well. Click here to goto the main page…


I will add more Free VB Icons and/or Image sources when I continue to find more. I do hope you found some icons you can use. Have fun!


How to Convert Positive and Negative Numbers in VB 6.0 and VB.NET

Click Star to Rate Post
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)


This simple post is to show you how to convert a positive number to a negative number, plus to show how to convert a negative number to a positive number. Both Visual Basic 6.0 and Visual Basic.NET are supported using the code below. (with VB 2005, 2008, 2010, 2012 included).

To do this is actually very simple with very basic code. To convert a Negative Number (Example: -100), to a positive number you simply use the ABS function. The ABS function will return the absolute value from an integer number (whether positive or negative). To convert a positive number to a negative is easy as well. Simply multiple the positive number by a negative one (Example: 100 x -1).

Below starts the code for converting a negative number to a positive number.


            'This code will work just fine with both VB 6.0 and VB.NET.


The code below will convert a positive number to a negative number.


            'This code will work just fine with both VB 6.0 and VB.NET.
            MsgBox(91 * -1)


Thats all there is to it! Hopefully this little tip helped you out. :)


Visual Studio 2012 RC1 (Visual Basic 11-2012) – plus Two Free 2010 EBooks

Click Star to Rate Post
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.50 out of 5)


Update: June 5th, 2012 – Microsoft has now updated the release to Visual Studio 2012 RC1 (Release Candidate 1). The main links below will take you to the VS 2012 download pages.

Original info Below…

Microsoft released the latest version of Visual Basic/Visual Studio 2011 as a Beta download a while back. If your interested, below are the basic requirements to run the beta. Also below is the webpage to download the the web-installer or Visual Studio .ISO image which will include all of the major languages like VB 2011, C#, ect… Below that is the link to get your two free ebooks based on Visual Studio 2010: One is: Moving to Visual Studio 2010 and the other is: Programming Windows Phone 7. They have been available for quite a while but I figured I would link to them anyways.

Here is the main page to download either the web installer or the complete ISO image.

System Requirements

Supported Operating Systems•Windows 7 (x86 and x64)
•Windows 8 Consumer Preview (x86 and x64)
•Windows Server 2008 R2 (x64)
•Windows Server 8 Beta (x64)

Supported Architectures
•32-bit (x86)
•64-bit (x64)


Hardware Requirements•1.6 GHz or faster processor
•1 GB of RAM (1.5 GB if running on a virtual machine)
•10 GB of available hard disk space
•5400 RPM hard drive
•DirectX 9-capable video card running at 1024 x 768 or higher display resolution

Yep you probably guessed it. Doesn’t look like neither Vista or Windows XP is going to be able to use, at least the Beta version. Which is a shame for me because I use Vista 64 and like it over all the Microsoft operating systems.

Beta Links below….


Click here for the 2011 Beta Professional Edition

Click here for the 2011 Beta Express Editions

Click here for the 2011 Beta Standalone Download Page


Click here to get the Free E-book – Why Upgrade to Visual Studio 2010

Why upgrade to Visual Studio 2010?

For a limited time, you can download two free e-books from Microsoft Press: Moving to Visual Studio 2010 and Programming Windows Phone 7. Moving to Visual Studio 2010 takes you through the new features and characteristics of Visual Studio 2010 as compared to previous versions of Visual Studio, including Visual Studio.NET 2003, Visual Studio 2005, and Visual Studio 2008.

Click here to get the Free E-book – Microsoft Press EBook – Programming Windows Phone 7

Overview - Develop your first applications for Windows Phone 7 using Microsoft XNA and Silverlight—expertly guided by award-winning author Charles Petzold. This book is a gift from the Windows Phone 7 team and Microsoft Press to the programming community.


I was planning to post this weeks ago just a few days after the 2011 Beta release, but I forgot to do so. Still, hopefully someone out there will find this post useful. :)

Sending SMTP Email with Advanced Features in Visual Basic.NET | Part 2 – Include Alternate eMail Views

Click Star to Rate Post
1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 3.80 out of 5)


This is Part 2 of the Sending Email using SMTP with Advanced Features series. The first series went over how to add multiple attachments to an email message for someone to download when they view your email. I suggest you check that article out at this web link. Also for the basics of sending Smtp emails you really should check out the article here.

This article will show how to send your email message with Alternative Views. For instance you can send an HTML based email message and also include a Plain Text Only version in the same email. This can help ensure that the recipient(s) can view your email in case the email provider or client software only supports Text based emails and so on. All you need to do is make your html based message and the plain text only message, then add those views to the email message using the AlternateView class.

Note: I do want to mention that these series of articles only work with Visual Basic.NET 2005, VB 2008, Visual Basic 2010 and Higher since I am using the class libraries under the System.NET.Mail namespace, which wasn’t added until .NET framework 2.0 and higher which of course includes version 3.5, and DotNet 4.0 (VB 2005, VB 2008, and VB2010).

First of all to get started you will want an instance of a couple classes. I am using the same gmail based codes I used in the first advanced article for this series.

  • System.Net.Mail.SmtpClient
  • System.Net.Mail.MailMessage


Here starts the code.

'The Simple Mail Tranfer Protocol client with the Host and Port number to use. You will
'want to change these settings to what you need to use. The host, and port
'587 will work if you use a gmail account.
Dim smtp As New System.Net.Mail.SmtpClient("", 587)

'This will contain the actual message data to send.
Dim eMailmessage As New System.Net.Mail.MailMessage

'Used to setup the eMail as an html view.
Dim htmlView As AlternateView

'Used to setup the mail to have a plain text view.
Dim plainTextView As AlternateView

'Will temporarily hold the text for the html message view.
Dim theHtmlMessage As String

'This variable will temporarily hold the plain text format view.
Dim thePlainMessage As String


Now you need to setup your credentials and the Secure Sockets Layer (SSL) property. The Secure Sockets Layer, or Ssl property, is to be set to True for many smtp (Simple Mail Transfer Protocol) providers. It is required for Googles Gmail, Microsofts Hotmail, Office Live Mail, and even Yahoo mail.

'Use Secure Socket Layer to Encrypt the connection for sending the mail. This needs
'be set to "True".
smtp.EnableSsl = True

'Setup the gmail host.
smtp.Credentials = New System.Net.NetworkCredential("", "gmailLoginPassword")


Now setup the basics of your email like the recipient(s), subject, and so on…

eMailmessage.Subject = "Check out my email message!"

eMailmessage.From = New Mail.MailAddress(", "Jason")



The next code is the contents of your email message. One will be the body content for the html format view, and the other is the contents for the text based view.

theHtmlMessage = "<strong>This is Html!</strong><br/><br/><u>This is Html as well!</u>"

thePlainMessage = "This is only plain text! No html formatting!"


Now that both the plain text and html message is in a string variable its time to add them to the AlternateView Class as a string itself using the CreateAlternateViewFromString function.

        'Setup the mail message as an html view.
        Dim htmlView As AlternateView = AlternateView.CreateAlternateViewFromString(theHtmlMessage, _
            Nothing, MediaTypeNames.Text.Html)


        'Setup the mail message as an plain text view.
        Dim plainTextView As AlternateView = AlternateView.CreateAlternateViewFromString(thePlainMessage, _
            Nothing, MediaTypeNames.Text.Plain)



As you can see, its quite easy to setup your mail message to have available alternate views. Just simply use the CreateAlternateViewFromString function and pass your message as html in one view and plain text in the other view. Now all thats really left is to send your email message to the recipient that you specified in the earlier source code.

'When you are done with setting up your email and your alternate view, then you just need
'to send your message.




Thats all there is to it! So, after its all said and done, go ahead and get quite creative with your email messages using html, but always remember that it would be a good idea to also create a basic text email in case the persons mail client doesn’t support html so the recipients can still view your email message. Thats all for Part 2. I’m not exactly sure about Part 3 but it will probably go over sending your email messages to muliple recipients and carbon copys (cc) to other recipients as well. Have Fun!

Advanced Textbox Manipulation in Visual Basic and VB.NET | Part 2

Click Star to Rate Post
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.33 out of 5)

This is Part Two of the Advanced Textbox Control Manipulation series. If you haven’t already you should check out Part 1 of this series. That article showed how to use the SendMessage API call to make a Textbox control Page Left, Page Right, Line Left, Line Right, Left Edge, and go to the Right Edge of the contents. This Part 2 post will show how to add the functionality that is outlined below…


Page UP

Page Down

Line UP

Line Down

Top Edge

Bottom Edge


Note: These codes are basically taken from an example I made at my site for VB.NET that shows how to do lots and lots (and lots?) of various textbox based manipulating and functionality. Just go to under the Visual Basic.NET – Examples page.




To accomplish these features I will use the Windows API for most tasks. Specifically the Send Message Function is used. Below is the declaration for Visual Basic 6.0 (same for VB 5.0 as well) and VB.NET. All versions of .NET is supported, even the latest VB 2005, VB 2008, and Visual Basic 2010 versions. You shouldn’t have to change anything from the DotNet codes in this article.


Visual Basic 6.0

    'Used to Send Messages to the control.
    Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal winHandle As Long, _
        ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long


Visual Basic.NET 2002/2003, VB 2005, VB 2008 and Visual Basic 2010

    'Used to Send Messages to the control.
    Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal winHandle As Int32, _
        ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32




Now for some Constants…


Visual Basic 6.0…

    Private Const EM_SCROLL = &HB5

    Private Const SB_PAGEDOWN = 3

    Private Const SB_PAGEUP = 2

    Private Const SB_LINEUP = 0

    Private Const SB_LINEDOWN = 1

    Private Const SB_BOTTOM = 7

    Private Const SB_TOP = 6


Visual Basic.NET through VB 2008 and VB 2010…

    Private Const EM_SCROLL As Int32 = &HB5

    Private Const SB_PAGEDOWN As Int32 = 3

    Private Const SB_PAGEUP As Int32 = 2

    Private Const SB_LINEUP As Int32 = 0

    Private Const SB_LINEDOWN As Int32 = 1

    Private Const SB_BOTTOM As Int32 = 7

    Private Const SB_TOP As Int32 = 6




Now all thats really needed is to call the sendmessage api with the right combination of constants to perform the intended function on your textbox control.




NOTE: If your using VB 5.0 or VB 6.0 then change some small things below…

Change – txtControl.Handle.ToInt32 to txtControl.hWnd

Change – Unless your getting the SendMessage functions return value then remove the parentheses which are the ( and ) characters.

Thats basically the only changes that are needed.




Page UP / Page Down

        'Move the cursor position up one page.
        SendMessage(txtControl.Handle.ToInt32, EM_SCROLL, SB_PAGEUP, 0)

        'Move the cursor position down one page.
        SendMessage(txtControl.Handle.ToInt32, EM_SCROLL, SB_PAGEDOWN, 0)


Line UP / Line Down

        'Move up by one line.
        SendMessage(txtControl.Handle.ToInt32, EM_SCROLL, SB_LINEUP, 0)

        'Move down by one line.
        SendMessage(txtControl.Handle.ToInt32, EM_SCROLL, SB_LINEDOWN, 0)


Go to Top Edge / Go to Bottom Edge

        'The will make the textbox scroll to the top without moving the cursor.
        SendMessage(txtControl.Handle.ToInt32, EM_SCROLL, SB_TOP, 0)

        'This will make the textbox scroll to the bottom without moving the cusor.
        SendMessage(txtControl.Handle.ToInt32, EM_SCROLL, SB_BOTTOM, 0)


Below is another method of scrolling the textbox to the Top and Bottom. But this WILL move the caret from its current position. The API method will NOT change the caret position. So using the code below depends on whether your ok with the cursor changing positions or not.


Scroll to Top with Cursor / Scroll to Bottom with Cursor

        'Scroll the textbox to the Top.
        'Set the cursor to the first character in the textbox which will be at the top of the 
        TextBox1.SelectionStart = 0
        'Make the textbox scroll to the actually caret postition.
        'Scroll the textbox to the Bottom.
        'Set the cursor to the last character in the textbox which will be at the bottom of the 
        TextBox1.SelectionStart = TextBox1.TextLength
        'Make the textbox scroll to the actual caret postition.




These 6 features can really add alittle extra control to your custom notepad program, wordpad program, or any program I guess. As you can see its pretty simple to add. Thats all for Part #2. Have fun!


Next Page »