can you give me example on how to use tags for each mdi child?
Mr Kode
Posts
-
Get Active mdichild form -
Get Active mdichild formhow to loop through Application openforms and get specified form which is active with note that may be more than one form with the same name is running Form ActvFrm = this.ActiveMdiChild; string cptn = ActvFrm.Name; FrmNewPatiant FNew = (FrmNewPatiant)Application.OpenForms["FrmNewPatiant"]; foreach (Form FrmNew in Application.OpenForms) { if (FrmNew.Text == cptn) { FrmNewPatiant actvNewPat = (FrmNewPatiant)Application.OpenForms[cptn]; actvNewPat.tabNewFile.TabPages[2].Enabled = true; actvNewPat.tabNewFile.SelectedTab = FNew.tabNewFile.TabPages[2]; } }
-
programmatically change datagridviewbutton text propertyi get an issue with changing datagridviewbutton text per row read alot but no suffient answer can anybody help me ? thanks
-
bind multiple procedures to one reporthello all my question is how to bind multiple isolated stored procedures to one crystal report? regards in adavnce
-
Get monthCanlender Selected date is boldhello all i want to check if the MonthCalender selected date is Bolded or not? how to do that? thanks in advance
-
split event handler or fire event as two eventshello all... i have logical trouble in my windows application there is one eventHandler (Button1_click) contains two sqlcommands the first sqlcommand insert into parent table (primary key table) the second sqlcommand insert into references table as expected the code generate sql exception because the referial constraint the question is : how to solve this problem without adding new eventHandler and without modifying the tables relation? best regards
-
determine if monthCalender selected date is bolded datehello all my question is there any method to determine if MonthCalender selected date is bolded or not?
-
get Datetime array through DataReaderthanks Navaneeth this really helps but how Dispose method improve performance?
-
get Datetime array through DataReaderhello all i want to know how to get DateTime array through DataReader and set it as bolded Dates on MonthCalender i have the following code .. SqlCommand GetDates = new SqlCommand(); GetDates.Connection = new SqlConnection(ConS); GetDates.CommandType = CommandType.Text; GetDates.CommandText = "select Reserve_Date from reservations where Done = 0"; GetDates.Connection.Open(); SqlDataReader rd = GetDates.ExecuteReader(); while (rd.Read()) { DateTime ReservDays = (DateTime)rd["Reserve_Date"]; monthCalendar1.AnnuallyBoldedDates = new DateTime[] { ReservDays }; } rd.Close(); GetDates.Connection.Close(); the reader works fine but the result is the last row only i want to get all rows and set it as AnnuallyBoldedDates on monthCalender thanks in Advance
-
problem with move values between two running formsthanks Christian i found where the error is i forget that f1 have mdiparent to another form but i want to know why i can`t set mdiparent and owner at the same time?
-
problem with move values between two running formsF1.textbox1.text = label1.Text; the exception fires on that line i`ll try to delegate that ,but for now i need to solve the problem
-
problem with move values between two running formsthanks Christian .. but i am still suffering error null reference exception was unhandled
-
problem with move values between two running formshello all i have troubles with the following code there are two forms Form1 and Form2 Form1 is the owner of Form2 i need to move label1.text from Form2 to Form1 (note: both forms are running and visible) here is my code Form1 F1 = (Form1 )this.Owner; F1.textbox1.text = label1.Text; // i had set textbox1 modifier property to public thanks in advance
-
how to cancel eventArgsi have the following code this code runs on LogIn form Acts as standby while other forms still opened if(Application.OpenForms["MainForm"].MdiChildren.Length>0) { MessageBox.Show("!..you should close all opened windows before continue", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { Application.Exit(); } when code running LogIn form disappeared and user can access any opened form i want to only keep LogIn form running untill entering valid password
-
trigger instead of identityi have a column its values must started with 1 and incrementing by 1 this column repeatly looses his rows so i can not use identity here so i tried to raise a trigger to do the job but i have some probelems with the following statments create trigger dbo.insertNum on testIcreTrigger --table name for insert AS begin declare @insVal int --value to insert declare @MaxVal int select @MaxVal= Max(Num) from hitTheatre select @insVal=@MaxVal+1 insert into testIcreTrigger (Num) values (@insVal) End Go
-
convert from Timespan to int ??can i convert Timespan datatype to int. if yes please show me example regards
-
problem with increment decimal valuei have datagrid contains 4 columns , one of them takes decimal datatype i want to increment this value each time to get the sum string name; decimal price, due; int count; name = txtSelectedItem.Text; price =decimal.Parse( lblPrice.Text); count =int.Parse( txtUnitOrder.Text); due = decimal.Parse(lblDue.Text); DGSelectedItems.Rows.Add( name,price,count,due); decimal sum = due++; txtSum.Text = sum.ToString(); the value didn`t incremented but replaced regards in advance
-
how to deal with numerous fieldsi have data table contains more than 90 column and i want easy and effective way to make the user easly handle it (read & write) welcome for any suggestions regards
-
problem with output parameterdo you mean that i should execute the command before initailize the parameters?
-
problem with output parameteri have stored procedure with two parameters as follows: create procedure checkCompatability ( @compatility varchar output, @award_num int ) AS SET NOCOUNT OFF; IF EXISTS (SELECT Award_num from table1 where award_num=@award_num) begin set @compatability='Y' print @compatability end else set @compatability='N' print @compatability GO in C# parameters: SqlCommand checkDone = new SqlCommand(); checkDone.Connection = con1; checkDone.Connection.Open(); checkDone.CommandType = CommandType.StoredProcedure; checkDone.CommandText = "checkCompatability"; SqlParameter comp = new SqlParameter("@compatability", SqlDbType.VarChar); string S = comp.Value.ToString();\\null reference exception occours here lblresult.Text = S.ToString(); comp.Direction = ParameterDirection.Output; SqlParameter complete = new SqlParameter("@award_num", SqlDbType.Int); complete.Direction = ParameterDirection.Input; int awN = int.Parse(comboAwardNum.Text); complete.Value =(int) awN; lblresult.Text = comp.Value.ToString(); checkDone.Parameters.Add(comp); checkDone.Parameters.Add(complete); checkDone.ExecuteNonQuery(); checkDone.Connection.Close(); what is the problem with that code?