New Website Content - Added/Available (Updated!)

April 6, 2008 – 8:57 pm





  You may have or may not have noticed a few page links at the top of each page. These pages were to provide more static based information. These pages will continue to change and grow as more information or new information is found.

   

   

|

   

  Quick Update: I wanted to mention as well that a few weeks ago Microsoft released the Visual Basic 9.0 Language Specification 9.0 document. If you’ve wanted to know the Visual Basic language inside and out, then download and check out this huge document. You may be surprised at some coding techniques you could be using… Click here to goto the msdn download page… I may add this resource to a static page in the future.

   

|

   

 __________________________________________

   

   

FREE IDE Downloads - This page contains a small list of some available IDEs related to Visual Basic and/or Visual Basic.NET based programming. The programs listed should all be completely free of charge.

    

Service Pack Downloads - This page contains a list of all of the current service pack downloads related to Visual Basic and Visual Basic.NET. Only the latest versions will be listed here.

    

Utility Downloads - This is the newest page I added and contains a list of programs/utilities that I use on a somewhat regular basis. The page contains both programming and non-programming related programs that are Free of charge.

    

VB For Beginners - This page was mainly added for those who are basically very new to Visual Basic and Visual Basic.NET based programming. The page main contain both website listed tutorials or downloadable based tutorials like E-Books.

    

   

__________________________________________

    

   

Hopefully you will like the new content being made available to the site. As time goes on the pages should be updated with new content. I will try to remember to list new content related to each of the pages when I find something new or something I forgot about.

  

 Anyways, Have Fun!

  

               Jason





Adding Custom Tooltips - Visual Basic .NET

March 31, 2008 – 9:29 pm





 NOTE: This older article/tutorial was orginally on my vbcodesource.com website and is a few years old. So take that into consideration… :)
   
    In Visual Basic 6.0 we had a property for tooltip balloons. All you needed to do was type in the text you wanted to display. But you didn’t really have much control over the toolTips in general. In Visual Basic.NET, that simple feature appears to have been removed by default. That doesn’t mean we still can’t have tooltips. Below you will see just how simple it is to implement this feature and control how your tooltips will react. You have more “say” in what goes on with your tooltips. For Example, you can now set the length of time the pointer must remain stationary within the tooptip region before the balloon will appear. 

    To get started, start a project. In your ToolBox look for a ToolTip component. If you do not see one, then right click inside your toolbox and select “Customize Toolbox”. Click the ”.Net Frameworks Componets” tab, scroll down till you find “ToolTip” then check the box and press OK. You should now see a ToolTip component available. Double click the ToolTip to add it to your project. I re-named mine toolTip. If you look at the properties available for the ToolTip you will see: Automatic Delay, Initial Delay, and such that are available. I will not go over any of these settings since they are pretty much self-explanatory. Go ahead and add a button to the form. I named mine btn. In the btn_MouseHover event put:
    

          toolTip.SetToolTip(btn, “Hello, This is just a simple test….”)

      
    Start your project and place your mouse pointer within the button region and let it sit idle for a few seconds. You should then see the ToolTip balloon popup with the text you specified. You can also goto the ‘btn’ Button control property, you will see a property named: “Tooltip on tooltip”. You can put the text you want displayed and it will use your ToolTip settings without having to execute the toolTip yourself. As you can see, it is very easy to add support for ToolTips.
    

 

    

                Jason





Adding System Wide ‘Auto Complete’ to your Textbox/Combobox Controls in Visual Basic 2005/2008

March 31, 2008 – 9:21 pm

