?
Solved

Toolbar control - saving & restoring

Posted on 1998-06-03
4
Medium Priority
?
188 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 280 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…
Suggested Courses
Course of the Month17 days, 8 hours left to enroll

830 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