목록c# (21)
분노의 챔질
Button b = new Button();b.Name = "btnTest";b.TextAlign = ContentAlignment.MiddleLeft;b.Font = new Font("맑은 고딕", 11, FontStyle.Bold);b.Text = "버튼";b.Size = new Size(250, 50);b.Location = new Point(10, 10);b.BringToFront();b.MouseClick += btn_MouseClick;panel3.Controls.Add(b); 버튼으로
private void button5_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Button bt = sender as Button; int x = 0, y = 0; if (bt.Location.X + e.X this.Width) x = this.Width - bt.Width; else x = bt.Location.X + e.X; if (bt.Loca..
RegistryKey reg; //HKEY_CURRENT_USER //쓰기 reg = Registry.CurrentUser.CreateSubKey("SOFTWARE").CreateSubKey("Test"); reg.SetValue("TestValue", "A", RegistryValueKind.String); //읽기 reg = Registry.CurrentUser.CreateSubKey("SOFTWARE").CreateSubKey("RTLS"); string val = reg.GetValue("TestValue", "NONE").ToString(..
private delegate void UpdateText(Control ctrl, string text);public void AsyncDisplayText(Control ctrl, string text){ if (ctrl.InvokeRequired) { ctrl.Invoke(new UpdateText(AsyncDisplayText), new object[] { ctrl, text }); } else { if (ctrl.AccessibilityObject.Role == AccessibleRole.List) { ListBox li = ctrl as ListBox; li.Items.Insert(0, Da..

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 WindowsFormsApplication3 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { axWindowsMediaPlayer1.Ctlcontrols.play(); ..
1. 10진수 → 16진수. int number = 19; string hex = Convert.ToString (number, 16); 2. 16진수 → 10진수. string hex = "19"; int number = Convert.ToInt32(hex, 16);
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; using System.Data.OracleClient; //참조추가 namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void ultraButton1_Click(object sender, EventArgs e) ..