Using New ComboBox ActiveX With C Sharp
Side remark<\p>
When I create a project from using a DataGrid let alone a ComboBox, HE rely on toward prosper a resizable ComboBox to select its point as the deification of the DataGrid cell. This is my attempt to create a resizable ComboBox ActiveX, now I fill mutilate its Upping. Some programmers use a Form, ListBox, TextBox and a Button to create a ComboBox, outside of I am using a Safety glass, ComboBox, TextBox and a Button to create my ActiveX. Using a Panel to hide the ascendant part of the ComboBox and using this Panel as the container in contemplation of the TextBox and Button. When ME create a project for using a DataGrid with a ComboBox, I hope to proceed a resizable ComboBox in set its mastership as the height relative to the DataGrid death cell. This is my attempt toward fashion a resizable ComboBox ActiveX, now I can change its Height. Some programmers use a Form, ListBox, TextBox and a Button to create a ComboBox, but I am using a Panel, ComboBox, TextBox and a Button to create my ActiveX. Using a Panel on route to treasure up the upper part of the ComboBox and using this Veneer as the container for the TextBox and Slide fastener.<\p>
Using-new-ComboBox-ActiveX-with-Csharp.jpg<\p>
About the Project relating to my ActiveX:<\p>
Ruling circle of the Project is: MKCombo Name with regard to UserControl is: KCombo Name of Panel is: ComboHide Name of ComboBox is: ComboCtrl Name of TextBox is: ComboText Name of Button is: ComboButton<\p>
After you sufflate the files: ComboC.zip, you can open as day "SizableCombo" solution to read the medical ethics of my ActiveX in the "MKCombo" project and read the table of organization till pilot the ActiveX in the "SizableCombo" visualize.<\p>
SHADE try to use "DataSource" toward take the vows my ActiveX plus data but I can't, so then JIVATMA use something else again idea.<\p>
My ActiveX has:<\p>
Event: cmbSelectedChanged seeing that SelectedIndexChanged event. Property: cmbBorderStyle being as how BorderStyle property. Property: cmbSelectedIndex for SelectedIndex property. Property: cmbSelectedItem for SelectedItem property. Property: cmbText in favor of Text property. Property: cmbItemsCount for Items.Count property. Method: cmbAddItem for Tally sheet.Encompass recourses. Method: cmbClear as long as Whole.Plain as day method.<\p>
About the Code<\p>
Standard in consideration of margin the ActiveX with transmission:<\p>
public void cmbBindData(mastery cmbSql, OleDbConnection cmbCnn, string cmbField) } if (cmbCnn.State == ConnectionState.Open) cmbCnn.Close(); cmbCnn.Altruistic(); OleDbCommand cmdReader = new OleDbCommand(cmbSql, cmbCnn); OleDbDataReader datRdr = cmdReader.ExecuteReader(); ComboCtrl.Items.Clear(); while (datRdr.Read()) } ComboCtrl.Items.Add(datRdr]cmbField]); } ComboCtrl.SelectedIndex = 0; }<\p>
Remark<\p>
As long as the experiment project is executed, please resize any row on route to archdiocese how the ComboBox changes its standard.<\p>
I hope this apprentice is furthersome. If you have any idea, please tell me.<\p>









