Visual Basic .NET Tutorial

  • Submitted by: 
    Now that you have added all the necessary forms to your project and a menu system, let us now add a login form. This will ensure that only the person that has the account information can login to your system. But before we add the Login form you will need to add the table first to your database. Use the following SQL code to create a table named “Users”. For more information on how to do this...
  • Submitted by: 
    There are some cases that you need to change the data type of a field in SQL Server by not using the Management Studio Tools. The reason is if your database is replicated. You cannot change it directly using the management studio tools so your best option is to use T-SQL. In my case I have a column name “TransDate” that has a datetime datatype. Now when I create a report and filter the record...
  • Submitted by: 
    I read a lot of question about this on the forum and thought it’s time to share with you on how to differentiate two cell values in DataGridView control. By default we use the Value property of cells like: QtyOrdered = InvoiceDetails ( "Qty" , e. RowIndex ) . Value Another is to use the FormattedValue like: QtyOrdered = InvoiceDetails ( "Qty " , e. RowIndex...
  • Submitted by: 
    Few months ago I encounter a problem with my windows form bound using a DataSet. When I open the form the first time, it seems that everything is fine. But when I open it again the second time, the fields are become blank. This happens when you trigger the “PerformClick” of “BindingNavigator” under the Form Load event. This is not actually the common mistake that I encounter. But maybe, you...
  • Submitted by: 
    After browsing several forum sites I found so many programmers having problem with ComboBox after they bind it to a DataSet. The problem actually is not cause by a bug or the like. The error is caused by design. Here’s the following question on the internet that I found that will explain this error further: http://thedailyreviewer.com/dotnet/view/data-bound-combobox-does-not-leave-focus-106127786...
  • Submitted by: 
    If you are using SelectedIndexChanged in your ComboBox may be you encounter a problem with events being fired even if you did not click the ComboBox. This happens when you open and close your Windows Form. The workaround for this is to use RemoveHandler statement. Here’s an example: RemoveHandler CreditTermIDComboBox. SelectedIndexChanged , AddressOf CreditTermIDComboBox_SelectedIndexChanged And...
  • Submitted by: 
    One of the challenging parts in VB.NET is to change the connection string of your database location when you run your application. This tutorial will help you solve this problem. This will apply only to SQL Server but it can be also modified easily to work with MS Access and other DBMS. In my case I initialize this on the Form Load event on my Login form. Private Sub frmLogin_Load ( ByVal...
  • Submitted by: 
    This tutorial will explain on: How to Debug Visual Basic .NET and Visual C# project in 64 bit Operating System. If you are running 32 Bit operating system before and were intrigued to install 64 bit OS to improved performance of your computer, then maybe you are having problems debugging your Visual Studio .NET source code. I am once having this issue which stops me from debugging all of my VB...
  • Submitted by: 
    One of the common questions I received from newbie’s is on how to set a certain form to be the Startup Form. Undoubtedly, this is a very simple question but if you are a beginner trying to learn Visual Basic you will find it very difficult to find what you are looking for because of so many options to choose from. Visual Basic is considerably one of the famous programming languages to date and...
  • Submitted by: 
    Before we begin binding our database using Windows Form please take a look on this tutorial on how to add new windows forms to your project. Windows Forms serves as a container for all the controls that you’d like to add. Examples are TextBox, Label, Button, CheckBox, ComboBox, etc. When you create a new project, visual studio automatically provides you one windows forms which you can use right...

Pages