Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am going through in development of Chat App in WinForm C#. I have used RichTextBox for the chat messages. What now i need actually is : i want to send screenshot with the chat text, for this i needs to send image with chat text so that user can click on the image and see the screenshot. Sent image will store on server.

C#
Bitmap img = new Bitmap(btn1.BackgroundImage);
       Clipboard.Clear();
       Clipboard.SetDataObject(img);
       DataFormats.Format myFormat = DataFormats.GetFormat(DataFormats.Bitmap);
       rtbWriteMsg.Paste(myFormat);
       img.Dispose();
       rtbWriteMsg.Focus();

I have an idea to use the image in RichTextBox with the above code but how can i make it linked with some url? I need some ideas.. i have done goole-ing but couldn't found anything ...



Update:

If I can also get help if anyone give me an idea to put the linked text in RichTextBoxjust like "Click Here To View". So user can Click on it and View the ScreenShot


Thanks in advance.
Posted
Updated 27-May-14 5:50am
v2

See this[^] SO answer.

/ravi
 
Share this answer
 
Comments
Arslan Elahi 27-May-14 14:03pm    
sorry to say but honestly it is not what i am asking for
If you know the name (name in the title bar of the chat window) you can use the CaptureDesktopWindow class in GGGUtilities.zip (12.4 KB)[^]. When you have captured the image, you can save it whereever.

Hope that helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900