|
-
Sep 5th, 2001, 05:25 AM
#1
Thread Starter
New Member
can I do this more easily
HI
I am nearly finished writing my first VB project and I am trying to
put some help in for the user. This help is activated by clicking an
image with HELP on it and the message that appears will give help about the button or text box that has focus. I have done the code, which does work, below but it seems a very long way of doing it. The project has 8 forms and this form only has 6 controls that require help. Some of of the other forms have 10 text boses and 4 buttons on them so that code will be really long.
Private Sub CmdHelp_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
'makes image depress like button
CmdHelp.Appearance = 1
End Sub
Private Sub CmdHelp_MouseUp(Button As Integer, Shift As Integer,
X As Single, Y As Single)
'makes image rise like button when mouse button is released
CmdHelp.Appearance = 0
If Me.ActiveControl.Name = frmSaleReturn.grdPatronType.Name Then
GeneralHelp "grdPatronType"
Exit Sub
End If
If Me.ActiveControl.Name = frmSaleReturn.grdSeatsForRefund.Name
Then
GeneralHelp "grdSeatsForRefund"
Exit Sub
End If
If Me.ActiveControl.Name = frmSaleReturn.grdSeatsForSale.Name Then
GeneralHelp "grdSeatsForSale"
Exit Sub
End If
If Me.ActiveControl.Name = frmSaleReturn.CmdClose.Name Then
GeneralHelp "Close"
Exit Sub
End If
If Me.ActiveControl.Name = frmSaleReturn.cmdRefund.Name Then
GeneralHelp "cmdRefund"
Exit Sub
End If
If Me.ActiveControl.Name = frmSaleReturn.cmdSell.Name Then
GeneralHelp "cmdSell"
Exit Sub
End If
End Sub
Please help
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|