Using VB Help Files

Level:
Level1

My boss has a saying: "You can't eat an elephant in one bite." This applies all too well to the volumes of documentation that accompany Visual Basic. If you have the professional edition on CD, there are hundreds of pages of printed documentation, megabytes of help files, Visual Basic Books Online, the MSDN Visual Basic Starter Kit, and a variety of other miscellaneous files to wade through.

If you don't already know where to look for the information you need, it can feel very much like looking for a needle in a haystack. Don't despair, however, its not as bad as it looks when you open the box and install the software.

Printed and Online Books

First, a large portion of what's found in the documentation is reference material. Its not something you sit down and read, but rather something you look up when you need it. While you might learn something by reading the "Language Reference" from cover to cover, your time would probably be better spent writing code.

There are, however, some sections which are worth reading:

  • Programmer's Guide
    Read through the first eight chapters for an introduction to using VB, creating forms and controls, attaching code to events, and some programming fundamentals.
  • Creating OLE Servers
    If you're going to be diving into creating OLE servers - and in my opinion you should be - this book will give you a good introduction to what OLE servers are and some of the basics you should know before getting started.
  • Guide to Data Access Objects
    One of the most popular areas for VB developers is using the database engine. The first three chapters of this book will give you an introduction to using the Jet database engine and some fundamentals of relational database design. You might also want to check out Chapter 6, Writing SQL Queries. SQL is the heart of most databases today, including Jet. To really understand managing a database, you'll need to understand SQL.
  • Help Compiler Guide
    To create a finished application, you'll need to provide a help file. Even if you won't be the help author, you should at least have a basic understanding of how the help system works. At a mimumum, take a look at the first two chapters to get an introduction to creating Windows help files. You'll find the book in VB Books Online.
  • Windows Interface Guidelines for Software Design
    Found in the MSDN/VB Starter Kit, this is the bible of design guidelines. If you're going to be writing software for anyone other than yourself, you should understand the material presented here. The first two chapters will give you a good general overview. If you're looking for a shortcut through the material, check out Appendix C - Guidelines Summary.



Help Files

Nearly everything you need to know about writing Visual Basic applications can be found in the help files. Every statement, function, property, method and event is fully documented. However, that doesn't really help you very much if you don't know what the keyword is that you need to find to accomplish your objective.

However, one of the benefits that you have as a student of programming is that you're likely to already be a Windows "power user." As such, you're probably well versed in searching help files for the information you need. The VB help files are well indexed and with VB4 offer the capability of full-text searching. In most cases, if you can't find what you're looking for in the contents or the index, you can find it with a full-text search.

One of the other great things about any decent development platform is the degree to which the help files are integrated into the code editor. Visual Basic is no exception. If you get stumped by a keyword in your code or need the syntax for using it, click on the word in the code window and press F1 to display the relevant help topic.

Just in case you haven't already discovered or guessed it, you should be prepared to spend a considerable amount of time studying the material in the online help and browsing through jumps to related topics.




Remember that VB is a large, complex application. You can't learn everything overnight and it will take real effort to gain a thorough understanding of all there is to learn. Plan to do a lot of reading.

By Joe Garrick

