본문 바로가기

Code

(117)
[C#] MDI Sample using System; using System.Windows.Forms; namespace MdiSample { public partial class FormMain : Form { public FormMain() { InitializeComponent(); } private void menuItemNew_Click(object sender, EventArgs e) { FormChild newMDIChild = new FormChild(); newMDIChild.MdiParent = this; // Set the Parent Form newMDIChild.Show(); // Display the new form } private void menuItemCascade_Click(object sender,..
[C#] SqlCeDataAdapter, SqlCeCommandBuilder using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlServerCe; namespace DataSample { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void toolStripButtonReadXml_Click(object sender, EventArgs e) { this.dataSet1.Clear(); this.d..
[C#] DataSet, Primary Key, Foreign Key Constraint using System; using System.Data; using System.Windows.Forms; namespace ConstraintSample { public partial class Form1 : Form { public Form1() { InitializeComponent(); InitializeMyComponent(); } private void InitializeMyComponent() { // Shop DataSet DataSet shopDataSet = new DataSet("Shop"); // Person DataTable DataTable personDataTable = new DataTable("Person"); shopDataSet.Tables.Add(personDataT..
[C#] DataSet, BindingSource, BindingNavigator, DataGridView.DataError, BindingSource.AddNew using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace DataSetSample { public partial class Form1 : Form { private DataSet ourDataSet; private DataTable ourDataTable; private BindingSource ourBindingSource; public Form1() { InitializeComponent(); InitializeMyComponent(); } priv..
[C#] SQL Compact & DataGridView Binding Sample using System; using System.Data; using System.Windows.Forms; namespace NaverSample { public partial class Form1 : Form { private NaverDataSet ourNaverDataSet; private NaverDataSetTableAdapters.AccountTableAdapter ourAccountTableAdapter; private NaverDataSetTableAdapters.TableAdapterManager ourTableAdapterManager; private BindingSource ourBindingSource; public Form1() { InitializeComponent(); Ini..
[C#] Object Binding Sample Project using System.Windows.Forms; namespace BindingSample { public partial class Form1 : Form { public Form1() { InitializeComponent(); InitializeMyComponent(); } private void InitializeMyComponent() { this.label1.DataBindings.Add("Text", this.textBox1, "Text"); this.textBoxLeft.DataBindings.Add("Text", this.textBoxRight, "Text"); } } }
[C#] ADO.NET XML and DataGridView Binding Sample Project using System; using System.Data; using System.Windows.Forms; namespace GridSample { public partial class Form1 : Form { private DataSet ourDataSet; private DataTable myDataTable; private BindingSource ourBindingSource; public Form1() { InitializeComponent(); InitializeMyComponent(); } private void InitializeMyComponent() { ourDataSet = new DataSet(); myDataTable = new DataTable("Person"); ourBin..
[C/C++] Dialog Test Sample Project VC++ 6.0 Project #include #include "resource.h" BOOL CALLBACK MainDlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam); HWND hDlgMain; int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow) { DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), HWND_DESKTOP, MainDlgProc); return 0; } BOOL CALLBACK MainDlgProc(HWND hDlg, UINT iMessage, WPARAM..