|
Bitmap LobjBitMap = new Bitmap(openFileDialog1.FileName);
ImageFormat bmpFormat = LobjBitMap.RawFormat;
string strFormat = "unidentified format";
if (bmpFormat.Equals(ImageFormat.Bmp)) strFormat = "BMP";
else if (bmpFormat.Equals(ImageFormat.Emf)) strFormat = "EMF";
else if (bmpFormat.Equals(ImageFormat.Exif)) strFormat = "EXIF";
else if (bmpFormat.Equals(ImageFormat.Gif)) strFormat = "GIF";
else if (bmpFormat.Equals(ImageFormat.Icon)) strFormat = "Icon";
else if (bmpFormat.Equals(ImageFormat.Jpeg)) strFormat = "JPEG";
else if (bmpFormat.Equals(ImageFormat.MemoryBmp)) strFormat = "MemoryBMP";
else if (bmpFormat.Equals(ImageFormat.Png)) strFormat = "PNG";
else if (bmpFormat.Equals(ImageFormat.Tiff)) strFormat = "TIFF";
else if (bmpFormat.Equals(ImageFormat.Wmf)) strFormat = "WMF";
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Very nice response.
Thank you Manas .
|
|
|
|
|
Oops, don't know what I was thinking, I'm going to take a mulligan.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
modified on Friday, September 12, 2008 5:05 AM
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: string format = someBitmap.RawFormat.ToString("g");
Did you even try this code ever.
It doesn't even complie.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Yesterday was some day, sorry, I had just recently went over some code that was identical up here at the office. MS usually uses enum for that sort of thing I assumed it was an enum and type the suggestion by rote without even thinking about it. Now here I am looking at it and laughing at myself for the error. And people like Leppie think I am never wrong :p
Sorry for the error and thanks for the spot.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
Mohammad Dayyan wrote: I want to get ImageFormat of an image ?
How can I do it ?
Image.RawFormat[^]
led mike
|
|
|
|
|
|
Hi all, just a couple of questions relating to SmtpClient and the Send() method.
According to MSDN the method blocks until the e-mail is transmitted. I don't really have a need (at least not now) to send e-mails asynchronously so for my purposes this is fine. But what exactly does it mean if the "e-mail is transmitted"? Does that mean I can relax in the knowledge that the recipient will receive his e-mail the next time he connects to his mail server or am I simply guaranteed that my SMTP server received my command and passed it on without problems?
In other words, if the function returns without throwing an exception, is that a guarantee that the recipient will receive the message or can something still go wrong after that point which will only be caught if I send the message asynchronously and implement a callback when it's delivered successfully?
Finally, if someone would be so kind as to illustrate to me how you would wrap your SmtpClient.Send() method with exception handling so as to ensure that an e-mail is sent or the failure is reported properly I would appreciate it very much. Don't worry about illustrating how to set up the SmtpClient , I know how to do that.
|
|
|
|
|
Dewald wrote: am I simply guaranteed that my SMTP server received my command and passed it on without probl
That true.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi all. This is the first time I write a windows installer and I was wondering, when you add a user dialog how to you interact with the user input in those dialogs. I tryed double clicking on the dialog but that doesn't work. Is there some way to get code behind those dialogs?
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
Stephen Lintott wrote: This is the first time I write a windows installer
Using what? What is your development environment?
Stephen Lintott wrote: when you add a user dialog
How did you do that?
led mike
|
|
|
|
|
VS 2008
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
|
Cool, maybe you should write an article about it ... or ask a question.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
please give me answer for my request.so it is very need to me in my project
|
|
|
|
|
You didn't make a request, you made a series of statements describing work you had done.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: you made a series of statements describing work you had done.
Or want to to do. Who can tell?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: ask a question
That would have been nice to have some idea of specific that he needs help with.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
This article[^] may help
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Hi,
I can use the printDocument object to get a list of printers on the local machine.
Question:
How do I get the list of printers installed on a remote machine?
PrintDocument does not seem to have the functionality for a remote machine
Thanks
|
|
|
|
|
Google WMI printers c#[^] - there's lots of promising results.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
I have a DataGridView with an assigned ContextMenuStrip. When I right click on any cell in the grid that is read only, the contextmenu that I expect to see is displayed. However, when I right-click on a non-read only cell that is a DataGridViewTextBoxColumn, I get an unexpected context menu popup with "Cut, Copy, Paste, etc." built-in commands. Clearly this context menu popup is built-in to the DataGridView, but I see no event that would allow me to capture and cancel it from popping up, so I can override it with my preferred context menu. Does anyone know of a way I can prevent this built-in context menu from displaying when right clicking on a DataGridViewTextBoxColumn?
Thank you...
|
|
|
|
|
You can probably filter out the message sent when the user rightclicks on DataGridViewColumn. This can be done using PreFilterMessage method of IMessageFilter interface. And then you call show your own contextmenu.
Dont know if any simple way exists for this.
"If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be 'meetings'." - Dave Barry
|
|
|
|
|
Thanks for the suggestion.
|
|
|
|
|
Hello everyone,
Are there any WSDL parsers (does Microsoft provides that?) which could manipulate the XML tree? E.g. getting all web methods and insert some SOAP headers in each web methods.
If Microsoft official parsers, any tools or documents with source codes are welcome.
thanks in advance,
George
|
|
|
|