There are two buttons (Button1、Button2) and one TextBox in the winform,I have two questions as below: 1、I want to the execute the button1_Click event when clicking the button2_Click? 2、when the text of textbox1 is changed, then call the button1_Click event, how to write in the textBox1_TextChanged? thanks in advance,pls give the codes in detail. (Don't use this method: place all the codes of button1_Click in one method then use this method in button2_Click)
mctramp168
Posts
-
How to execute the button1_Click event in the other button's Click event or textBox1_TextChanged? -
Want to make some friends hereI have lots of all kinds of cheap shoes, if you have some interest in trade, you can write to my email(tramp168.my265@yahoo.com.cn),maybe we can cooperate with it. thanks all!
-
How to place image in the merged cell centerHow to place an image in the range (cells[5,1],cell[10,5]) of excel? and how to make it in the center of the range? thanks!
-
How to set the image field data to some cell of Excel?who can help me on it ?many thanks!
-
How to set the image field data to some cell of Excel?There is a image field in the table, and I save the picture into this field, now I use below code, how to set the value of the Tables[0].Rows[0][0] to one cell of Excel sheet? string strCon = "Data Source=0;Initial Catalog=dbtest;Persist Security Info=True;User ID=sa;Password=ok"; SqlDataAdapter m_da = new SqlDataAdapter("select fa from G_Control", strCon); DataSet ds = new DataSet(); m_da.Fill(ds); Thanks in advance!
-
which answer is right?Thank you for your kindly help!
-
which answer is right?I have a table containing production information that your users query frequently, They specifically use this query most often (that is only use name to search in the where condition): SELECT Name,Description,Vendor,Instock,Price FROM Products where Name='name' Have a nonclustered index on this table on the Name column,but your users are complaining the query is still too slow,what can you do to speed it up? A、modify the index to include the Description,vendor,Instock, and price columns as nonkey columns. B、Create a new nonclustered index on the Description,vendor,Instock, and price as nonkey columns. C、Create a new clustered index on the Description,vendor,Instock, and price as nonkey columns. D、You can't do anything to speed up this query. Database is MS SQL SERVER. Above four choices, which answer is right?please tell the reason.Thanks
-
About the SQL Execution Plan1、How to know which SQL statement runs faster than the other SQL statement by contrasting the being displayed execution plan? 2、Could you please tell me the meaning of I/O Cost、CPU Cost、Subtree Cost and Cost? and what is the measuring unit of these costs? and if there is a mathematical expression among the cost,say Cost=I/O Cost+Cpu Cost+subtree cost? 3、Is it possible to compute the accurate time of one SQL statements execution costed by execution plan?
-
How to save the property of the user-defined column ?public class TXDataGridViewNumericColumn : DataGridViewColumn { public TXDataGridViewNumericColumn() : base(new TXNumericCell()) { this.InputType = NumericType.Integer; } public override DataGridViewCell CellTemplate { get { return base.CellTemplate; } set { if (value != null && !value.GetType().IsAssignableFrom(typeof(TXNumericCell))) { throw new InvalidCastException("Must be a CalendarCell"); } base.CellTemplate = value; } } private NumericType m_NumericType; public enum NumericType { Decimal, Integer, PositiveDecimal, NegativeDecimal, PositiveInteger, NegativeInteger } public NumericType InputType { get { return m_NumericType; } set { m_NumericType = value; } } public ICollection testCollection { get { return Icollection; } set { Icollection = value; } } private ICollection Icollection; public override object Clone() { DataGridViewColumn col = (DataGridViewColumn)base.Clone(); col.CellTemplate = new TXNumericCell(); return col; } } I define a column by inheritting the DataGridViewColumn, and add a property for this column, but in the design-mode when I change the value of this property , the value can not be saved, the codes as above. how to solve this issue? Thanks in advance!
-
How to save the property of the user-defined column ?public class TXDataGridViewNumericColumn : DataGridViewColumn { public TXDataGridViewNumericColumn() : base(new TXNumericCell()) { this.InputType = NumericType.Integer; } public override DataGridViewCell CellTemplate { get { return base.CellTemplate; } set { if (value != null && !value.GetType().IsAssignableFrom(typeof(TXNumericCell))) { throw new InvalidCastException("Must be a CalendarCell"); } base.CellTemplate = value; } } private NumericType m_NumericType; public enum NumericType { Decimal, Integer, PositiveDecimal, NegativeDecimal, PositiveInteger, NegativeInteger } public NumericType InputType { get { return m_NumericType; } set { m_NumericType = value; } } public ICollection testCollection { get { return Icollection; } set { Icollection = value; } } private ICollection Icollection; public override object Clone() { DataGridViewColumn col = (DataGridViewColumn)base.Clone(); col.CellTemplate = new TXNumericCell(); return col; } } public class TXNumericCell : DataGridViewTextBoxCell { public TXNumericCell() : base() { } public override void InitializeEditingControl(int rowIndex, object initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle) { base.InitializeEditingControl(rowIndex, initialFormattedValue, dataGridViewCellStyle); TXNumericEditControl ctl = DataGridView.EditingControl as TXNumericEditControl ; ctl.Text = (string )this.Value; } public override Type EditType { get { return typeof(TXNumericEditControl); } } public override Type ValueType { get { return typeof(string); } } public override object DefaultNewRowValu
-
How to create new winform with code(without template winform existed)?we often create a winform manually(project-->add-->winform),the created winform is template, then we create an instance of this winform with "new" word. Now I want to know how to create a new winform with code and have not template winform of this new winform(that is no need create a template winform by manually first).
-
How to create the winform with code not by the guide (project-->add-->windows Form) at desgin-time in c#?Thank Christian Graus, Could you please tell me the full name of the book ? and in which place I can order it.
-
How to create the winform with code not by the guide (project-->add-->windows Form) at desgin-time in c#?How to create the winform with code not by the guide (project-->add-->windows Form) at desgin-time in c#? and how to add some button in the dynamic created winform? Many thanks
-
about the interface of C#thanks all for your help!
-
about the interface of C#I am a novice of C#,Could you please tell me the advantage and disadvantage of using interface and not using interface in the proggram? I'm gragteful if you give a litte code for contrast. Thanks!
-
How to change the dragging bar's background of splitcontainer in C#?who can help me on it? thanks!
-
How to change the dragging bar's background of splitcontainer in C#?How to change the dragging bar's background of splitcontainer in C#? Many thanks!
-
Below idea how to be realized in C#?oh,thanks
-
Below idea how to be realized in C#?Christian Graus,Thanks for your kind help,If you know some simple examples for reference,I am very grateful!
-
Below idea how to be realized in C#?yes, I want to it can be redesigned the UI without the VS.net envirnment. Do you have any idea about it ?thanks!