Solved

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

Posted on 2011-03-20
5
357 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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

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…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

729 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