How can alert icons be displayed?

G

Guest

I have a UserForm to which I want to add the ability to display the same
alert icons as are displayed with the MsgBox function (Critical, Question,
Information, Exclamation). (The UserForm is working with the exception of
this capability. This implementation approach is being done for consistency,
since both MsgBox and UserForm are used to communicate with the user.)

I assume these four icons are bitmaps, so in the event handler for
userform_activate, I plan to insert this line of code:

Image1.Picture = LoadPicture("C:\complete_path_and_file_name.bmp")

However, I cannot find the bitmap files! I can find constants in the VBA
Object Browser that seem to correspond to the alerts, but I cannot find the
actual bitmap files for the alerts.

Help with finding the location of these bitmap files, or an alternative way
of coding this capability, would be appreciated. Thanks!

Bill
 
G

git

I would suggest that you just get the message box to display, hit
printscrn and then use Paint to crop the screen shot down to get just the
image you want.

I would also suggest that you don't go loading images from files, it means
the files have to 'hang around'. Put the image control in the user form
with the images you want and then set them to visible=false, then just
make the appropriate one visible in the event handler. This will make the
form more reliable and portable

Cheers

AJ
 
G

Guest

My apologies for not responding sooner .... have been chasing Internet
security software problems, which receive considerably higher priority when
the virus scan engine gets corrupted!!

Yes, I understand your point from "testing" with one of those .gif files
that is included with Windows. It loaded into the form and stayed there just
fine. I was hoping that finding the actual icons would be a simple matter,
but as we all know ....

For some unkown (at the moment) reason PrintScreen (PrtSc key) does not work
on my laptop so, I will do a screen capture through another program and
proceed from there.

Your suggestion has been a helpful one. Thanks!

Regards,
Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top