1 / 19

Word Processor Version .01

Word Processor Version .01. EME 4411 Week 5. The Scroll Bars. Important Properties. max and min - range of integers the horizontal scroll bar can represent No caption property - use a label value property specifies the current value of the scroll bar.

judith-lynn
Download Presentation

Word Processor Version .01

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Word Processor Version .01 EME 4411Week 5

  2. The Scroll Bars

  3. Important Properties • max and min - range of integers the horizontal scroll bar can represent • No caption property - use a label • value property specifies the current value of the scroll bar. • smallchange - click on an arrow • Largechange - click a open area between the handle and the arrow

  4. Example Write a program that allows the user to input a number between 1 and 100 We will use a horizontal scroll bar to ensure that the user ONLY adds a legal integer

  5. Design the Interface

  6. Set the Properties

  7. Write the Code Private Sub hsbScrollBar1_Change() lblValue.Caption = hsbScrollBar1.Value End Sub

  8. Word Processor .1 Write a simple word processor that allows the user to set the font name with radio buttons, font style with check boxes, and font size with a horizontal scroll bar.

  9. Design the Form

  10. Form frmWord BackColor = Make it blue Caption = "Word Processor .01" Command Button cmdClear Caption = "&Clear" Command Button cmdExit Caption = "E&xit" Text Box txtFontSize Alignment = Center Properties

  11. Scroll Bar HSBFontSize LargeChange = 4Max = 22Min = 6SmallChange = 4Value = 14 Check Box chkItalics BackColor = Make it blueCaption= “&Italics” Check Box chkUnderline BackColor = Make it blueCaption = “&Underline” Check Box chkBold BackColor = Make it blueCaption = "&Bold" Properties (continued)

  12. Option Button optSchoolbook BackColor = Make it blueCaption = "Schoolbook"FontName = "Century Schoolbook"FontSize = 8.25 Option Button optArial BackColor = Make it blueCaption = "Arial"FontName = "Arial"FontSize = 8.25 Option Button optSansSerif BackColor = Make it blueCaption = "Sans Serif" Properties (Continued)

  13. Text Box txtText FontBold = False MultiLine = TrueScrollBars = Vertical Label Label3 Alignment = CenterBackColor= Make it blueCaption = "Font Size:" Label lblFontType BackColor = Make it blueCaption = "Font Type:" Label lblFont BackColor = Make it blueCaption = "Select Font:" Properties (Continued)

  14. Write the CodechkBold If chkBold is false Then set Font bold in text widow to False Else set Font bold in text widow to True

  15. Write the CodechkUnderline If underline value is False Then set Font underline toFalse Else set Font underline to False

  16. Write the CodeoptArial If its value is True Then txtText.FontName = "Arial"

  17. Write the CodehsbFontSize set text size caption to HSB’s Font size set text.window font size to HSB Font size

  18. Homework Write Word Processor .1 Have a great week!

  19. Write the CodechkItalics If chkItalics is false set Font Italic in text window to False Else set Font Italic in text window to True

More Related