Solved

Toolbar control - saving & restoring

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

707 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

10 Experts available now in Live!

Get 1:1 Help Now