Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Color picker C#
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace WindowsFormsApplication1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void pictureBox1_DoubleClick(object sender, EventArgs e)
- {
- if (colorDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- pictureBox1.BackColor = colorDialog1.Color;
- string c;
- c = string.Format("0x{0:X8}", pictureBox1.BackColor.ToArgb());
- c = c.Remove(c.IndexOf("x") + 1, 2);
- textBox1.Text = c + "FF";
- }
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- MessageBox.Show("Você está usando um programa teste feito por Willian_Luigi, obrigado pela preferência.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment