• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

Monochrome monitor

Hi,

I have a picture box with a certain BMP.
If I'm running my application in Monochrome monitor, the picture became totally black, but if I'm opening the same BMP in Paint application it looks good (all colors are transformed to grey colors)

How can I display the picture in VB ?

Many thanks
0
amavr
Asked:
amavr
1 Solution
 
Toad224Commented:
geez... who has a monochrome monitor.. lol...  If the bitmap is supposed to be a color one, try opening it up in Paint again, and choosing Save As, and in the Save Type as box, try the different settings available...  Monochrome, 16 color, 256 color, 24-bit... and save the file, and try opening the new saved file with VB.

If you're not looking to display a specific bitmap, and perhaps letter the user choose one to open, you should look at the WinAPI functions for other methods of displaying bitmaps instead of using the picturebox in VB.

I hope that helps.  Good luck!
0
 
amavrAuthor Commented:
The Monochrome monitor is in use in medical applications.

I do need to load many different BMP's and JPG's dynamically - the pictures created while the program is running so I cannot use SaveAs option.

thanks
0
 
jonnyfunfunCommented:
I would have to agree with Toad...you may be better off looking into API functions rather than using the picturebox.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Toad224Commented:
hmm... really?  There are actually medical devices that run Windows with VB programs...

Does the picture display correctly in Internet Explorer?  If it does, I suppose you could use the Internet Explorer ActiveX control.  What other ways have you tried displaying it?  Does it display properly in any other programs you have tried?
0
 
mdouganCommented:
Well, there is a difference between monochrome and greyscale.  Monochrome means one single color or shade.  So, VB is going to look at the bitmap and ask if each pixel is closer to white or black, and then turn the pixel to that.  

If you need the bitmap to look good under Monochrome, then as Toad224 suggested, bring the bitmap into Paint and reduce the colors to Monochrome.  It's likely that paint will do a better job of the conversion than the picturebox control would.

If you want to have a color bitmap for people with color monitors, and a black and white one for monochrome monitors, then you'd probably want to use two separate bitmaps and then check the system's display properties before loading the bmp to decide which one to load.
0
 
DanRollinsCommented:
Hi amavr,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

amavr, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now