Solved

Toolbar control - saving & restoring

Posted on 1998-06-03
4
176 Views
Last Modified: 2011-04-14
Preamble:
When using the toolbar control within VB5, I set the cutomizable property=True & Allow the user to DBLClick on the toolbar.
On the change event I use the Toolbar.SaveToolbar method & it seems to save the information correctly to the registry.
When using the Toolbar.RestoreToolbar method (form_load) I use the same key,subkey,value as for the SaveToolbar method, but it does not restore the toolbar correctly.
Question :
Am I doing something wrong (and if so what), or is this a known "feature" ?
0
Comment
Question by:EnricoS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
clifABB earned 70 total points
ID: 1462399
Sometimes a form has to be visible for graphics to affect it.

This worked for me:
Private Sub Form_Load()

  Me.Visible = True
  DoEvents
  Toolbar1.RestoreToolbar "AppName", "User1", "Toolbar1"
End Sub

0
 

Author Comment

by:EnricoS
ID: 1462400
thnx - why does this work ?
From you answer I thought that the "RestoreToolbar" would work when called from the Form_Activate (instead of _Load) event (since the .Visible property has by then changed to True, and some sort of "DoEvents" happened between the two messages/events)
It turned out not to work & I can't figure out why.
I'm new to experts-exchange - does this qualify as a "new" question ?
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1462401
I don't understand why either.  A bug perhaps?


A new question?  Well, I suppose.  I've never seen a question like this before.  (Actually I didn't even know you could save toolbar settings until your question)
0
 

Expert Comment

by:oldholburn
ID: 3650435
as far as i can gather you need an image
on the buttons.. the only way i found to do this is by adding buttons and assigning an image to it in the toolbar custom box..
not much use i know but that's the only way i know it to work
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question