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. Sending image from one project to another ?

Sending image from one project to another ?

Scheduled Pinned Locked Moved C#
helpcsharptutorialquestionworkspace
4 Posts 2 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

    :( Hi ! i have two project in one solution i want to send image from one project to another , i attached my project in rar format please download it and run with the src folder . Detail: one project is mine its simple one only have one form withing it only one picturebox and one button , other peject is paint.net , free product of image editing ,now i want to send my image to paint.net editor its using workspace class etc, i m stuck how to send image in it for editing and then again send back to my project : //its a button that is place in form1 its in myproject , and i m calling paint.net in mysoftware thorugh this code i get success but wanna send image that is in picturebox to paint.net but not getting any thing plz help me . private void button2_Click(object sender, EventArgs e) { PaintDotNet.MainForm mF; mF = new PaintDotNet.MainForm(); //PaintDotNet.PdnResources.GetImageResource(@"C:\Sunset.jpg"); //PaintDotNet.PdnResources.LoadImage(@"C:\Sunset.jpg"); // string[] fileNames ; ////string startingDir = Path.GetDirectoryName(documentWorkspace.FilePath); // string startingDir = @"C:\Temp"; //public documentWorkspace; //DialogResult result =PaintDotNet.DocumentWorkspace.ChooseFiles( PaintDotNet.DocumentWorkspace. , out fileNames, true, startingDir); //PaintDotNet.DocumentWorkspace.ChooseFile( //PaintDotNet.Actions.ImportFromFileAction(@"C:\Sunset.jpg"); // ImportFromFileAction(@"c:\sunset.jpg"); //PaintDotNet.Actions.OpenFileAction(pictureBox1.Image); //PaintDotNet.Actions.NewImageAction(); // mF.AppWorkspace.PerformAction(new OpenFileAction()); // PaintDotNet.AppWorkspaceAction(new Image("C:\sunset.jpg")); //PaintDotNet.AppWorkspaceAction(new OpenFileDialog()); mF.Show(); } :(

    S 1 Reply Last reply
    0
    • N nomi

      :( Hi ! i have two project in one solution i want to send image from one project to another , i attached my project in rar format please download it and run with the src folder . Detail: one project is mine its simple one only have one form withing it only one picturebox and one button , other peject is paint.net , free product of image editing ,now i want to send my image to paint.net editor its using workspace class etc, i m stuck how to send image in it for editing and then again send back to my project : //its a button that is place in form1 its in myproject , and i m calling paint.net in mysoftware thorugh this code i get success but wanna send image that is in picturebox to paint.net but not getting any thing plz help me . private void button2_Click(object sender, EventArgs e) { PaintDotNet.MainForm mF; mF = new PaintDotNet.MainForm(); //PaintDotNet.PdnResources.GetImageResource(@"C:\Sunset.jpg"); //PaintDotNet.PdnResources.LoadImage(@"C:\Sunset.jpg"); // string[] fileNames ; ////string startingDir = Path.GetDirectoryName(documentWorkspace.FilePath); // string startingDir = @"C:\Temp"; //public documentWorkspace; //DialogResult result =PaintDotNet.DocumentWorkspace.ChooseFiles( PaintDotNet.DocumentWorkspace. , out fileNames, true, startingDir); //PaintDotNet.DocumentWorkspace.ChooseFile( //PaintDotNet.Actions.ImportFromFileAction(@"C:\Sunset.jpg"); // ImportFromFileAction(@"c:\sunset.jpg"); //PaintDotNet.Actions.OpenFileAction(pictureBox1.Image); //PaintDotNet.Actions.NewImageAction(); // mF.AppWorkspace.PerformAction(new OpenFileAction()); // PaintDotNet.AppWorkspaceAction(new Image("C:\sunset.jpg")); //PaintDotNet.AppWorkspaceAction(new OpenFileDialog()); mF.Show(); } :(

      S Offline
      S Offline
      Shree
      wrote on last edited by
      #2

      1. Use System.Diagnostics.Process class to start Paint.net and pass the path to your image as arguments. 2. The Process object allows you to associate an event handler that triggers when Paint.NET closes. In this event, load the file back into your application.

      N 1 Reply Last reply
      0
      • S Shree

        1. Use System.Diagnostics.Process class to start Paint.net and pass the path to your image as arguments. 2. The Process object allows you to associate an event handler that triggers when Paint.NET closes. In this event, load the file back into your application.

        N Offline
        N Offline
        nomi
        wrote on last edited by
        #3

        i tried but i m still unable to do this can u give me the code becouse i m not running the exe from my project i m running the applicaton calling one project to another i m confused , can u give me ur email address i ll send u the hole project in rar format can u do this and send me back plzzzzz my id is nomanforu@gmail.com please help me i m facing this problem since 3 days becouse i m new in c# and i have no support from any where plzzzzzzzzzzzzz

        S 1 Reply Last reply
        0
        • N nomi

          i tried but i m still unable to do this can u give me the code becouse i m not running the exe from my project i m running the applicaton calling one project to another i m confused , can u give me ur email address i ll send u the hole project in rar format can u do this and send me back plzzzzz my id is nomanforu@gmail.com please help me i m facing this problem since 3 days becouse i m new in c# and i have no support from any where plzzzzzzzzzzzzz

          S Offline
          S Offline
          Shree
          wrote on last edited by
          #4

          Please don't be desperate. Take your time, and study the documentation for System.Diagnostics.Process. If you see 10 posts below, someone has posted code using this method to start WinRar. It is more gratifying when you find the answer yourself than when someone else does it for you. The key to knowledge is not to rely on people to teach you it.

          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