Solved

Toolbar control - saving & restoring

Posted on 1998-06-03
4
163 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

914 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now