Adding a toolbar? 
Author Message
 Adding a toolbar?

Folks

Many thanks for all your assistance these last few months.  Version
2.00 of my app is on my website and I've already received some very
nice comments.

I'd like to add a toolbar to my app very similar to the Back, Next,
Cut, Copy etc buttons at
http://www.*-*-*.com/
If I can add some icons to the menu bar so much the better.

One of my criteria though is I want to distribute only a single VB6
exe.   This code appears to want an OCX and several DLLs for
distribution with your VB6 exe.  Before I spend too much time hacking
it are there any suggestions or alternatives?

My current screen is at http://www.*-*-*.com/ ;I want to replace
all those command buttons with a toolbar at the top.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.*-*-*.com/
Tony's Microsoft Access Blog - http://www.*-*-*.com/
For a convenient utility to keep your users FEs and other files
  updated see http://www.*-*-*.com/
Granite Fleet Manager http://www.*-*-*.com/



Sun, 22 Jul 2012 06:01:45 GMT  
 Adding a toolbar?



Quote:
> I'd like to add a toolbar to my app very similar to the Back, Next,
> Cut, Copy etc buttons at
> http://vbaccelerator.com/home/VB/Code/Controls/Toolbar/vbAccelerator_...
> If I can add some icons to the menu bar so much the better.

> One of my criteria though is I want to distribute only a single VB6
> exe.   This code appears to want an OCX and several DLLs for
> distribution with your VB6 exe.  Before I spend too much time hacking
> it are there any suggestions or alternatives?

> My current screen is at http://autofeupdater.com/.  I want to replace
> all those command buttons with a toolbar at the top.

While I understand wanting to limit the dependencies your app has, OCXs
exist to be used.  There's nothing wrong with using them.  Granted, for some
things, like displaying the same common dialog boxes offered by the
comdlg32.ocx, the API function calls are fairly easy and straight-forward.
It makes sense to use the API and eliminate that particular control.

A toolbar...that's a little bit different. But, you can use the API to
create a toolbar if you really want to put the effort into and are really
dead-set against using an OCX.  You'll have to write probably quite a bit of
code and you'll need to use subclassing to process messages. It's not
something that I would recommend a beginner or even intermediate VB6
programmer undertake. But, if you search the newsgroups or the web, I'd bet
you could find example code to at least give you a start. Try searching on
"TOOLBARCLASSNAME" (or perhaps "ToolbarWindow32", which is the string value
of that constant). This very toolbar control is available in the Windows
Common Controls OCX (both the VB5 and VB6 versions), should you decide a
single OCX file is OK.

You might also want to at least take a look at Codejock Software's
CommandBars. http://www.codejock.com/products/commandbars/?platform=com.
It's not free though. This will let you create menus with icons, and much
more. It's actually a very good product. I use it quite a bit. It's also one
of the FEW ActiveX components still actively developed and supported. It's
supports tabbed toolbars and Office 2007-style ribbon bars. My only gripe
about it is that it's not the most intuitive thing to use. And no, I'm not
affiliated with Codejock in any way.  Just suggesting a product that might
suit your needs (if you can get over that criteria you have).

--
Mike



Sun, 22 Jul 2012 08:26:32 GMT  
 Adding a toolbar?

Quote:

>While I understand wanting to limit the dependencies your app has, OCXs
>exist to be used.  There's nothing wrong with using them.  

For my app there is.  From my web site index page "The Auto FE Updater
is a drag and drop deployment on the server.   No installation
required.  Just download, unzip the files and place on the server.
The utility does not require any extra admin privileges to test or for
the users to run the utility.  The IT folks in your organization do
not need to be involved in your decision to use the Auto FE Updater."

I don't want to have any distribution or registration issues requiring
admin privileges or IT staff involvement.

Quote:
>It's not
>something that I would recommend a beginner or even intermediate VB6
>programmer undertake.

I'm an advanced Access programmer but doubt I'm even an intermediate
VB6 programmer.  There are lots of little things which I occasionally
encounter which tend to bite me.

Quote:
>You might also want to at least take a look at Codejock Software's
>CommandBars. http://www.codejock.com/products/commandbars/?platform=com.
>It's not free though.

Very nice.  Thanks for the suggestion.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/



Sun, 22 Jul 2012 10:08:58 GMT  
 Adding a toolbar?

Quote:

> >While I understand wanting to limit the dependencies your app has, OCXs
> >exist to be used. ?There's nothing wrong with using them. ?

> For my app there is. ?From my web site index page "The Auto FE Updater
> is a drag and drop deployment on the server. ? No installation
> required. ?Just download, unzip the files and place on the server.
> The utility does not require any extra admin privileges to test or for
> the users to run the utility. ?The IT folks in your organization do
> not need to be involved in your decision to use the Auto FE Updater."

