Click here to Skip to main content
15,907,874 members
Home / Discussions / C#
   

C#

 
AnswerRe: Check for an existing item in a treeview Pin
Ravi Bhavnani7-Feb-07 11:13
professionalRavi Bhavnani7-Feb-07 11:13 
AnswerRe: Check for an existing item in a treeview Pin
Abisodun7-Feb-07 13:53
Abisodun7-Feb-07 13:53 
Questionhow to szie the window? Pin
Khoramdin7-Feb-07 9:33
Khoramdin7-Feb-07 9:33 
AnswerRe: how to szie the window? Pin
sharpiesharpie7-Feb-07 9:46
sharpiesharpie7-Feb-07 9:46 
AnswerRe: how to szie the window? Pin
Ravi Bhavnani7-Feb-07 11:20
professionalRavi Bhavnani7-Feb-07 11:20 
QuestionDecoding Attachment from rfc822? Pin
Eddymvp7-Feb-07 8:57
Eddymvp7-Feb-07 8:57 
AnswerRe: Decoding Attachment from rfc822? Pin
Guffa7-Feb-07 9:03
Guffa7-Feb-07 9:03 
GeneralRe: Decoding Attachment from rfc822? Pin
Eddymvp7-Feb-07 10:04
Eddymvp7-Feb-07 10:04 
thanks for the reply Guffa, i did a search on the Convert.FromBase64String and found a good source of code in http://msdn2.microsoft.com/en-us/library/system.convert.frombase64string(VS.71).aspx[^]

however when I run the following code I get the error Base 64 string length is not 4 or is not an even multiple of 4.
Did I miss something or Am I doing something wrong?

<br />
byte[] binaryData;<br />
				try <br />
				{<br />
					binaryData = System.Convert.FromBase64String(attach);<br />
				}<br />
				catch (System.ArgumentNullException) <br />
				{<br />
					MessageBox.Show("Base 64 string is null.");<br />
					return;<br />
				}<br />
				catch (System.FormatException) <br />
				{<br />
					MessageBox.Show("Base 64 string length is not " +<br />
						"4 or is not an even multiple of 4." );<br />
					return;<br />
				}<br />
<br />
				// Write out the decoded data.<br />
				System.IO.FileStream outFile;<br />
				try <br />
				{<br />
					outFile = new System.IO.FileStream(Application.StartupPath+"\\josetest.gif",<br />
						System.IO.FileMode.Create,<br />
						System.IO.FileAccess.Write);<br />
					outFile.Write(binaryData, 0, binaryData.Length);<br />
					outFile.Close();<br />
				}<br />
				catch (System.Exception exp) <br />
				{<br />
					// Error creating stream or writing to it.<br />
					System.Console.WriteLine("{0}", exp.Message);<br />
				}<br />

AnswerRe: Decoding Attachment from rfc822? Pin
Guffa8-Feb-07 3:13
Guffa8-Feb-07 3:13 
QuestionHow to Browse , select a file and store it onto the txtbox Pin
Eyungwah7-Feb-07 8:22
Eyungwah7-Feb-07 8:22 
AnswerRe: How to Browse , select a file and store it onto the txtbox Pin
Ravi Bhavnani7-Feb-07 8:30
professionalRavi Bhavnani7-Feb-07 8:30 
AnswerRe: How to Browse , select a file and store it onto the txtbox Pin
Stefan Troschuetz7-Feb-07 8:30
Stefan Troschuetz7-Feb-07 8:30 
QuestionRe: How to Browse , select a file and store it onto the txtbox [modified] Pin
Eyungwah7-Feb-07 10:44
Eyungwah7-Feb-07 10:44 
AnswerRe: How to Browse , select a file and store it onto the txtbox Pin
Ravi Bhavnani7-Feb-07 11:23
professionalRavi Bhavnani7-Feb-07 11:23 
QuestionDragging a ToolStrip to a different panel... Pin
Shy Agam7-Feb-07 7:59
Shy Agam7-Feb-07 7:59 
QuestionDataGrid Pin
The Brazilian One7-Feb-07 7:47
The Brazilian One7-Feb-07 7:47 
AnswerRe: DataGrid Pin
Not Active7-Feb-07 8:29
mentorNot Active7-Feb-07 8:29 
AnswerRe: DataGrid Pin
Pete O'Hanlon7-Feb-07 8:41
mvePete O'Hanlon7-Feb-07 8:41 
Questiononly one instance from my app Pin
hadad7-Feb-07 7:32
hadad7-Feb-07 7:32 
AnswerRe: only one instance from my app Pin
Ravi Bhavnani7-Feb-07 7:35
professionalRavi Bhavnani7-Feb-07 7:35 
Questionloading a combobox without repitition, how to?? Pin
Nada Adel7-Feb-07 7:27
Nada Adel7-Feb-07 7:27 
AnswerRe: loading a combobox without repitition, how to?? Pin
Ravi Bhavnani7-Feb-07 7:37
professionalRavi Bhavnani7-Feb-07 7:37 
GeneralRe: loading a combobox without repitition, how to?? Pin
Nada Adel7-Feb-07 7:44
Nada Adel7-Feb-07 7:44 
GeneralRe: loading a combobox without repitition, how to?? Pin
MoustafaS7-Feb-07 7:50
MoustafaS7-Feb-07 7:50 
GeneralRe: loading a combobox without repitition, how to?? Pin
Ravi Bhavnani7-Feb-07 7:54
professionalRavi Bhavnani7-Feb-07 7:54 

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.