Guest User

Untitled

a guest
Jul 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. Public Class Form1
  2. Dim boobold As Boolean = False
  3. Dim booitalic As Boolean = False
  4. Dim boounderline As Boolean = False
  5. Private Sub chkBold_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkBold.CheckedChanged
  6. Dim boobold As Boolean = False
  7. If chkBold.CheckState = CheckState.Checked Then
  8. boobold = True
  9. Else
  10. boobold = False
  11. End If
  12. End Sub
  13.  
  14. Private Sub chkItalic_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkItalic.CheckedChanged
  15. Dim booitalic As Boolean = False
  16. If chkItalic.CheckState = CheckState.Checked Then
  17. booitalic = True
  18. Else
  19. booitalic = False
  20. End If
  21.  
  22. End Sub
  23.  
  24. Private Sub chkUnderline_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkUnderline.CheckedChanged
  25. Dim boounderline As Boolean = False
  26. If chkUnderline.CheckState = CheckState.Checked Then
  27. boounderline = True
  28. Else
  29. booitalic = False
  30. End If
  31. End Sub
  32.  
  33. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  34.  
  35. End Sub
  36.  
  37. Private Sub ruleall()
  38. If chkBold.CheckState = CheckState.Checked Then
  39. chkUnderline.CheckState = CheckState.Unchecked
  40. chkItalic.CheckState = CheckState.Unchecked
  41. txtdisplay.Font = New System.Drawing.Font(txtdisplay.Font, FontStyle.Bold)
  42.  
  43. ElseIf chkItalic.CheckState = CheckState.Checked Then
  44. chkBold.CheckState = CheckState.Unchecked
  45. chkUnderline.CheckState = CheckState.Unchecked
  46. txtdisplay.Font = New System.Drawing.Font(txtdisplay.Font, FontStyle.Italic)
  47.  
  48. ElseIf chkUnderline.CheckState = CheckState.Checked Then
  49. chkBold.CheckState = CheckState.Unchecked
  50. chkItalic.CheckState = CheckState.Unchecked
  51. txtdisplay.Font = New System.Drawing.Font(txtdisplay.Font, FontStyle.Underline)
  52. ' Else
  53. ' chkBold.CheckState = CheckState.Unchecked
  54. ' chkItalic.CheckState = CheckState.Unchecked
  55. ' txtdisplay.Font = New System.Drawing.Font(txtdisplay.Font, FontStyle.Regular)
  56. End If
  57. End Sub
  58. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
  59. 'Etc
  60. End Sub
Add Comment
Please, Sign In to add comment