Note: This older article was taken from my vbcodesource.com website and is a year or 2 old. So take that into consideration… :)

   

  As you will see, adding Auto Complete support to textbox and combobox controls has NEVER been easier than it is now in Visual Basic.NET 2005. No longer do you HAVE to use the Windows API’s to get the Auto Complete functionality.

 

  I will assume you already have a ‘Windows Application’ based project open. You can go ahead and add a textbox control or combobox control to the form. Select the textbox and goto the properties window. (I will assume you added a textbox, but the process is the same for a combobox also. I will just refer to textbox instead of combobox.)

 

  There are 3x properties that relate to the ‘Auto Complete’ feature. You have “AutoCompleteCustomSource”, “AutoCompleteMode” and “AutoCompleteSource”. AutoCompleteCustomSource is exactly how it sounds. You can have your own text that you want the user to be able to use when they are typing in the control. But, I am not interested in going over that property right now though. There is really nothing more to it than what I already said. :)

 

  OK, the “AutoCompleteMode” property is simply how the AutoComplete text responds. Click on the “AutoCompleteMode” property and then open the dropDown list associated with it. You will see 4x ‘modes’ available. “None, “Suggest”, “Append”, and “SuggestAppend”. This property MUST be selected either “Append”, “Suggest”, or “SuggestAppend” for the AutoComplete feature to work. If you select “Suggest” mode, then ‘AutoComplete’ will display a list that matches the text that has been typed thus far that you can scroll through and choose from. If you select “Append” mode, then as you are typing, it will automatically highlight the closest match to the text thus far in the textbox/combobox control, usually in alphabetical order. Plus, while you are typing, you CAN use the ‘Up/Down’ buttons on the keyboard to scroll through the list of text that is similar to the text that was typed in the textbox control. The “SuggestAppend” mode, is of course the combination of the other 2x modes. As you are typing the text, it will highlight the first occurance of matching text while also displaying a list of all the text that matches what has been typed in the control.

 

  The “AutoCompleteSource” property is exactly how it sounds. It is the location on the computer system to get the ‘AutoComplete’ list from. Click on that property and then click on the box to dropdown the enumerator values that are available as the source. Available values, at least on my computer are: “FileSystem”, “HistoryList”, “RecentlyUsedList”, “AllUrl”, “AllSystemSources”, “FileSystemDirectories”, “CustomSource”. Just like the “AutoCompleteMode” property, you MUST select one of these values for you to get ‘AutoComplete’ functionality. Since all of the values are self-explanatory, I will not go over them.

 

  Just to test out the ‘AutoComplete’ feature. With a textbox control, (Or Combobox), click on the “AutoCompleteMode” property and select the “Suggest” mode. Then click on the “AutoCompleteSource” property and then select “AllUrl” as the source. Run the project, start typing in the textbox ‘www’ and you should see a list of url’s you’ve visited that start with ‘www’ popup. You can then click on one of the urls and it will put that url text in the textbox.

 

 And thats ALL there is to it! Enjoy!

 

               Jason

 

   

More FREE ‘How Do I’ Video Examples from Microsoft

March 23, 2008 – 8:12 pm


  Microsoft is doing a good job of helping people to learn their programming languages. They have recently added 48 New Videos for Visual Basic .NET. The videos appear to be based around VB 2005, and VB.NET 2008. There are a few that is for Visual Basic 2008 Only as well.

    

______________________________________

    

Below is a quick overview of each Video Series…

    

Language Integrated Query (LINQ) Series

This how-to video series is focused on the new LINQ language features of Visual Basic 9.0 included in Visual Studio 2008. LINQ stands for Language Integrated Query, and it enables you to write queries over things like objects, databases, and XML in a standard way using new language syntax. Learn how to use this productive new language feature in your Visual Basic programs.

    

Forms over Data Video Series

This how-to video series is dedicated to getting Visual Basic developers productive on areas of data-based Windows Application development. The series starts with the basics of database development with SQL-Server 2005 Express then walks through the details of connecting to and querying databases, Windows Forms development basics, Reporting, and Deployment using Visual Basic 2005.

   

Visual Basic 2008 Forms over Data Videos

These videos continue our series on data-based Windows Application development, now for Visual Basic 2008. Most of the previous 2005 videos are the same experience in Visual Basic 2008, but these videos will highlight the differences and new capabilities.

     

Windows Development Video Series

In this how-to video series Visual Basic developers will learn additional techniques on how to program .NET applications on the Windows platform.

    

Office Development Video Series

In this how-to video series Visual Basic developers will learn about the premiere development tools for building Office Business Applications.

    

Object Binding Video Series

This how-to video series is focused on more advanced data binding techniques using object binding in Visual Basic 2005. The series walks through creating business objects and how to associate them in one-to-many relationships, how to provide searching capabilities and how to enable sorting.

    

