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
Introduction to Programming Using Visual Basic (10th Edition)
- Exercise 4 E Design Preview [SimpleFrame2] Number 1 Increment Decrement 1. Design the above frame 2. The number is initialized with the constructor of the frame to the first number in the combo box. 3. Each time the combo box changes selection, the number changes to its current selection, and the text area is cleared. 4. The text area is updated each time one of the two buttons is pressed. If the button "Increment" is pressed, the number is incremented and appended to the text area. If the button "Decrement" is pressed, the number is decremented and appended to the text area. CS Scanned with CamScanner ロarrow_forwardplease 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_forward
- Create 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_forwardInstructions • 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_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
- The 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_forwardQ1) 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_forward
- VB Small Project 16 – Function Pattern this Visual Basic program after Small Project 15: Main() Create the random number in the same way. EvenOrOdd Function() Pass that number into this function, where it will be found to be either Even or Odd. Return a value indicating which one that will be used back in Main. DisplayResults Sub The result from the EvenOrOdd Function is passed into this Sub and the same results as from SP 15 will be printed.arrow_forwardComputer Science create a jumping rectangle, create a second rectangle that move back and forth across the bottom (yLimit) and allow the jumping rectangle to move left and right too. The jumping box must avoid a collision with the second rectangle, if they hit a message should be shown that you died and end the program. in C#arrow_forwardDesign form in vb contains three command buttons, the first title buttons (Start) and show an input box contain blank phrase student's name with the title "name" and then display it on a text box. The second title button (Clear) by using msgbox contains blank phrase (are you sure to clear? , yes & No button and title "clear" , The third title button (Exit) and show an input box contain blank phrase "exit" with title close and display it on label * 2 11. 4 AMarrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,