Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

drawing a red border on or around a control in winforms

Avatar of r3nder
r3nderFlag for United States of America asked on
.NET ProgrammingC#Microsoft Development
4 Comments1 Solution1359 ViewsLast Modified:
I want to highlight the controls that need to be filled in when a user does not enter information - for example a red border - how can I achieve this in a win form?

 string msg = "";
                    if (comBoxToLocations.SelectedValue.ToString() != "-1" && comBoxToLocations.SelectedValue.ToString() != "3")
                        ToID = Convert.ToInt32(comBoxToLocations.SelectedValue.ToString());
                        if (comBoxToLocations.SelectedValue.ToString() == "-1")
                            msg += "You must select a location to send to\r\n";
                        if (comBoxToLocations.SelectedValue.ToString() == "3")
                            msg += "Location cannot be Unknown\r\n";
                    if (cmboCarrier.SelectedValue.ToString() != "-1")
                        carrierID = Convert.ToInt32(cmboCarrier.SelectedValue.ToString());
                        msg += "You must select a carrier\r\n";
                    if (string.IsNullOrEmpty(trackingNumber))
                        msg += "You must enter a tracking number\r\n";
                    if (expecteddate == today)
                        msg += "Your Expected arrival date is too short\r\n";
                    if (msg != "")
Avatar of psdesignadmin
psdesignadminFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers