Click here to Skip to main content
15,923,006 members
Home / Discussions / C#
   

C#

 
GeneralDataBinding Row DataGrid Pin
Braulio Dez3-Dec-03 2:32
Braulio Dez3-Dec-03 2:32 
GeneralRe: DataBinding Row DataGrid Pin
Heath Stewart3-Dec-03 4:15
protectorHeath Stewart3-Dec-03 4:15 
GeneralRe: DataBinding Row DataGrid Pin
Braulio Dez3-Dec-03 21:06
Braulio Dez3-Dec-03 21:06 
Generalchat server Pin
Mahmoud Manasrah3-Dec-03 1:20
sussMahmoud Manasrah3-Dec-03 1:20 
Generalchat server Pin
Mahmoud Manasrah3-Dec-03 1:19
sussMahmoud Manasrah3-Dec-03 1:19 
GeneralRe: chat server Pin
Heath Stewart3-Dec-03 3:57
protectorHeath Stewart3-Dec-03 3:57 
GeneralRe: chat server Pin
Mahmoud Manasrah3-Dec-03 20:50
sussMahmoud Manasrah3-Dec-03 20:50 
GeneralCan't paste a image to PicBox Pin
trythat3-Dec-03 1:05
trythat3-Dec-03 1:05 
I've tried the code below, and various code frm a number of books, I'm using V1.1. I know there is a image on the clipboard because I can paste a copy to the same folder as where I copy/cut the image.

(I know the code looks weird, but I've tried bothversions with the other one commented out)

If anyone has any code that works I'd be gratefull, this might also be releated to a problem whereby I can drag a image from a folder to my PB, but not from IE or Mozilla.

I'm very new to C#, so help really is needed Smile | :)


private void mnuPaste_Click(object sender, System.EventArgs e)
{
IDataObject d = Clipboard.GetDataObject();

if(d.GetDataPresent(typeof(Bitmap)))
{
Bitmap b = (Bitmap)d.GetData(typeof(Bitmap));
b.Save(@"m:\mybitmap.bmp");
MessageBox.Show("Bitmap saved to disk!!");
}
else
{
MessageBox.Show("No bitmap information was contained in the clipboard.");
}



// Create a new instance of the DataObject interface.
IDataObject data = Clipboard.GetDataObject();
// If the data is text, then set the text of the
// TextBox to the text in the Clipboard.
if (data.GetDataPresent(DataFormats.Bitmap))
{
//textBox1.Text = data.GetData(DataFormats.Text).ToString();
// Yes it is, so display it in a text box.
picCoverFront.Image = (Bitmap)data.GetData(DataFormats.Bitmap);
MessageBox.Show("paste") ;
}

}

GeneralRe: Can't paste a image to PicBox Pin
Heath Stewart3-Dec-03 3:51
protectorHeath Stewart3-Dec-03 3:51 
GeneralRe: Can't paste a image to PicBox Pin
trythat3-Dec-03 6:55
trythat3-Dec-03 6:55 
GeneralRe: Can't paste a image to PicBox Pin
Heath Stewart3-Dec-03 8:16
protectorHeath Stewart3-Dec-03 8:16 
GeneralRe: Can't paste a image to PicBox Pin
trythat4-Dec-03 0:51
trythat4-Dec-03 0:51 
GeneralRe: Can't paste a image to PicBox Pin
Heath Stewart4-Dec-03 5:07
protectorHeath Stewart4-Dec-03 5:07 
GeneralRe: Can't paste a image to PicBox Pin
trythat4-Dec-03 5:16
trythat4-Dec-03 5:16 
GeneralC# MIME parser Pin
pahlsson3-Dec-03 0:53
pahlsson3-Dec-03 0:53 
GeneralRe: C# MIME parser Pin
Heath Stewart3-Dec-03 3:46
protectorHeath Stewart3-Dec-03 3:46 
GeneralRe: C# MIME parser Pin
Ivar Lumi3-Dec-03 4:12
Ivar Lumi3-Dec-03 4:12 
GeneralPerformance Java vs. C# Pin
MeisterBiber3-Dec-03 0:36
MeisterBiber3-Dec-03 0:36 
GeneralRe: Performance Java vs. C# Pin
Heath Stewart3-Dec-03 3:41
protectorHeath Stewart3-Dec-03 3:41 
Generalc# excutable Pin
shon92-Dec-03 23:17
shon92-Dec-03 23:17 
GeneralRe: c# excutable Pin
Trantor3-Dec-03 2:03
Trantor3-Dec-03 2:03 
GeneralRe: c# excutable Pin
eggie53-Dec-03 6:56
eggie53-Dec-03 6:56 
GeneralHelp me please!!! Deconvolution Pin
Angeluna2-Dec-03 23:11
sussAngeluna2-Dec-03 23:11 
GeneralRe: Help me please!!! Deconvolution Pin
leppie3-Dec-03 8:26
leppie3-Dec-03 8:26 
GeneralRe: Help me please!!! Deconvolution Pin
J. Dunlap3-Dec-03 9:07
J. Dunlap3-Dec-03 9:07 

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.