Click to See Complete Forum and Search --> : RestoreToolbat


Ian Bennett
September 9th, 2001, 11:21 AM
I have just added that facility to customise the toolbar in my program using the SaveToolbar and RestoreToolbar commands. I have added the RestoreToolbar command in Load_Form and nothing happens, If, however, I call RestoreToolbar by say clicking on a button it works. I have tried putting it in seperate functions and calling it from Form_Load but can't get it to work. I suspect it is because RestoreToolbar will not work until the Form_Load event has finished. Any ideas?

Ian Bennett

John G Duffy
September 9th, 2001, 02:10 PM
Try using the Form_Activate event instead. At Form_load time, the Form is not yet built.

John G

Ian Bennett
September 9th, 2001, 05:14 PM
I tried that but to no avail. Is there a post Form_Load event?

John G Duffy
September 9th, 2001, 06:23 PM
The form_Activate event is invoked any time the form is shown. It is "Post" _Load and after all controls and the form are completely created and ready to run.
If you put a Form.Show in the Form_Load event, all the functions available to you at run time should be available after the .Show

John G

Ian Bennett
September 10th, 2001, 03:04 AM
Hi John,

It was late and my brain was not really in gear. I have managed to crack the problem by doing a toolbar.refresh BEFORE a toolbar.restore! I initially did a refresh after the restore but it did not work. Still.... that is VB for you.
Thanks for your help.