Solved

How to test if the picture box is visible and change the color in VC#

Posted on 2011-03-20
5
351 Views
Last Modified: 2012-05-11
Want to achieve the goal:
if the picture box is visible, want to change the control background color. Which two methods can I use to do that? I could not find IsVisible method. Does it offer it? How to cope with it?
0
Comment
Question by:jl66
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Accepted Solution

by:
nandithaa earned 500 total points
ID: 35178197
Check if this helps
if (pictureBox1.Visible)
            {
                pictureBox1.BackColor = Color.Blue; 
            }

Open in new window

0
 
LVL 8

Expert Comment

by:jimsweb
ID: 35178244
You can rewrite it like this.

if (pictureBox1.Visible = false)
            {
                pictureBox1.BackColor = Color.Blue;
            }
0
 
LVL 2

Expert Comment

by:ramkihardy
ID: 35178339
Using this you can ACHIEVE THIS

if (pictureBox1.Visible)
            {
                pictureBox1.BackColor = Color.Blue;
            }
else
{
 pictureBox1.BackColor = Color.Blue;
Ask if you want any further help..
Regards
Ramki
}
0
 
LVL 2

Expert Comment

by:ramkihardy
ID: 35178348
Sorry for the above comment...mis typed it
Using this you can ACHIEVE THIS

if (pictureBox1.Visible)
            {
                pictureBox1.BackColor = Color.Blue;
            }
else
{
 pictureBox1.BackColor = Color.white;
}


Regrds Ramki
0
 

Author Closing Comment

by:jl66
ID: 35178381
Thank you so much.
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

749 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