Question

VISUAL BASIC| URGENT!| For this situation I need an app that provides a TextBox in which...

VISUAL BASIC| URGENT!| For this situation I need an app that provides a TextBox in which the user can type text. Allow the user to select TimesNewRoman, Arial or Courier New from a ComboBox. Provide a Bold CheckBox, which, if checked, makes the text bold. Include Increase Font Size and Decrease Font Size Buttons that allow the user to scale the size of the font up or down, respectively, by one point at a time. Start with a font size of 18 points. For the purposes of this exercise, set the font size on the ComboBox, Buttons and CheckBox to 20 points so that a person with low vision will be able to read the text on them. I need this by today 3/8/2020 by 8pm, PLEASE HELP!!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

I have wrote the following snippet and tested it myself. I hope it helps:-

Form1.vb

Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

Me.CenterToScreen()
ComboBox2.Items.Add("8")
ComboBox2.Items.Add("9")
ComboBox2.Items.Add("10")
ComboBox2.Items.Add("11")
ComboBox2.Items.Add("12")
ComboBox2.Items.Add("14")
ComboBox2.Items.Add("16")
ComboBox2.Items.Add("18")
ComboBox2.Items.Add("20")
ComboBox2.Items.Add("22")
ComboBox2.Items.Add("24")
ComboBox2.Items.Add("26")
ComboBox2.Items.Add("28")
ComboBox2.Items.Add("36")
ComboBox2.Items.Add("48")
ComboBox2.Items.Add("72")
ComboBox2.SelectedItem = "18"
RichTextBox1.Font = New Font(RichTextBox1.Font.FontFamily, 18, FontStyle.Regular)
ComboBox1.Items.Add("Times New Roman")
ComboBox1.Items.Add("Arial")
ComboBox1.Items.Add("Courier New")
ComboBox1.SelectedItem = "Times New Roman"
RichTextBox1.Font = New Font("Times New Roman", 18, FontStyle.Regular)


End Sub

Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged

If CheckBox1.Checked = True Then

RichTextBox1.Font = New Font(RichTextBox1.Font.FontFamily, Integer.Parse(ComboBox2.Text), FontStyle.Bold)


End If

If CheckBox1.Checked = False Then


RichTextBox1.Font = New Font(RichTextBox1.Font.FontFamily, Integer.Parse(ComboBox2.Text), FontStyle.Regular)


End If

End Sub

Private Sub RichTextBox1_TextChanged(sender As Object, e As EventArgs) Handles RichTextBox1.TextChanged

End Sub

