How do I Toggle a picture on a button?

How do I Toggle a picture on a button?

Anonymous
Not applicable
255 Views
3 Replies
Message 1 of 4

How do I Toggle a picture on a button?

Anonymous
Not applicable
Hello,
I'm trying to get a picture on a command button to toggle to another picture when picked. I have got the process to work using the MyButton.Picture=LoadPicture("mypath") method. However, I was wanting to use a bitmap that I have saved inside one of my DLL files I use for my toolbars bitmaps. Can that be done? Is it possible to use a picture from a DLL file or am I stuck with having to hard code the path to my picture files?
I'm at a lost and I hope there is an way to do this. Any suggestion and advice would be greatly appreciated. Thanks in advance.
Jcurley@rbf.com
0 Likes
256 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
"jcurley" wrote in message
news:f1272fc.-1@WebX.maYIadrTaRb...

> I'm trying to get a picture on a command button to toggle
> to another picture when picked.

In the button's Click event, check a global variable to determine which
picture to load.

> However, I was wanting to use a bitmap that I have saved
> inside one of my DLL files I use for my toolbars bitmaps.
> Can that be done?

Yes. Although I forget the exact method, have a look in the Downloads
section of my site for ImageView.cls. It contains code that retrieves
bitmaps from ACADBTN.DLL. I'm sure you can adapt it to work with any
resource DLL.

--
There are 10 kinds of people:
Those who understand binary and those who don't
http://www.acadx.com




Hello,
I'm trying to get a picture on a command button to toggle to another
picture when picked. I have got the process to work using the
MyButton.Picture=LoadPicture("mypath") method. However, I was wanting to
use a bitmap that I have saved inside one of my DLL files I use for my
toolbars bitmaps. Can that be done? Is it possible to use a picture from
a DLL file or am I stuck with having to hard code the path to my picture
files?
I'm at a lost and I hope there is an way to do this. Any suggestion and
advice would be greatly appreciated. Thanks in advance.
Jcurley@rbf.com
0 Likes
Message 3 of 4

Anonymous
Not applicable
it is very easy to put a picture in a command button, u don't need to make any coding to do that, only thing u have to do is to make that picture size smaller to fit the command icon, and paste it.
John
0 Likes
Message 4 of 4

Anonymous
Not applicable
"jjin" wrote in message
news:f1272fc.1@WebX.maYIadrTaRb...

> it is very easy to put a picture in a command button,
> u don't need to make any coding to do that, only thing
> u have to do is to make that picture size smaller to fit the
> command icon, and paste it.

I'm sure jcurley wants to know how to change the button graphic at
runtime, not design time. This will require him to write some code.

--
There are 10 kinds of people:
Those who understand binary and those who don't
http://www.acadx.com
0 Likes