dbTalk Databases Forums  

Possible to make transparent .bmp icons transparent with an Access 2010 ribbon?

comp.databases.ms-access comp.databases.ms-access


Discuss Possible to make transparent .bmp icons transparent with an Access 2010 ribbon? in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: Possible to make transparent .bmp icons transparent with anAccess 2010 ribbon? - 02-08-2012 , 04:00 AM






On Feb 7, 5:46*pm, PW <emailaddyin... (AT) ifIremember (DOT) com> wrote:
Quote:
On Sun, 5 Feb 2012 21:22:39 -0700, "Albert D. Kallal"

How are you loading the icons.

Like this:

!-- * * * * * *<button id="btnToday" size="large" label="Today"
image="table-edit.bmp" onAction="OnOpenFormNewRec" tag="frmToday"/
--

Good to know, but I am just using the image property. *Axialis gave me
a break on the cost of their icon workshop program that will do batch
changes.

-paul
right but show your code for the image call back - you'll see it uses
loadpicture()
Albert k

Reply With Quote
  #12  
Old   
PW
 
Posts: n/a

Default Re: Possible to make transparent .bmp icons transparent with an Access 2010 ribbon? - 02-08-2012 , 11:31 AM






On Wed, 8 Feb 2012 02:00:17 -0800 (PST), "Albert D. Kallal"
<kallal (AT) msn (DOT) com> wrote:

Quote:
On Feb 7, 5:46*pm, PW <emailaddyin... (AT) ifIremember (DOT) com> wrote:
On Sun, 5 Feb 2012 21:22:39 -0700, "Albert D. Kallal"

How are you loading the icons.

Like this:

!-- * * * * * *<button id="btnToday" size="large" label="Today"
image="table-edit.bmp" onAction="OnOpenFormNewRec" tag="frmToday"/
--

Good to know, but I am just using the image property. *Axialis gave me
a break on the cost of their icon workshop program that will do batch
changes.

-paul

right but show your code for the image call back - you'll see it uses
loadpicture()
Albert k
Yep. Sorry about that! Where do I get loadpictureGDI from?

-paulw

Reply With Quote
  #13  
Old   
PW
 
Posts: n/a

Default Re: Possible to make transparent .bmp icons transparent with an Access 2010 ribbon? - 02-08-2012 , 11:41 AM



On Wed, 08 Feb 2012 10:31:16 -0700, PW
<emailaddyinsig (AT) ifIremember (DOT) com> wrote:

Quote:
On Wed, 8 Feb 2012 02:00:17 -0800 (PST), "Albert D. Kallal"
kallal (AT) msn (DOT) com> wrote:

On Feb 7, 5:46*pm, PW <emailaddyin... (AT) ifIremember (DOT) com> wrote:
On Sun, 5 Feb 2012 21:22:39 -0700, "Albert D. Kallal"

How are you loading the icons.

Like this:

!-- * * * * * *<button id="btnToday" size="large" label="Today"
image="table-edit.bmp" onAction="OnOpenFormNewRec" tag="frmToday"/
--

Good to know, but I am just using the image property. *Axialis gave me
a break on the cost of their icon workshop program that will do batch
changes.

-paul

right but show your code for the image call back - you'll see it uses
loadpicture()
Albert k

Yep. Sorry about that! Where do I get loadpictureGDI from?

-paulw

I found it in the sample iconinribbon.zip on the page you gave me a
link to, but I am having trouble getting it to work.

Reply With Quote
  #14  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: Possible to make transparent .bmp icons transparent with an Access 2010 ribbon? - 02-08-2012 , 08:04 PM



"PW" wrote in message news:btc5j79uces5aj0dub7clcr4o7rnev07hj (AT) 4ax (DOT) com...


Quote:
I found it in the sample iconinribbon.zip on the page you gave me a
link to, but I am having trouble getting it to work.
Excellent.

My code is this:

Sub CallbackLoadImage(strImage As String, _
ByRef image)

Dim strImagePath As String
' Callback loadImage


If Left(strImage, 4) = "mso." Then
strImage = Mid(strImage, 5)
image = strImage
Else
strImagePath = CurrentProject.Path & "\ribbon\" & strImage
Set image = LoadPictureGDIP(strImagePath)
'Set image = LoadPictureGDIP(strImagePath) ' old built in
End If

End Sub

