|
-
Oct 24th, 2003, 05:04 PM
#1
Thread Starter
Fanatic Member
toolbar save button
Hey all,
How would you make the toolbar button "save" run a db insert, update, delete etc command on any child mdi form ?
cheers all
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
-
Oct 24th, 2003, 06:37 PM
#2
Lively Member
for example...
VB Code:
Private Sub tbarMain_ButtonClick(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) _
Handles tbarMain.ButtonClick
Select Case tbarMain.Buttons.IndexOf(e.Button)
Case 0
'New character
DoFileNew()
Case 1
'Open character
DoFileOpen()
Case 2
'Save Character
DoFileSave()
Case 4
'Print
BuildAllPrintRichTexts()
DoPrintAll()
Case 6
'Select Genre
DoSelectGenre()
Case 7
'Options
DoProgramOptions()
Case 8
'Show Background
DoShowBackground()
Case 10
'Show Bonuses
DoShowBonuses()
Case 12
'View All in a selection listview
mnuViewAll.Checked = True
mnuViewSelected.Checked = False
DoListViewViewAll()
Case 13
'View Selected in a selection listview
mnuViewAll.Checked = False
mnuViewSelected.Checked = True
DoListViewViewSelected()
Case 15
'Show Spell Counters
DoShowCounters()
End Select
-
Oct 25th, 2003, 02:35 AM
#3
Thread Starter
Fanatic Member
OK that handles the clicks, already can do that but what i mean is OK my toolbar has a button SAVE with image of disk on it,
handle the click action and call a function called "DoSave()" ok so this is the problem i have about 10 forms with data being inputted and on each form is a text button saying SAVE if you click the text button it saves the data but i want my users to be able to click a save button on the toolbar and it will save the data on any page that is the active child
cheers Carl
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
-
Oct 25th, 2003, 03:58 AM
#4
Lively Member
Well then, write code to do so. Are you using an MDI form or multiple instances of the same form or what? If you are using MDI and want to determine the currently active child window:
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vbcon/html/vbtskdeterminingactivemdichild.htm
(if you have a different version of help just paste in from /vbcon forward in front of any help page) (wish MS hadn't changed the format of help urls...)
-
Oct 25th, 2003, 05:08 AM
#5
Thread Starter
Fanatic Member
yes i am using mdi forms and ive manage yo sort it coding is complicated so wont go into detail
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
-
Oct 25th, 2003, 09:40 AM
#6
Lively Member
uh... so are you fixed up or what?
-
Oct 25th, 2003, 10:22 AM
#7
Thread Starter
Fanatic Member
yes kinda just having troble accessing child forms
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
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
|