Solved

Monochrome monitor

Posted on 2002-06-03
7
278 Views
Last Modified: 2008-03-06
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
Comment
Question by:amavr
7 Comments
 
LVL 1

Expert Comment

by:Toad224
ID: 7052614
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
 

Author Comment

by:amavr
ID: 7053303
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
 

Expert Comment

by:jonnyfunfun
ID: 7056592
I would have to agree with Toad...you may be better off looking into API functions rather than using the picturebox.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Expert Comment

by:Toad224
ID: 7056788
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
 
LVL 18

Expert Comment

by:mdougan
ID: 7057152
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
 
LVL 49

Expert Comment

by:DanRollins
ID: 7851443
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
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7912930
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VBA color chart bars 12 67
VBA error replacing data 6 35
Determine Range to Select 5 34
Macro Excel - Multiple If conditions 2 16
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now