Advertisement
Guest User

Untitled

a guest
Sep 27th, 2015
6,286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.66 KB | None | 0 0
  1. Public Class Form1
  2.     Private Sub ForeColorToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ForeColorToolStripMenuItem.Click
  3.         Dim dlg As ColorDialog = New ColorDialog
  4.         If dlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
  5.             Button1.ForeColor = dlg.Color
  6.         End If
  7.     End Sub
  8.  
  9.     Private Sub BackgrandToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BackgrandToolStripMenuItem.Click
  10.         Dim dlg As ColorDialog = New ColorDialog
  11.         If dlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
  12.             Button1.BackColor = dlg.Color
  13.         End If
  14.     End Sub
  15. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement