Solved

Monochrome monitor

Posted on 2002-06-03
7
279 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

910 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

21 Experts available now in Live!

Get 1:1 Help Now