Click here to Skip to main content
16,005,038 members
Home / Discussions / C#
   

C#

 
QuestionHow do you map a network drive? Pin
SeanV5-Dec-04 19:25
SeanV5-Dec-04 19:25 
AnswerRe: How do you map a network drive? Pin
Daniel Turini5-Dec-04 20:24
Daniel Turini5-Dec-04 20:24 
GeneralDB and Several Systems Pin
mkomasi5-Dec-04 18:49
mkomasi5-Dec-04 18:49 
GeneralRe: DB and Several Systems Pin
Daniel Turini5-Dec-04 20:20
Daniel Turini5-Dec-04 20:20 
GeneralFind file status in C# Pin
mmsspp5-Dec-04 18:48
mmsspp5-Dec-04 18:48 
GeneralRe: Find file status in C# Pin
Daniel Turini5-Dec-04 20:15
Daniel Turini5-Dec-04 20:15 
Questionhow to do: Pin
mansoorafzal5-Dec-04 18:35
mansoorafzal5-Dec-04 18:35 
AnswerRe: how to do: Pin
Jay Shankar5-Dec-04 21:32
Jay Shankar5-Dec-04 21:32 
The simplest method is using clipborad.

Other method is converting the image into Windows Meta File (Wmf) and preparting the rtf and finally assigning the rtf to the richTextBox.

The first's solution is as below:

string fileName = string.Empty;

if(System.IO.File.Exists(fileName))
{

	System.Drawing.Image myImg = System.Drawing.Image.FromFile(fileName);



	// Copy the bitmap to the clipboard.
	Clipboard.SetDataObject(myImg, fale);

	// Get the format for the object type.
	DataFormats.Format myFormat = DataFormats.GetFormat (DataFormats.Bitmap);

	// After verifying that the data can be pasted, paste
	if(this.richTextBox1.CanPaste(myFormat)) 
	{

		this.richTextBox1.Paste();
	}

}			


Regards,

Jay
AnswerRe: how to do: Pin
Dave Kreskowiak6-Dec-04 4:15
mveDave Kreskowiak6-Dec-04 4:15 
GeneralCRAP!!!! Pin
tom_dx5-Dec-04 16:14
tom_dx5-Dec-04 16:14 
GeneralRe: CRAP!!!! Pin
Christian Graus5-Dec-04 16:19
protectorChristian Graus5-Dec-04 16:19 
GeneralRe: CRAP!!!! Pin
tom_dx5-Dec-04 16:29
tom_dx5-Dec-04 16:29 
GeneralRe: CRAP!!!! Pin
Christian Graus5-Dec-04 16:31
protectorChristian Graus5-Dec-04 16:31 
GeneralRe: CRAP!!!! Pin
DavidNohejl6-Dec-04 2:02
DavidNohejl6-Dec-04 2:02 
GeneralRe: CRAP!!!! Pin
Gary Thom6-Dec-04 6:41
Gary Thom6-Dec-04 6:41 
Generalwhy!!!! Pin
Anonymous5-Dec-04 15:00
Anonymous5-Dec-04 15:00 
GeneralRe: why!!!! Pin
tom_dx5-Dec-04 15:03
tom_dx5-Dec-04 15:03 
GeneralRe: why!!!! Pin
Christian Graus5-Dec-04 16:20
protectorChristian Graus5-Dec-04 16:20 
GeneralRe: why!!!! Pin
Dave Kreskowiak6-Dec-04 4:13
mveDave Kreskowiak6-Dec-04 4:13 
GeneralDynamically update combo box items bound to data source Pin
SloanCode5-Dec-04 9:53
SloanCode5-Dec-04 9:53 
GeneralBrowse button Pin
dragonroamer5-Dec-04 9:53
dragonroamer5-Dec-04 9:53 
GeneralRe: Browse button Pin
tom_dx5-Dec-04 15:06
tom_dx5-Dec-04 15:06 
Generalcapturing other applications... Pin
eligeti5-Dec-04 9:47
eligeti5-Dec-04 9:47 
GeneralRe: capturing other applications... Pin
Daniel Turini5-Dec-04 20:04
Daniel Turini5-Dec-04 20:04 
GeneralMaking listView.labelEdit editable on one click Pin
youusuf5-Dec-04 8:36
youusuf5-Dec-04 8:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.