So the routines were just copy + lifted from the ribbon example. That
suggests that basGDI code module is required. Since the samples work, then
the use of that LoadPictureGDIP should also work.


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Pleasenospam_kallal (AT) msn (DOT) com

Reply With Quote
  #15  
Old   
PW
 
Posts: n/a

Default Re: Possible to make transparent .bmp icons transparent with an Access 2010 ribbon? - 02-08-2012 , 09:53 PM



On Wed, 8 Feb 2012 19:04:16 -0700, "Albert D. Kallal"
<PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote:

Quote:
"PW" wrote in message news:btc5j79uces5aj0dub7clcr4o7rnev07hj (AT) 4ax (DOT) com...


I found it in the sample iconinribbon.zip on the page you gave me a
link to, but I am having trouble getting it to work.

Excellent.

My code is this:

Sub CallbackLoadImage(strImage As String, _
ByRef image)

Dim strImagePath As String
' Callback loadImage


If Left(strImage, 4) = "mso." Then
strImage = Mid(strImage, 5)
image = strImage
Else
strImagePath = CurrentProject.Path & "\ribbon\" & strImage
Set image = LoadPictureGDIP(strImagePath)
'Set image = LoadPictureGDIP(strImagePath) ' old built in
End If

End Sub

So the routines were just copy + lifted from the ribbon example. That
suggests that basGDI code module is required. Since the samples work, then
the use of that LoadPictureGDIP should also work.
Looking good Albert, but

Where is this located? LoadPictureGDIP(strImagePath)

I don't have it here. Access no can find it.

-paulw

Reply With Quote
  #16  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: Possible to make transparent .bmp icons transparent with an Access 2010 ribbon? - 02-09-2012 , 01:33 AM



"PW" wrote in message news:0og6j75g1atsoemq8it6t94llk06s151c0 (AT) 4ax (DOT) com...

Quote:
Looking good Albert, but

Where is this located? LoadPictureGDIP(strImagePath)

I don't have it here. Access no can find it.
From any example from the ribbon site I linked to quite sure has this code.

So from the access ribbon site, there are 31 examples on this page:

http://www.accessribbon.de/en/index.php?Downloads

Quite sure the sample code module is included in each example?

So you have to include (lift) from one of those examples the code module
called basGDI

I also have a copy of that code module in my ribbon class here:

http://www.kallal.ca/Ribbon/ribbon.htm

As noted, that load routine has support for:

bmp, gif, jpe, jpg, tif, png, wmf, emf, ico

I not ever looked at or bothering to even see what the code does.

I simply used it from the access ribbon site since anything else I used to
load icons looked like crap.

In other words, I never spent anytime looking at this issue - just used what
that web site suggested...

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Pleasenospam_kallal (AT) msn (DOT) com

Reply With Quote
  #17  
Old   
PW
 
Posts: n/a

Default Re: Possible to make transparent .bmp icons transparent with an Access 2010 ribbon? - 02-09-2012 , 12:31 PM



On Thu, 9 Feb 2012 00:33:24 -0700, "Albert D. Kallal"
<PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote:

Quote:
"PW" wrote in message news:0og6j75g1atsoemq8it6t94llk06s151c0 (AT) 4ax (DOT) com...

Looking good Albert, but

Where is this located? LoadPictureGDIP(strImagePath)

I don't have it here. Access no can find it.

From any example from the ribbon site I linked to quite sure has this code.

So from the access ribbon site, there are 31 examples on this page:

http://www.accessribbon.de/en/index.php?Downloads

Quite sure the sample code module is included in each example?

So you have to include (lift) from one of those examples the code module
called basGDI

I also have a copy of that code module in my ribbon class here:

http://www.kallal.ca/Ribbon/ribbon.htm

As noted, that load routine has support for:

bmp, gif, jpe, jpg, tif, png, wmf, emf, ico

I not ever looked at or bothering to even see what the code does.

I simply used it from the access ribbon site since anything else I used to
load icons looked like crap.

In other words, I never spent anytime looking at this issue - just used what
that web site suggested...

I am using converted .ico files to .bmp with transparancy preserved.
Using LoadPictureGDIP is not respecting the transparant backgrounds of
the images. The backgrounds are black instead of transparant.

I will try .png files and see if there is a difference.

-paulw

Reply With Quote
  #18  
Old   
PW
 
Posts: n/a

Default Re: Possible to make transparent .bmp icons transparent with an Access 2010 ribbon? - 02-09-2012 , 12:51 PM



On Thu, 9 Feb 2012 00:33:24 -0700, "Albert D. Kallal"
<PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote:

Quote:
"PW" wrote in message news:0og6j75g1atsoemq8it6t94llk06s151c0 (AT) 4ax (DOT) com...

Looking good Albert, but

Where is this located? LoadPictureGDIP(strImagePath)

I don't have it here. Access no can find it.

From any example from the ribbon site I linked to quite sure has this code.

So from the access ribbon site, there are 31 examples on this page:

http://www.accessribbon.de/en/index.php?Downloads

Quite sure the sample code module is included in each example?

So you have to include (lift) from one of those examples the code module
called basGDI

I also have a copy of that code module in my ribbon class here:

http://www.kallal.ca/Ribbon/ribbon.htm

As noted, that load routine has support for:

bmp, gif, jpe, jpg, tif, png, wmf, emf, ico

I not ever looked at or bothering to even see what the code does.

I simply used it from the access ribbon site since anything else I used to
load icons looked like crap.

In other words, I never spent anytime looking at this issue - just used what
that web site suggested...
All right Albert. Using the "new" loadPictureGDIP function with the
..bmp files with transparent backgrounds that I converted from .ico
files makes the backgrounds black. These are how they actually appear
when I look at them on disk. Howeverif I use the original LoadPicture
function, it somehow transposes the black backgrounds and makes them
appear transparent.

Now with LoadPictureGDIP I can use other file formats like the
transparent .png icons that I have. They appear transparent like they
do on disk. But not any crisper.

So at least I will not have to go through a conversion process like I
did with the .ico->.bmp icons.

Thanks again,

-paul

Reply With Quote
  #19  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: Possible to make transparent .bmp icons transparent with an Access 2010 ribbon? - 02-11-2012 , 08:52 PM



"PW" wrote in message news:q258j79glslvkbsv20h0g8gvc61o5l6psq (AT) 4ax (DOT) com...


Quote:
In other words, I never spent anytime looking at this issue - just used
what
that web site suggested...

Howeverif I use the original LoadPicture
function, it somehow transposes the black backgrounds and makes them
appear transparent.
Gee, thanks for sharing the above.
I had real bad luck with Loadpicture so I just started using something that
worked and that was quite much the end of it for me.

Quote:
Now with LoadPictureGDIP I can use other file formats like the
transparent .png icons that I have. They appear transparent like they
do on disk. But not any crisper.

So at least I will not have to go through a conversion process like I
did with the .ico->.bmp icons.

Thanks again,
Excellent, the above is also my experience. I also often use a good paint
program with some "re-sizing" options if the image in question is not the
right size
(a good paint program will have better options for re-sizing then letting
the system do it for you).

As noted, I wrote some routines and right now I really don't even read xml -
but just cut + paste from one ribbon I made and this I find faster then even
building menu bars like how we had to do in the older system.

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Pleasenospam_kallal (AT) msn (DOT) com

Reply With Quote
  #20  
Old   
PW
 
Posts: n/a

Default Re: Possible to make transparent .bmp icons transparent with an Access 2010 ribbon? - 02-12-2012 , 11:12 AM



On Sat, 11 Feb 2012 19:52:25 -0700, "Albert D. Kallal"
<PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote:

Quote:
"PW" wrote in message news:q258j79glslvkbsv20h0g8gvc61o5l6psq (AT) 4ax (DOT) com...


In other words, I never spent anytime looking at this issue - just used
what
that web site suggested...

Howeverif I use the original LoadPicture
function, it somehow transposes the black backgrounds and makes them
appear transparent.

Gee, thanks for sharing the above.
I had real bad luck with Loadpicture so I just started using something that
worked and that was quite much the end of it for me.

Now with LoadPictureGDIP I can use other file formats like the
transparent .png icons that I have. They appear transparent like they
do on disk. But not any crisper.

So at least I will not have to go through a conversion process like I
did with the .ico->.bmp icons.

Thanks again,

Excellent, the above is also my experience. I also often use a good paint
program with some "re-sizing" options if the image in question is not the
right size
(a good paint program will have better options for re-sizing then letting
the system do it for you).

As noted, I wrote some routines and right now I really don't even read xml -
but just cut + paste from one ribbon I made and this I find faster then even
building menu bars like how we had to do in the older system.
Me too (faster)! I really liked making our new ribbon. Too bad I
can't do it every day. One and done (until the next release) :-(

Thanks again Albert,

-paul

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.