Click here to Skip to main content
15,920,603 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionSuggestions for Zorder Management Pin
TyrionTheImp24-Jun-08 5:19
TyrionTheImp24-Jun-08 5:19 
QuestionValue Close() cannot be called while doing CreateHandle() when closing an MDI Child Pin
But_Im_a_Lady23-Jun-08 2:59
But_Im_a_Lady23-Jun-08 2:59 
QuestionWhich DataGridView event for persisting changes? Pin
Brady Kelly23-Jun-08 1:04
Brady Kelly23-Jun-08 1:04 
AnswerRe: Which DataGridView event for persisting changes? Pin
led mike24-Jun-08 9:59
led mike24-Jun-08 9:59 
GeneralRe: Which DataGridView event for persisting changes? Pin
Brady Kelly24-Jun-08 10:07
Brady Kelly24-Jun-08 10:07 
GeneralRe: Which DataGridView event for persisting changes? Pin
led mike24-Jun-08 11:37
led mike24-Jun-08 11:37 
GeneralRe: Which DataGridView event for persisting changes? Pin
Brady Kelly24-Jun-08 11:47
Brady Kelly24-Jun-08 11:47 
QuestionEncoding Mp3 File while uploading to FTP Server Pin
catchcnu22-Jun-08 22:01
catchcnu22-Jun-08 22:01 
hi guys,

i am trying to upload a mp3 file from local disk to a remote server using FtpWebrequest. Everything went fine and the file is getting uploaded onto the remote server, but when i try to play that the file has no content in that, i got to a conclusion that it is not encoded properly during upload and here's where i request for someone's help as i dnt know how to encode a mp3 file while uploading

here is my code pls go thru and if you know where the prob is pls do suggest me.


Dim hostname As String = "ftp://ftp.domain.com/folder/"<br />
<br />
            Dim fileName As String = path.Substring(path.LastIndexOf("\") + 1)<br />
            Dim objMp3Info As New Monotic.Multimedia.MP3.MP3Info<br />
            objMp3Info.Filename = path<br />
<br />
            Dim username As String = "username"<br />
            Dim password As String = "password"<br />
             <br />
<br />
            Dim request As FtpWebRequest = DirectCast(WebRequest.Create(hostname + "/" + fileName), FtpWebRequest)<br />
            request.UseBinary = True<br />
            request.Method = WebRequestMethods.Ftp.UploadFile<br />
<br />
            request.Credentials = New NetworkCredential("username", "password")<br />
            Dim sourceStream As New StreamReader(path)<br />
           <br />
            Dim fileContents As Byte() = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd())  ----- this is where i need someones help<br />
            sourceStream.Close()<br />
<br />
            request.ContentLength = fileContents.Length<br />
<br />
            Dim requestStream As Stream = request.GetRequestStream()<br />
            requestStream.Write(fileContents, 0, fileContents.Length)<br />
<br />
            requestStream.Close()<br />
<br />
            Dim response As FtpWebResponse = DirectCast(request.GetResponse(), FtpWebResponse)<br />
            MessageBox.Show("File Uploaded Sucessfully, status {0}", response.StatusDescription)


Thanks in advance...

Regards

Srinivas

Questionmodifying scroll box controls using compact framework SDK Pin
neilfed222-Jun-08 9:15
neilfed222-Jun-08 9:15 
GeneralComboBox in DataGridView Pin
Brady Kelly22-Jun-08 6:16
Brady Kelly22-Jun-08 6:16 
GeneralRe: ComboBox in DataGridView Pin
John_Adams23-Jun-08 4:22
John_Adams23-Jun-08 4:22 
QuestionOpen a windows form one project in other project Pin
C4ao521-Jun-08 7:40
C4ao521-Jun-08 7:40 
AnswerRe: Open a windows form one project in other project Pin
Christian Graus21-Jun-08 15:40
protectorChristian Graus21-Jun-08 15:40 
GeneralRe: Open a windows form one project in other project Pin
C4ao522-Jun-08 0:35
C4ao522-Jun-08 0:35 
QuestionHow to stop updating a PictureBox? [modified] Pin
MichaelCoder20-Jun-08 10:18
MichaelCoder20-Jun-08 10:18 
AnswerRe: How to stop updating a PictureBox? Pin
Matthew Butler21-Jun-08 3:14
Matthew Butler21-Jun-08 3:14 
GeneralRe: How to stop updating a PictureBox? Pin
MichaelCoder21-Jun-08 4:05
MichaelCoder21-Jun-08 4:05 
GeneralRe: How to stop updating a PictureBox? Pin
MichaelCoder21-Jun-08 5:28
MichaelCoder21-Jun-08 5:28 
AnswerRe: How to stop updating a PictureBox? Pin
Christian Graus21-Jun-08 12:39
protectorChristian Graus21-Jun-08 12:39 
GeneralCustom Combobox Pin
Brady Kelly20-Jun-08 5:30
Brady Kelly20-Jun-08 5:30 
GeneralRe: Custom Combobox Pin
Jaime Olivares20-Jun-08 12:17
Jaime Olivares20-Jun-08 12:17 
GeneralRe: Custom Combobox Pin
Thomas Stockwell23-Jun-08 15:28
professionalThomas Stockwell23-Jun-08 15:28 
QuestionConvert docx to PDF Pin
dhananjayamurthy20-Jun-08 0:30
dhananjayamurthy20-Jun-08 0:30 
AnswerRe: Convert docx to PDF Pin
Ashfield20-Jun-08 1:18
Ashfield20-Jun-08 1:18 
GeneralRe: Convert docx to PDF Pin
dhananjayamurthy20-Jun-08 3:34
dhananjayamurthy20-Jun-08 3:34 

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.