Now I use a C++ code where I save a color like this:

public: System::Drawing::Color ColorSaved1;

ColorSaved1 = textBox1->BackColor;

I wonder how I can convert this to C# ?

Recommended Answers

All 2 Replies

Try this:

Color savedColor = textEdit1.BackColor;

Like this:

public System.Drawing.Color ColorSaved1;
        ColorSaved1 = TextBox1.BackColor;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.