To keep the color of the text red while a textbox is in focus, otherwise the color of the text should be in black. Button should align the text according to the instruction written on them.
Program Plan:
Write a program to add three text boxes and two buttons. The purpose of the buttons named Right and Left is to set the alignment of the text present in the text boxes. When the focus is set on any of the text box, then the color of the text will be red and when the focus is lost, the color of the text changes to black. The name of the form window is set to “1, 2, 3�. The if block is used to set the color property of text in textboxes that is conditionally dependent on the focus property.
Trending nowThis is a popular solution!
Chapter 2 Solutions
Pearson eText for Introduction to Programming Using Visual Basic -- Instant Access (Pearson+)
- please use c# i will include both figures Be sure to thoroughly document your coding, explaining what you did and why you did it. Comments should explain what your code does (each line or each block of lines...etc.). Enhanced Painter) Extend the program of Fig. 14.38 to include options for changing the size and color of the lines drawn. Create a GUI similar to Fig. 14.43. The user should be able to draw on the app’s Panel. To retrieve a Graphics object for drawing, call method panelName.CreateGraphics(), substituting in the name of yourarrow_forwardUsing any languageWrite a Visual Basic project that displays a country’s flag and its capital in an output label when a button with the country’s name is clicked. After the country’s button is clicked, only that country button should still be visible (the one for the country that was chosen). When the program is first run, it should like the form on the left below, but with your name in the appropriate spot. The form on the right shows what it would look like after a user clicked on “Canada”. When the Restore button is chosen, the form should again look like the picture on the left. The Exit button works as you would expect. The form should contain five command buttons, two labels only, and three picture boxes. The three picture boxes, each containing a flag, are on top of one another, but only one should be visible at a time. For each picture box: Be sure to add the image as a local resource. Set the Size property to 100, 50 Click the Size Mode list arrow, then click StretchImage…arrow_forwardCreate the design for determining if a point is inside, on, or outside of the rectangle. Drawing out the rectangle and labeling the coordinates of all points will help you to visualize the problem. Once the design has been completed, write a program that prompts the user for the x and y coordinates for the lower left hand corner of a rectangle as well as the height and the width of the rectangle. After that, you will need to get the coordinates for the point from the user as well. Once all inputs have been entered by the user, determine if the point is inside the rectangle, on the rectangle, or outside the rectangle. If the point is inside the rectangle, print "inside the rectangle". If the point is on the rectangle, print "on the rectangle". If the point is outside of the rectangle, print "outside the rectangle". Example output: Enter the x coordinate of the lower left hand corner of the rectangle: 1 Enter the y coordinate of the lower left hand corner of the rectangle: 1 Enter the…arrow_forward
- Instructions • Develop a 9-puzzie (3 by 3) as shown in Fig.1 below, with the following features: 1. A graphical user interface (GUI) II. Button for reset II. Show time taken to solve the puzzle IV. Number of moves taken to solve the puzzle v. Display win if the puzzle is solved |2 || 8 || 3 1 6 4 7 Fig 1:9-puzzlearrow_forwardStudent Name Student Id 1. Write a program to rotate frame wire teapot and decrease the rotation speed by coding the right button of the mouse and display menu on middle button object.arrow_forwardAll programs must include introductory comments as well as comments all throughout the program. The introductory comment should include your name, the class name with section (e.g. CS 101 -24900), the program name, and a brief description of the program. For visual studio users; Don't forget to use the system ("pause") before the "return" statement at the end of your program. Suppose you want to deposit a certain amount of money into a savings account and then leave it alone to draw interest for the next 10 years. At the end of 10 years, you would like to have $10,000 in the account. How much do you need to deposit today to make that happen? You can use the following formula, which is known as the present value formula, to find out: P=F(1+r)n or p = f / pow(1 + r, n) The terms in the formula are as follows: P is the present value, or the amount that you need to deposit today. F is the future value that you want in the account. (In this case, F is $10,000.) r is the annual…arrow_forward
- Assignment Instructions Below, create a table and graph like the ones in the 'Example | Part 1' tab. Follow the steps below to do this. 2.In the 'Table Area' below, create a table with three headings with the following order: Year, Total Money Earned at Current Job, Total Money Earned at Future Job. (See 'Example | Part 1' tab) 3.In the column under year, start with the number 1 and fill the cells down to 20 years. 4.In the column under "Total Money Earned at Current Job" calculate the total amount of money Cindy will have earned by the end of each of the corresponding years. Do this by writing an equation that multiplies the year by 12 and then by the monthly earnings for that job. (See 'Multiplication' on 'Grading Sheet | Help' tab) Be sure to use a relative reference for the year and an absolute reference for the earnings number. (See 'Cell References' on 'Grading Sheet | Help' tab) Copy the equation down the column for all 20 years. 5.Do the same type of equation for the column…arrow_forwardThe code subplot (3,2,5) divides the window into two rows and three columns, and the plot is .drawn in the bottom left corner True Matlab False The code plot(x, y1, '-', x, y2, '+'), will show y1 solid and y2 plus .sign True False The code A(:,2) = [] delete the .second row True Falsearrow_forwardadd a code at the "Search a book" where i can search for a book and if the word matches the book it will display "(Title of the book) - Book Available"and if the word doesnt match it will display "Book unavailable"codes should be displayed at line 93arrow_forward
- Q1) Design project and write a code to show picture and un-active the show command button. Q2) Design project and write a code to solve the following equationarrow_forwardWhite an presentation using the speech you composed.arrow_forwardDesign the wireframes and storyboard, interactivity diagram, object dictionary, and necessary scripts for an interactive program for customers of Friar Farm Market. Allow customer the option of choosing tomatoes ($3.00 per pound), peppers ($2.50 per pound), or onions ($2.25 per pound). The customer enters the weight in pounds in a text box. After the customer clicks Select Button, display the price of the order.arrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,