why image is not update in other form , on 2nd form closed event ?
-
Here is the code what is the probelm any one can help me plzzzzz protected override void OnClosed(EventArgs e) { if (this.appWorkspace.ActiveDocumentWorkspace != null) { appWorkspace.ActiveDocumentWorkspace.SetTool(null); } base.OnClosed(e); //n send image to frmedit in cc13 CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit(); // s.mSetPicture(PictureBox, "true"); //s.VarEditImg //s.VarEditSig s.PicImage.Image = null; s.PicImage.Image = Image.FromFile(@"C:\Temp\Temp1.jpg"); s.PicImage.Refresh(); s.picSig.Image = null; s.picSig.Image = Image.FromFile(@"C:\Temp\Temp2.jpg"); s.picSig.Refresh(); //s.Con s.Showimg(); CCI3.Myimg g = new CCI3.Myimg(); g.Showimg2(); //CCI3.Forms.frmEdit ss = new CCI3.Forms.frmEdit(); //ss.setEditPictures(@"C:\Temp\Temp1.jpg", @"C:\Temp\Temp2.jpg"); }
-
Here is the code what is the probelm any one can help me plzzzzz protected override void OnClosed(EventArgs e) { if (this.appWorkspace.ActiveDocumentWorkspace != null) { appWorkspace.ActiveDocumentWorkspace.SetTool(null); } base.OnClosed(e); //n send image to frmedit in cc13 CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit(); // s.mSetPicture(PictureBox, "true"); //s.VarEditImg //s.VarEditSig s.PicImage.Image = null; s.PicImage.Image = Image.FromFile(@"C:\Temp\Temp1.jpg"); s.PicImage.Refresh(); s.picSig.Image = null; s.picSig.Image = Image.FromFile(@"C:\Temp\Temp2.jpg"); s.picSig.Refresh(); //s.Con s.Showimg(); CCI3.Myimg g = new CCI3.Myimg(); g.Showimg2(); //CCI3.Forms.frmEdit ss = new CCI3.Forms.frmEdit(); //ss.setEditPictures(@"C:\Temp\Temp1.jpg", @"C:\Temp\Temp2.jpg"); }
nomi wrote:
Here is the code what is the probelm any one can help me plzzzzz
nomi wrote:
CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit();
You are creating form and not adding it anywhere to you application, so it will fail.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4a out now (29 May 2008) -
Here is the code what is the probelm any one can help me plzzzzz protected override void OnClosed(EventArgs e) { if (this.appWorkspace.ActiveDocumentWorkspace != null) { appWorkspace.ActiveDocumentWorkspace.SetTool(null); } base.OnClosed(e); //n send image to frmedit in cc13 CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit(); // s.mSetPicture(PictureBox, "true"); //s.VarEditImg //s.VarEditSig s.PicImage.Image = null; s.PicImage.Image = Image.FromFile(@"C:\Temp\Temp1.jpg"); s.PicImage.Refresh(); s.picSig.Image = null; s.picSig.Image = Image.FromFile(@"C:\Temp\Temp2.jpg"); s.picSig.Refresh(); //s.Con s.Showimg(); CCI3.Myimg g = new CCI3.Myimg(); g.Showimg2(); //CCI3.Forms.frmEdit ss = new CCI3.Forms.frmEdit(); //ss.setEditPictures(@"C:\Temp\Temp1.jpg", @"C:\Temp\Temp2.jpg"); }
You have just given a bunch of code which one else is aware of. If you need a proper solution you have to explain your problem correctly. Ok, Here is the clue. In the following line of code you are creating a new object which will be disposed once the scope is over.
CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit();
Instead refer to the existing instance of your form. Note: If you are using CAB, you can take the help of event broker.
-
Here is the code what is the probelm any one can help me plzzzzz protected override void OnClosed(EventArgs e) { if (this.appWorkspace.ActiveDocumentWorkspace != null) { appWorkspace.ActiveDocumentWorkspace.SetTool(null); } base.OnClosed(e); //n send image to frmedit in cc13 CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit(); // s.mSetPicture(PictureBox, "true"); //s.VarEditImg //s.VarEditSig s.PicImage.Image = null; s.PicImage.Image = Image.FromFile(@"C:\Temp\Temp1.jpg"); s.PicImage.Refresh(); s.picSig.Image = null; s.picSig.Image = Image.FromFile(@"C:\Temp\Temp2.jpg"); s.picSig.Refresh(); //s.Con s.Showimg(); CCI3.Myimg g = new CCI3.Myimg(); g.Showimg2(); //CCI3.Forms.frmEdit ss = new CCI3.Forms.frmEdit(); //ss.setEditPictures(@"C:\Temp\Temp1.jpg", @"C:\Temp\Temp2.jpg"); }
hello nomi mujay apkay maslay ka pata chel gya hay f.show(); ki jaga f.showDialog(); use kero subkhuch tik ho ji ga. Begham ho jao Nomi if this answere is helpfull then donot forget to mark [Smile]
wasim khan
-
Here is the code what is the probelm any one can help me plzzzzz protected override void OnClosed(EventArgs e) { if (this.appWorkspace.ActiveDocumentWorkspace != null) { appWorkspace.ActiveDocumentWorkspace.SetTool(null); } base.OnClosed(e); //n send image to frmedit in cc13 CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit(); // s.mSetPicture(PictureBox, "true"); //s.VarEditImg //s.VarEditSig s.PicImage.Image = null; s.PicImage.Image = Image.FromFile(@"C:\Temp\Temp1.jpg"); s.PicImage.Refresh(); s.picSig.Image = null; s.picSig.Image = Image.FromFile(@"C:\Temp\Temp2.jpg"); s.picSig.Refresh(); //s.Con s.Showimg(); CCI3.Myimg g = new CCI3.Myimg(); g.Showimg2(); //CCI3.Forms.frmEdit ss = new CCI3.Forms.frmEdit(); //ss.setEditPictures(@"C:\Temp\Temp1.jpg", @"C:\Temp\Temp2.jpg"); }
I have already explained why it doesn't work, and I am not the only one who has done that. Don't repost the same question. That way it seem like you are simply ignoring the people who tries to help you. In the long run you will just end up being ignored by everyone.
Despite everything, the person most likely to be fooling you next is yourself.