> I don't want to have any distribution or registration issues requiring
> admin privileges or IT staff involvement.

> >It's not
> >something that I would recommend a beginner or even intermediate VB6
> >programmer undertake.

> I'm an advanced Access programmer but doubt I'm even an intermediate
> VB6 programmer. ?There are lots of little things which I occasionally
> encounter which tend to bite me.

> >You might also want to at least take a look at Codejock Software's
> >CommandBars.http://www.codejock.com/products/commandbars/?platform=com.
> >It's not free though.

> Very nice. ?Thanks for the suggestion.

> Tony
> --
> Tony Toews, Microsoft Access MVP
> Tony's Main MS Access pages -http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
> For a convenient utility to keep your users FEs and other files
> ? updated seehttp://www.autofeupdater.com/
> Granite Fleet Managerhttp://www.granitefleet.com/

Hi Tony:

To cut down on dependency issues, I frequently search for control
(.ctl) code... that is... the code from which ocx's are created.  You
can embed the controls in your executable and thus you do not need to
worry about installation and dependency concerns.

A good place to search for those controls is on Planet Source Code.

An excellent tool for creating modern buttons, toolbars with 32bit
images in various styles is the jcbutton.  It's easy to use, many
options and can quickly give your GUI interface a very modern look.

Here is the link:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=7...

And of course... the price ($0.00) is right!

Tom



Sun, 22 Jul 2012 11:07:16 GMT  
 Adding a toolbar?

Quote:
>I'd like to add a toolbar to my app very similar to the Back, Next,
>Cut, Copy etc buttons at
>http://vbaccelerator.com/home/VB/Code/Controls/Toolbar/vbAccelerator_...
>If I can add some icons to the menu bar so much the better.

Found another much simpler one at
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=6...

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/



Sun, 22 Jul 2012 11:31:02 GMT  
 Adding a toolbar?

I posted a reply but somehow it never made it to the server.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/



Sun, 22 Jul 2012 11:39:30 GMT  
 Adding a toolbar?
MikeD explained on 2/2/2010 :

Quote:

>> One of my criteria though is I want to distribute only a single VB6
>> exe.  

> While I understand wanting to limit the dependencies your app has, OCXs exist
> to be used.  There's nothing wrong with using them.

Tony has explained "countless" times that a specific *feature* of his
application is admin-free installation.  In other words, it's being
marketed directly to people with Nazi IT departments standing in the
way of them doing their job.  I support your position of course, but
you also gotta respect the desire to eliminate the need for admin
intervention, in particular with the explosive growth of the least
rights movement.

--
.NET: It's About Trust!
http://vfred.mvps.org



Mon, 23 Jul 2012 02:26:14 GMT  
 Adding a toolbar?


Quote:
> One of my criteria though is I want to distribute only a single VB6
> exe.   This code appears to want an OCX and several DLLs for
> distribution with your VB6 exe.  Before I spend too much time hacking
> it are there any suggestions or alternatives?

You can always move UserControls from OCX projects to be part of a Standard
EXE project. Also, the common controls are part of Windows 95+, so you can
use them provided that you go the API route. However, anything that is
created using the API function CreateWindow(Ex) will not cause Validate
event to fire in other controls, and pressing tab would skip the API-created
window. If you want Validate event and tab to work, you have to apply
IOLEInPlaceActiveObject trick so VB can "see" the control. Search the web
for "vb IOLEInPlaceActiveObject" for a solution.

If you want to use the Toolbar that is part of the common controls or the
CoolBar without using the OCX that came with VB and without having to
distribute anything, download the following VB source library, and check out
CToolbarCtl.cls and CRebarCtl.cls(CoolBar). Check out "explorer" sample in
"demos" folder. You need to set CBX_DEBUGWINDOWPROC to 0 in the project's
properties Make tab to run the demo, and remove the reference to the missing
library.

This library also implements all the common controls, but the ones at
vbaccelerator site are nicer. This library implements the controls as
classes, while vbaccelerator site implement them as UserControls. If you
need to apply IOLEInPlaceActiveObject trick, you can only apply it to
UserControls, so either you have to use a UserControl version, or convert
the class to UserControl.

http://sourceforge.net/projects/codebox/



Mon, 23 Jul 2012 02:53:57 GMT  
 Adding a toolbar?

Quote:
>>> One of my criteria though is I want to distribute only a single VB6
>>> exe.  

>> While I understand wanting to limit the dependencies your app has, OCXs exist
>> to be used.  There's nothing wrong with using them.

>Tony has explained "countless" times that a specific *feature* of his
>application is admin-free installation.  

I've only stated that about 5 or 7 times.  MikeD may not have read
those postings or realized that I was the same person posting now as
then.  I know what I'm like on the newsgroups and such.  I don't pay
any attention to the posters names unless they are particularly
brilliant or particularly stupid or annoying.  <smile>   I don't think
I qualify too much on any of those criteria.  <bigger smile>