If you enjoyed this post, subscribe for updates (it's free)

VB Help Files (MSDN)

Can anyone help me find a copy (file or CD) of the vb MSDN help files. I reinstalled vb6 after 6 years and my MSDN cd is bent up real bad. Would appreciate any help.

Hi 1.I am writing a program

Hi
1.I am writing a program in vb and i need to include a help file , everybody please help me with the code.
2. kindly help me on how to save an image to an access file without saving the path of the image.
3. and lastly, how to include and image from Ms Acess Database on to a Data Report form.

how to create data-entry apllication (with image)

hi any one solved my problem.

Help

Dear,
I need one Help that when i minize my Application so it should go in system tray,
If any one can help me so plzzzzzzz help me........
Waiting for ur reply...,

i have solved my problem

check this link it would help you..!!!!
http://www.vbcode.com/Asp/code.asp

hi

just u build the application in form mode , when ever u minimised ugo and stay the taskbar

System Tray

Module
--------
'user defined type required by Shell_NotifyIcon API call
Public Type NOTIFYICONDATA
cbSize As Long
hwnd As Long
uId As Long
uFlags As Long
uCallBackMessage As Long
hIcon As Long
szTip As String * 64
End Type

'constants required by Shell_NotifyIcon API call:
Public Const NIM_ADD = &H0
Public Const NIM_MODIFY = &H1
Public Const NIM_DELETE = &H2
Public Const NIF_MESSAGE = &H1
Public Const NIF_ICON = &H2
Public Const NIF_TIP = &H4
Public Const WM_MOUSEMOVE = &H200
Public Const WM_LBUTTONDOWN = &H201 'Button down
Public Const WM_LBUTTONUP = &H202 'Button up
Public Const WM_LBUTTONDBLCLK = &H203 'Double-click
Public Const WM_RBUTTONDOWN = &H204 'Button down
Public Const WM_RBUTTONUP = &H205 'Button up
Public Const WM_RBUTTONDBLCLK = &H206 'Double-click

Public Declare Function SetForegroundWindow Lib "user32" _
(ByVal hwnd As Long) As Long
Public Declare Function Shell_NotifyIcon Lib "shell32" _
Alias "Shell_NotifyIconA" _
(ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean

Public nid As NOTIFYICONDATA
Main Code
--------------
Private Sub Form_Load()
'the form must be fully visible before calling Shell_NotifyIcon
Me.Show
Me.Refresh
With nid
.cbSize = Len(nid)
.hwnd = Me.hwnd
.uId = vbNull
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.uCallBackMessage = WM_MOUSEMOVE
.hIcon = Me.Icon
.szTip = "ALARM MAKER" & vbNullChar
End With
'FOR MINE TIMER
FILL_MIN
CALLTM.Text = VBA.Time
Shell_NotifyIcon NIM_ADD, nid
End Sub
Sub FILL_MIN()
Dim I As Integer
For I = 1 To 60
MN.AddItem I
Next
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'this procedure receives the callbacks from the System Tray icon.
Dim Result As Long
Dim msg As Long
'the value of X will vary depending upon the scalemode setting
If Me.ScaleMode = vbPixels Then
msg = X
Else
msg = X / Screen.TwipsPerPixelX
End If
Select Case msg
Case WM_LBUTTONUP '514 restore form window
Me.WindowState = vbNormal
Result = SetForegroundWindow(Me.hwnd)
Me.Show
Case WM_LBUTTONDBLCLK '515 restore form window
Me.WindowState = vbNormal
Result = SetForegroundWindow(Me.hwnd)
Me.Show
Case WM_RBUTTONUP '517 display popup menu
Result = SetForegroundWindow(Me.hwnd)
Me.PopupMenu Me.mPopupSys
End Select
End Sub
Private Sub Form_Resize()
'this is necessary to assure that the minimized window is hidden
If Me.WindowState = vbMinimized Then Me.Hide
End Sub
Private Sub Form_Unload(Cancel As Integer)
'this removes the icon from the system tray
Shell_NotifyIcon NIM_DELETE, nid
End Sub
Private Sub mPopExit_Click()
'called when user clicks the popup menu Exit command
End
End Sub
Private Sub mPopRestore_Click()
'called when the user clicks the popup menu Restore command
Dim Result As Long
Me.WindowState = vbNormal
Result = SetForegroundWindow(Me.hwnd)
Me.Show
End Sub

Draft Mode printing in USB Dot Matrix printers

Friends,

I am developing one application in VB6.0 and I want to print one document in USB Dot matrix printer but printer is connected to USB port and my program is printing on LPT port only so I am not able to print the document so please guide me. And if possible, please send me a code also.

Thanks,

usb dot printer

dear you try it, its working

1. install loopback adaptor using add new hardware its manufacture microsoft
2. Install printer
3. add printer option u can assign this printer as network printer, now working, u try or call me
91 98429 27608

help wit vb6

hi evrybody i need assisstance here, i ve a data entry program in vb6 that drop down names of states and local areas 4 each state for data entry staff to select and the data is stored in access database, i ve codes for the states and local areas but d user only see d names of d state & local area. i want if the user type the enter key let d program convert d names on the text box back to the code b4 saving in d database. i wil also luv a situation whereby d names of state cannot be edited or changed from d data entry interface.

hai

hai

html help

Option Explicit
'add this two lines for html help file
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOW = 5

Private Sub Form_Load()
'add this to load help file
App.HelpFile = App.Path & "\BMW.chm"
'to restrict more than one instance from running
If App.PrevInstance = True Then
Unload Me
End If
End Sub

Private Sub mnuAbout_Click()
MsgBox "Created and tested by pidnas-The almighty", vbInformation, "About"
End Sub

Private Sub mnuExit_Click()
End

End Sub

Private Sub mnuTopic_Click()
'add this to open help file
'we also can open this file by pressing f1
Call ShellExecute(Me.hwnd, "Open", App.HelpFile, vbNullString, vbNullString, SW_SHOW)

End Sub