thanks for this i need one more help , how to create an toolbar and placing ad ,edit,save, utton ,to operate diffrent forms , instead of using each form we can use this toolbar can u help me ,
I'm not sure what you're asking. Could you clarify?
for example like word we are using the save button thru toolbar like that i want to use this to my software , toolbar button , add ,,edit ,save , if i open a various from from mdi , if i want click add button to operate all the forms.
regards
manjesh
for example like word we are using the save button thru toolbar like that i want to use this to my software , toolbar button , add ,,edit ,save , if i open a various from from mdi , if i want click add button to operate all the forms.
regards
manjesh
Hello, manjesh!
Your solution may be closer than you think. Perhaps adding your question to search terms in the box (i.e. How to build menus) and fetch will give you the results you need.
Also if you have something working, post it so one can take a look, point you in the right direction.
You can also try this yourself by starting a new VB project and choosing VB Application Wizard. How's that for a deal?
for example like word we are using the save button thru toolbar like that i want to use this to my software , toolbar button , add ,,edit ,save , if i open a various from from mdi , if i want click add button to operate all the forms.
regards
manjesh
Hi Manjesh,
Here is the solution. Suppose u have 3 forms in ur project and u want to handle with only one toolbar, right? Here is the sol.
Suppose 4 forms are:
1) Customer
2) Supplier
3) Item.
Now u have one toolbar. Declare following variables in MDI form, where u have toolbar.
Dim varfrmCust as Integer
Dim varfrmSupp as Integer
Dim varfrmItem as Integer
Now initialize the variables on form load event of MDI,
varfrmCust = 0
varfrmSupp = 0
varfrmItem = 0
Now set the value of variable to 1 on their corrosponding click event. Say, if u have selected Customer form option from menu bar, write down the code
Private Sub mnuCustomer_Cli ck()
varfrmCust = 1
frmCust.Show
frmSupp.Hide
frmItem.Hide
End Sub
Similary for Supplier and Item like
Private Sub mnuSupplier_Cli ck()
varfrmSupp = 1
frmSupp.Show
frmCust.Hide
frmItem.Hide
End Sub
and similarly for item
Now write down the following code:
Select Case Button.Index
Case 1 'Add New Rsecord
If varfrmCust = 1 Then
frmCust.Add_New
End If
If varfrmSupp = 1 Then
frmSupp.Add_New
End If
If varfrmItem = 1 Then
frmItem.Add_New
End If
End Select
Here is the solution. Suppose u have 3 forms in ur project and u want to handle with only one toolbar, right? Here is the sol.
Suppose 4 forms are:
1) Customer
2) Supplier
3) Item.
Now u have one toolbar. Declare following variables in MDI form, where u have toolbar.
Dim varfrmCust as Integer
Dim varfrmSupp as Integer
Dim varfrmItem as Integer
Now initialize the variables on form load event of MDI,
varfrmCust = 0
varfrmSupp = 0
varfrmItem = 0
Now set the value of variable to 1 on their corrosponding click event. Say, if u have selected Customer form option from menu bar, write down the code
Private Sub mnuCustomer_Cli ck()
varfrmCust = 1
frmCust.Show
frmSupp.Hide
frmItem.Hide
End Sub
Similary for Supplier and Item like
Private Sub mnuSupplier_Cli ck()
varfrmSupp = 1
frmSupp.Show
frmCust.Hide
frmItem.Hide
End Sub
and similarly for item
Now write down the following code:
Select Case Button.Index
Case 1 'Add New Rsecord
If varfrmCust = 1 Then
frmCust.Add_New
End If
If varfrmSupp = 1 Then
frmSupp.Add_New
End If
If varfrmItem = 1 Then
frmItem.Add_New
End If
End Select
and similary for other buttons.
Dear Shailja,
Thanks for this solution , because am developing a software , can u tell me each form i have to use the add button, edit save buttons , is it correct.
hi actualy i want use this toolbar butons ( add, edit ,save ) to do operation for all the master , transaction. so each form will vary the save buutons.i can place save buttons in visible false. is it correct.
thanks u very much. sir can i have u r email id to contact .
Comment