Site Search:
Sign in | Join | Help

This Blog

Syndication

VB.NET

Notes, Tricks and Tips on VB.NET

Standard code process for a VB form

Here is a standard process to use to code a standard VB.NET 'card' form.

It helps to have a checklist to go through so I don't miss the little things, like setting the 'maxchar' property on a text box

  • Write the data access - usually two Select statements and a Merge statement
  • Run sp_SPs and copy the code SQL data access code to the SPs class
  • Run sp_fac to create a VB class for the SQL table
  • Add a 'lookup' form in VB
    • Set the form title
    • Set the icon
    • Add a grid
    • Set the grid anchor
    • Setup the grid 
      • Set groupByVisible = False
      • Set allowEdits = False
      • Add the fields
    • Add filter fields, set the MaxCharacters
    • Bind the grid
  • Add the form in VB
    • Set the form title
    • set the form to open 'centerscreen'
    • Set the icon
    • Set the border type
  • On the main form,
    • add fields for each field in the database.
    • set the 'max length' property
    • Add a lookup button for the main field
    • Add a button bar, add 'save', 'cancel', 'delete' buttons
    • Code the lookup button
    • Code the TextChanged events
    • Set the tab order
    • In the load event, setformstate to clean, set the focus
    • As a convenience, the complete form code is here

Comments

 

VB.NET said:

Here is my library code for VB Forms apps. Having it available like this helps speed development Write

March 20, 2009 11:08 AM

Leave a Comment

(required)  
(optional)
(required)  
Add