Visual Basic Interop Video Series

This how-to video series is focused on the Interop Forms Toolkit and working with Visual Basic .NET and Visual Basic 6 together. The Interop Forms Toolkit allows Visual Basic developers to migrate their Visual Basic 6 applications over to .NET using a phased migration strategy. Instead of having to convert the entire VB6 application at once, the toolkit enables .NET Forms and User Controls to run directly in Visual Basic 6 applications so that you can build the pieces that you need over time. 

    

Security Video Series

In this how-to video series Visual Basic developers will explore a variety of security questions, including encryption, handling attacks, security best practices, and a lot more.

    

__________________________________________

    

  As you can see these videos covers a broad range of subjects. Some of the videos are related to programming with Linq, Database, Building Reports, Creating Templates, ClickOnce Deployment, Excel, Sharepoint, Power Point, Excel Web Services, Object Binding, Interoping and Deploying Hybrid based Applications, Various Security Videos for setting up Digital Signatures, Clinet Credentials, and many more!

  There is bound to be a video or 2 that you would find interesting. The videos are based on the Novice and Professional Programmer. They are adding new videos on a regular basis as well. So they want you to check back once in a while. They claim that there are 48 new Videos since the March update.

So, if your interested in any of these videos, then simply click this link to the main video page. Have fun!

     

                                          Jason

Textbox Scroll to Bottom or Top (Method #2)

March 15, 2008 – 7:16 pm

  I have a previous post on how to scroll the textbox controls contents to the bottom and the top that many visitors didn’t appear to like. I really don’t know why because the code seems to work fine. Maybe because the cursor position would be moved? This new code won’t move the actual cursor if thats the case. But anyways, I decided to post another way to scroll the textbox contents by using the Windows API. This method uses the SendMEssage function and passes a couple constants to perform the up and down scrolling process. Below are the codes for VB 6.0 and VB.NET.

    

   

_____________________________________

   

   

 Visual Basic 6.0 Declarations…

    

‘Used to Send Messages to the control and will be used with a request for the current line number in the textbox 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

   

   

‘Constants used for the SendMessage API call function.

Private Const EM_SCROLL = &HB5

Private Const SB_BOTTOM = 7

Private Const SB_TOP = 6

   

   

————————————————

   

   

Visual Basic .NET Declarations…

   

‘Used to Send Messages to the control and will be used with a request for the current line number in the textbox 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

   

‘Constants used for the SendMessage API call function.

Private Const EM_SCROLL = &HB5

Private Const SB_BOTTOM = 7

Private Const SB_TOP = 6

     

————————————-

   

Now all thats left is to setup and call the SendMessage API function…

   

The first parameter of the SendMessage call is the handle to your textbox control that you want to use.

The second parameter is to let the api know we want to perform some type of scroll action on the control.

The third parameter is the type of scroll to perform on the control.

The fourth parameter is Not used in this example.

    

   

————————————-

   

    

Visual Basic 5.0, 6.0 - Scroll the Textbox to the Bottom/Top…

   

‘This will make the textbox scroll to the bottom without moving the cusor position.

SendMessage TextBox1.hWnd, EM_SCROLL, SB_BOTTOM, 0

   

‘The will make the textbox scroll to the top without moving the cursor.

SendMessage TextBox1.hWnd, EM_SCROLL, SB_TOP, 0

   

   

Visual Basic.NET - Scroll the Textbox to the Bottom/Top…

    

‘This will make the textbox scroll to the bottom without moving the cusor.

SendMessage(TextBox1.Handle.ToInt32, EM_SCROLL, SB_BOTTOM, 0)

    

‘The will make the textbox scroll to the top without moving the cursor.

SendMessage(TextBox1.Handle.ToInt32, EM_SCROLL, SB_TOP, 0)

    

   

_____________________________________

   

   

Well, those codes above should have moved your textbox control contents down to the bottom and up to the top. Also the cursors position will Not be moved like the older method would do. Hopefully this post will be liked alittle better. If not, then I don’t know what else you want and give up… :)

              Jason

eXTReMe Tracker