Tutorials

How to Prevent Events to Fire More Than Once

Submitted by admin on
[inline:RemoveHandler.jpg=How to Prevent Events to Fire More Than Once]

If you are new to VB.NET most likely you encounter a problem with events like TextChanged or ValueChanged events.

In VB 6.0, change event is not fired when changing a value programmatically. However, in the .NET version this has been changed.

In order to avoid this problem you need to call a RemoveHandler Statement.

The following code is an example of this.

Conform with Standards using Microsoft FXCop, A Code Analysis Tool for .NET

Submitted by arjay_nacion on
When you are already in a production environment, working 8 hours a day or so, developing applications for clients, you must be aware of guidelines and standards needed to be followed in order to assure that your program is robust and maintainable.

How to Display the MS Chart to data Report!

Submitted by janzell on
' This code will make the MS chart converted to an image and load it to the data report.. MSChart1.EditCopy Picture1.Picture = Clipboard.GetData(vbCFMetafile) SavePicture Picture1.Picture, App.Path & "\Image1.wmf" Set animal.DataSource = recordset Set animal.Sections("section2").Controls.Item("Image1").Picture = LoadPicture((App.Path & "\Image1.wmf")) animal.Show

Display Record in DataGridView Based on ComboBox Selected Value

Submitted by admin on

In this tutorial I will teach you on how to display related record based on the selection value from a ComboBox.

The example displays a student’s subject in a DataGridView after a SelectedIndexChanged event of a ComboBox.

This tutorial assumes that you already know how to add a DataSet in your project.

The following are important steps in order to understand how I made this simple program.

1. Bind a ComboBox

[inline:ComboBox_Data_Binding.jpg=Bind a ComboBox]

2. Add a query in the Course Table under DataSet designer

How to make a form transaparent!

Submitted by JanzellJurilla on
this snippet is making the form into a transparent.. first. 1. Declare the following codes: Public Const GWL_EXSTYLE = (-20) Public Const WS_EX_TRANSPARENT = &H20& Public Const SWP_FRAMECHANGED = &H20 Public Const SWP_NOMOVE = &H2 Public Const SWP_NOSIZE = &H1 Public Const SWP_SHOWME = SWP_FRAMECHANGED Or _ SWP_NOMOVE Or SWP_NOSIZE Public Const HWND_NOTOPMOST = -2