Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. why image is not update in other form , on 2nd form closed event ?

why image is not update in other form , on 2nd form closed event ?

Scheduled Pinned Locked Moved C#
questionhelpannouncement
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nomi
    wrote on last edited by
    #1

    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"); }

    J L W G 4 Replies Last reply
    0
    • N nomi

      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"); }

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      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)

      1 Reply Last reply
      0
      • N nomi

        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"); }

        J Offline
        J Offline
        J a a n s
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • N nomi

          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"); }

          W Offline
          W Offline
          wasimsharp
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • N nomi

            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"); }

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups