Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm having a hard time getting my C# program to work in visual basic, the program should be able to have the user input a

I'm having a hard time getting my C# program to work in visual basic, the program should be able to have the user input a line of text, have a selection of buttons to choose from, and display said text on a read only text box after pressing the Ok button. Once done, the user should click only any choice of buttons to alter the read only text box. The choices of buttons are colors red, blue, green, and black, along with aligning the text center or right, and a button that will clear the text box (as well as the exit button).

My code so far:

for the colors private void btnRed_Click(object sender, EventArgs e) { lblMessageDisplay.ForeColor = Color.Red; } the ok button private void btnOk_Click(object sender, EventArgs e) { btnOk.Text = "&Ok"; lblMessageDisplay.Text = txtUserMessage.Text; txtUserMessage.Focus(); txtUserMessage.SelectAll(); } text alignment private void btnRight_Click(object sender, EventArgs e) { lblMessageDisplay.TextAlign = ContentAlignment.MiddleCenter; }

clear button private void btnClear_Click(object sender, EventArgs e) { btnClear.Text = "&Clear"; txtUserMessage.Text = String.Empty; txtUserMessage.Focus();

}

Would I have to do something similar with the Ok button for the colors and other buttons in order for this to work?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

8. Provide recommendations for how to manage knowledge.

Answered: 1 week ago