I once got a Fidonet netmail (email) from someone saying "Hi Cuz, how
you doing?" in response to my reply to him in an Access echo.  (Echo
being Fidonet terminology for newsgroup/forum.  This would've been
about 1993 or so.)  My first thought was, who the heck is this jerk
calling me cuz.  Then I looked at his name and realized that yes
indeed he was my cousin.   Just not a Mennonite last name like most of
my cousins.

Quote:
>In other words, it's being
>marketed directly to people with Nazi IT departments standing in the
>way of them doing their job.  I support your position of course, but
>you also gotta respect the desire to eliminate the need for admin
>intervention, in particular with the explosive growth of the least
>rights movement.

Well, that's a bit harsh of a comment about my software and the IT
departments.  I just started building that utility about ten years
ago.  And I just took the route of not requiring any controls or such
because I didn't have much of a GUI until recently.   I don't trust
the MS controls given  the versioning problems we've encountered over
last decide and a half.

And until you sent me an emailed comment along those lines it just
hadn't occurred to me that emphasize that my utility doesn't require
any installation or admin privileges.  Mind you, due to your email, I
did decide to create that paragraph emphasizing that aspect.    So
thanks for the email.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/



Mon, 23 Jul 2012 03:15:27 GMT  
 Adding a toolbar?

Quote:


>>>> One of my criteria though is I want to distribute only a single VB6
>>>> exe.  

>>> While I understand wanting to limit the dependencies your app has, OCXs
>>> exist  to be used.  There's nothing wrong with using them.

>> Tony has explained "countless" times that a specific *feature* of his
>> application is admin-free installation.  

> I've only stated that about 5 or 7 times.

Well, *I* haven't counted. <g>

Quote:
> MikeD may not have read
> those postings or realized that I was the same person posting now as
> then.

He's pretty attentive.  I never underestimate that, with him.

Quote:
> I know what I'm like on the newsgroups and such.  I don't pay
> any attention to the posters names unless they are particularly
> brilliant or particularly stupid or annoying.  <smile>  

Well, there is that, yeah. <bg>

Quote:
> I don't think
> I qualify too much on any of those criteria.  <bigger smile>

Not sure whether withholding comment is a good or a bad move? <vbg>

Quote:
> I once got a Fidonet netmail (email) from someone saying "Hi Cuz, how
> you doing?" in response to my reply to him in an Access echo.  (Echo
> being Fidonet terminology for newsgroup/forum.  This would've been
> about 1993 or so.)  My first thought was, who the heck is this jerk
> calling me cuz.  Then I looked at his name and realized that yes
> indeed he was my cousin.   Just not a Mennonite last name like most of
> my cousins.

Heh, that's almost worse than any I've pulled.  Heheheheh...

Quote:
>> In other words, it's being
>> marketed directly to people with Nazi IT departments standing in the
>> way of them doing their job.  I support your position of course, but
>> you also gotta respect the desire to eliminate the need for admin
>> intervention, in particular with the explosive growth of the least
>> rights movement.

> Well, that's a bit harsh of a comment about my software and the IT
> departments.

Okay, I'm sorry about that.  I realize that might not be very good
marketing, should a client start googling.  I do tend to drive a point
right into the ground, don't I?  <mumble>

Quote:
> I just started building that utility about ten years
> ago.  And I just took the route of not requiring any controls or such
> because I didn't have much of a GUI until recently.   I don't trust
> the MS controls given  the versioning problems we've encountered over
> last decide and a half.

> And until you sent me an emailed comment along those lines it just
> hadn't occurred to me that emphasize that my utility doesn't require
> any installation or admin privileges.  Mind you, due to your email, I
> did decide to create that paragraph emphasizing that aspect.    So
> thanks for the email.

I'll always take all the thanks, but none of the blame!  ;-)

--
.NET: It's About Trust!
http://vfred.mvps.org



Mon, 23 Jul 2012 06:07:55 GMT  
 Adding a toolbar?



Quote:

>>>> One of my criteria though is I want to distribute only a single VB6
>>>> exe.

>>> While I understand wanting to limit the dependencies your app has, OCXs
>>> exist
>>> to be used.  There's nothing wrong with using them.

>>Tony has explained "countless" times that a specific *feature* of his
>>application is admin-free installation.

> I've only stated that about 5 or 7 times.  MikeD may not have read
> those postings or realized that I was the same person posting now as
> then.

I recall Tony having mentioned in the past not wanting to use OCXs or any
other dependencies. Not sure I ever knew why.

Quote:

> I once got a Fidonet netmail (email) from someone saying "Hi Cuz, how
> you doing?" in response to my reply to him in an Access echo.  (Echo
> being Fidonet terminology for newsgroup/forum.  This would've been
> about 1993 or so.)  My first thought was, who the heck is this jerk
> calling me cuz.  Then I looked at his name and realized that yes
> indeed he was my cousin.   Just not a Mennonite last name like most of
> my cousins.

>>In other words, it's being
>>marketed directly to people with Nazi IT departments standing in the
>>way of them doing their job.  I support your position of course, but
>>you also gotta respect the desire to eliminate the need for admin
>>intervention, in particular with the explosive growth of the least
>>rights movement.

I've had to deal with admins who lock down systems very tightly.  In those
cases, it's put to the controller or CFO in terms they can understand:
Sure, we can write this app to not require dependencies, such that basically
all that is needed is to copy the EXE somewhere. But, it's going to take 10,
or 20, or 50 hours longer and therefore cost you thousands of dollars more
(our rate for most clients is $150/hr) since we'll have to write
functionality that already exists in an OCX.

In most cases, our apps are installed on a terminal server and users run
them from that. This means the users themselves are only standard users and
updating only requires a single installation be updated.  And in 99.9% of
those cases, we can do this remotely, so we don't even need to make a trip
out to the client (which they appreciate because we charge them driving time
and mileage).

Quote:
> Well, that's a bit harsh of a comment about my software and the IT
> departments.  I just started building that utility about ten years
> ago.  And I just took the route of not requiring any controls or such
> because I didn't have much of a GUI until recently.   I don't trust
> the MS controls given  the versioning problems we've encountered over
> last decide and a half.

What versioning problems are you referring to? I've NEVER in well over 10
years encountered problems with distributing OCXs.

It sounds like this is mostly just a restriction you've placed on yourself.
How much additional time are you having to spend writing code to duplicate
functionality that you can easily incorporate simply by dropping in an OCX?
It just seems silly to me. But if that's what you choose to do, who are any
of us to tell you otherwise?

--
Mike



Mon, 23 Jul 2012 21:30:35 GMT  
 Adding a toolbar?

Quote:

>>>Tony has explained "countless" times that a specific *feature* of his
>>>application is admin-free installation.

>> I've only stated that about 5 or 7 times.  MikeD may not have read
>> those postings or realized that I was the same person posting now as
>> then.

> I recall Tony having mentioned in the past not wanting to use OCXs or any
> other dependencies. Not sure I ever knew why.

Sorry if my response sounded harsh.  Wasn't meant that way.

Quote:
>>>In other words, it's being
>>>marketed directly to people with Nazi IT departments standing in the
>>>way of them doing their job.  I support your position of course, but
>>>you also gotta respect the desire to eliminate the need for admin
>>>intervention, in particular with the explosive growth of the least
>>>rights movement.

> I've had to deal with admins who lock down systems very tightly.  In those
> cases, it's put to the controller or CFO in terms they can understand: Sure,
> we can write this app to not require dependencies, such that basically all
> that is needed is to copy the EXE somewhere. But, it's going to take 10, or
> 20, or 50 hours longer and therefore cost you thousands of dollars more (our
> rate for most clients is $150/hr) since we'll have to write functionality
> that already exists in an OCX.

That approach can work very well in some cases, especially as you
describe.  But it's pointless to even try in others.  I'm thinking,
your basic "line" workers who are just doing their job, and using
Access (or other such VBAish tools) to augment it.  Not hired gun
programmers billing $150/hr.

Hmmm, re-reading what I'm responding to <g>, I see we're definitely
coming at it from two different angles.  You're still talking about
getting an OCX installed.  I'm talking about the ability of *users* to
get software running without needing to do any installs.  Very
different perspectives.

Quote:
> It sounds like this is mostly just a restriction you've placed on yourself.
> How much additional time are you having to spend writing code to duplicate
> functionality that you can easily incorporate simply by dropping in an OCX?

I guess I can relate, because I tend to write my own as well.  I did
relent in the case of a virtual grid in one recent project, because I
just don't care enough about UI to invest what it would've taken in
that case. <g>  But I've hated having to distribute that sucker!  I'd
far rather just copy the EXE across and be done with it.  (This is an
inhouse project.)

--
.NET: It's About Trust!
http://vfred.mvps.org



Tue, 24 Jul 2012 03:14:07 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. Add-Ins, How to add a Toolbar.Button

2. Adding a ToolBar with VBA

3. Default Icon in the Add-In Toolbar

4. Problem Getting Microsoft Common Dialog Added To Toolbar

5. Add-In Toolbar Trouble

6. Add a toolbar in a coolbar

7. adding a toolbar in Internet Ewplorer

8. Add a Toolbar/AdressBar to Internet Explrer

9. Add a toolbar button to Windows Explorer?

10. How to add customed toolbar to IE using VB?

11. adding a button to the print preview toolbar

12. code to add a button to a built-in toolbar

 

 
Powered by phpBB® Forum Software