[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2011-03-20
5
Medium Priority
?
363 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 2000 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

656 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