Private Sub ComboBox1_SelectedIndexChanged_1(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged

Dim varFontLang As String

varFontLang = ComboBox1.Text
If varFontLang = "Times New Roman" Then
If CheckBox1.Checked = True Then

RichTextBox1.Font = New Font("Times New Roman", Integer.Parse(ComboBox2.Text), FontStyle.Bold)


End If

If CheckBox1.Checked = False Then


RichTextBox1.Font = New Font("Times New Roman", Integer.Parse(ComboBox2.Text), FontStyle.Regular)


End If

End If

If varFontLang = "Courier New" Then

If CheckBox1.Checked = True Then

RichTextBox1.Font = New Font("Courier New", Integer.Parse(ComboBox2.Text), FontStyle.Bold)


End If

If CheckBox1.Checked = False Then


RichTextBox1.Font = New Font("Courier New", Integer.Parse(ComboBox2.Text), FontStyle.Regular)


End If

End If

If varFontLang = "Arial" Then

If CheckBox1.Checked = True Then

RichTextBox1.Font = New Font("Arial", Integer.Parse(ComboBox2.Text), FontStyle.Bold)


End If

If CheckBox1.Checked = False Then


RichTextBox1.Font = New Font("Arial", Integer.Parse(ComboBox2.Text), FontStyle.Regular)


End If

End If


End Sub

Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged

If CheckBox1.Checked = True Then

RichTextBox1.Font = New Font(RichTextBox1.Font.FontFamily, Integer.Parse(ComboBox2.Text), FontStyle.Bold)


End If

If CheckBox1.Checked = False Then


RichTextBox1.Font = New Font(RichTextBox1.Font.FontFamily, Integer.Parse(ComboBox2.Text), FontStyle.Regular)


End If


End Sub
End Class

Place the material at design time inside Form1 with name as :-

RichTextBox1

CheckBox1

ComboBox1

ComboBox2

Don' forget to set the font size to 20points while design time. You can set that under design properties->Appearance of combo box and checkbox.

Add a comment
Know the answer?
Add Answer to:
VISUAL BASIC| URGENT!| For this situation I need an app that provides a TextBox in which...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need the whole and correct code Form1.cs Form1.Designer.cs Form2.cs Form2.Designer.cs program.cs everything in details Create...

    I need the whole and correct code Form1.cs Form1.Designer.cs Form2.cs Form2.Designer.cs program.cs everything in details Create C# project of type "Windows Forms Application titled your name: 1. Change the form title to "YourName_Smart Convertor". (2 points) 2. Change the background color of the form to Cornsilk.(2 points) 3. Change the form size to 470 X350 (2 points) 4. Add a picture to the form as shown in the figure below. (2 points) 5. Adjust the picture size to be as...

  • Which of the following are Control classes that can be placed on a screen being designed...

    Which of the following are Control classes that can be placed on a screen being designed as a Windows application? [Select all that apply - HINT: There are 4 correct options] View Form TextBox Button Text Location Name Reference Label ToolBox CheckBox Which of the following design considerations leads to more user-friendly presentation layers for GUIs? [Select all that apply - HINT: There are 6 correct options] Avoid clutter. Always add label objects overtop of buttons Use no more than...

  • I need help regarding my Visual Basic code ISC/ITE 285 Homework Due: Monday, January 28 by...

    I need help regarding my Visual Basic code ISC/ITE 285 Homework Due: Monday, January 28 by 11:55 pm Create a text file named "Grades.txt" which will contain a list of numeric grades. Save the file in the projects Bin/Debug folder. A sample of the file contents is shown below: 80 96 95 86 54 97 Create a string array that will be populated from the file "Grades.txt" when the array is created (Class-level array). Also create a numeric array that...

  • I need help writting a Javascript function that does the following its for a HTML/CSS Shopping...

    I need help writting a Javascript function that does the following its for a HTML/CSS Shopping Cart Page CODE This page contains a list of the selected products that includes an image, name, price, quantity, and cost) Because the process is implemented not as real, three products along with its image and price are displayed on the page. The product ID of each product is stored in a hidden textbox. The default amount of each product is 1 and the...

  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

  • I NEED HELP with this. please create a UML diagram. I need a simple code to...

    I NEED HELP with this. please create a UML diagram. I need a simple code to solve the problem.   The ADT Bag is a group of items, much like what you might have with a bag of groceries. In a software development cycle, specification, design, implementation, test/debug, and documentation are typical activities. The details are provided in the rest of the document. ADT Bag Specification: (Note: You should not change the names of the operations in your program. This should...

  • Hello, i need help with this homework: Code provided: public class DirectedWeightedExampleSlide18 { public static void...

    Hello, i need help with this homework: Code provided: public class DirectedWeightedExampleSlide18 { public static void main(String[] args) { int currentVertex, userChoice; Scanner input = new Scanner(System.in); // create graph using your WeightedGraph based on author's Graph WeightedGraph myGraph = new WeightedGraph(4); // add labels myGraph.setLabel(0,"Spot zero"); myGraph.setLabel(1,"Spot one"); myGraph.setLabel(2,"Spot two"); myGraph.setLabel(3,"Spot three"); // Add each edge (this directed Graph has 5 edges, // so we add 5 edges) myGraph.addEdge(0,2,9); myGraph.addEdge(1,0,7); myGraph.addEdge(2,3,12); myGraph.addEdge(3,0,15); myGraph.addEdge(3,1,6); // let's pretend we are on...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT