Click here to Skip to main content
15,912,069 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: VB.Net Compiler Warning.......'used before assigned a value. null exception could result'. [modified] Pin
Luc Pattyn29-May-09 1:30
sitebuilderLuc Pattyn29-May-09 1:30 
GeneralRe: VB.Net Compiler Warning.......'used before assigned a value. null exception could result'. Pin
DaveAuld29-May-09 2:03
professionalDaveAuld29-May-09 2:03 
GeneralRe: VB.Net Compiler Warning.......'used before assigned a value. null exception could result'. Pin
Luc Pattyn29-May-09 2:05
sitebuilderLuc Pattyn29-May-09 2:05 
AnswerRe: VB.Net Compiler Warning.......'used before assigned a value. null exception could result'. Pin
chilinhhacker14-Jul-09 16:03
chilinhhacker14-Jul-09 16:03 
QuestionVB6 application using BeforeNavigate2 to capture a filled web page no longer catching pop-ups Pin
hubdawgs28-May-09 17:00
hubdawgs28-May-09 17:00 
AnswerRe: VB6 application using BeforeNavigate2 to capture a filled web page no longer catching pop-ups Pin
Christian Graus28-May-09 21:18
protectorChristian Graus28-May-09 21:18 
GeneralRe: VB6 application using BeforeNavigate2 to capture a filled web page no longer catching pop-ups Pin
hubdawgs29-May-09 4:06
hubdawgs29-May-09 4:06 
QuestionFTP Download problems Pin
CodecCodes28-May-09 15:32
CodecCodes28-May-09 15:32 
I'm encountering problems when i want to download files from my server to my clients. My client is able to connect to my server but it will never transfer the file over to my client and i am unable to solve it.


Private Sub btnDL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDL.Click

        btnDL.Enabled = True
        btnRef.Enabled = True
        btnULAbort.Enabled = True
        
        Try
            Disconnect()
        Catch ex As Exception

        End Try

        Dim Message As String = "[RequestFileDownload]"
        'SelectedItems(0) so that it knows to get the item from column 0 which is name
        Message += ListView1.SelectedItems(0).Text

        Dim filename As String

        If ListView1.SelectedItems.Count < 1 Or ListView1.SelectedItems.Count > 1 Then
            MsgBox("Please select a file")
            Exit Sub

        Else

            client = New TcpClient
            client.Connect("152.226.152.179", portNo)

            btnDL.Enabled = False
            SendMessage(Message)

            client.GetStream.BeginRead(msgData, 0, CInt(client.ReceiveBufferSize), AddressOf RReceiveMessage, Nothing)
            'MsgBox(FileRequest)
            If FileRequest = "[DLTotalBytes]" Then
                Dim DLTotal As String
                DLTotal = FileRequest.Remove(0, 14)
                FTP_Send(filename, "152.226.152.179")
            End If

            FTP_Receive(filename)

        End If

    End Sub

    Public Sub FTP_Receive(ByVal filename As String)

        Try
            '---get the local IP address
            Dim localAdd As System.Net.IPAddress = System.Net.IPAddress.Parse(ips.AddressList(0).ToString)


            Dim nws As NetworkStream = client.GetStream

            '---delete the file if it exists
            If File.Exists("C:\Documents and Settings\user\My Documents\My Received Files" & filename) Then
                File.Delete("C:\Documents and Settings\user\My Documents\My Received Files" & filename)
            End If

            '---create the file
            fs = New System.IO.FileStream("C:\Documents and Settings\user\My Documents\My Received Files" & filename, FileMode.Append, FileAccess.Write)

            Dim counter As Integer = 0
            Dim totalBytes As Integer = 0
            Do
                '---read the incoming data
                Dim bytesRead As Integer = nws.Read(msgData, 0, client.ReceiveBufferSize)
                totalBytes += bytesRead
                fs.Write(msgData, 0, bytesRead)

                '--update the status label
                ToolStripStatusLabel1.Text = "Downloading " & totalBytes & " bytes...."
                Application.DoEvents()
                System.Threading.Thread.Sleep(200)
                counter += 1

            Loop Until Not nws.DataAvailable
            ToolStripStatusLabel1.Text = "Downloading " & totalBytes & " bytes....Done."
            fs.Close()
            client.Close()

        Catch x As Exception

        End Try

    End Sub

AnswerRe: FTP Download problems Pin
Dave Kreskowiak28-May-09 17:33
mveDave Kreskowiak28-May-09 17:33 
Questionworksheetfunction.match Pin
yamanbas28-May-09 8:41
yamanbas28-May-09 8:41 
QuestionGet data off a grid on a web page Pin
MarDude28-May-09 5:54
MarDude28-May-09 5:54 
AnswerRe: Get data off a grid on a web page Pin
Jay Royall28-May-09 6:14
Jay Royall28-May-09 6:14 
GeneralRe: Get data off a grid on a web page Pin
MarDude28-May-09 7:11
MarDude28-May-09 7:11 
GeneralRe: Get data off a grid on a web page Pin
Jay Royall28-May-09 8:22
Jay Royall28-May-09 8:22 
GeneralRe: Get data off a grid on a web page Pin
MarDude28-May-09 13:33
MarDude28-May-09 13:33 
GeneralRe: Get data off a grid on a web page Pin
Jay Royall28-May-09 22:01
Jay Royall28-May-09 22:01 
GeneralRe: Get data off a grid on a web page Pin
MarDude29-May-09 6:48
MarDude29-May-09 6:48 
QuestionHow to Create a Dynamic Page in VB and Print the same. Pin
Kaushal Arora28-May-09 1:55
Kaushal Arora28-May-09 1:55 
AnswerRe: How to Create a Dynamic Page in VB and Print the same. Pin
Dave Kreskowiak28-May-09 6:44
mveDave Kreskowiak28-May-09 6:44 
GeneralRe: How to Create a Dynamic Page in VB and Print the same. Pin
Kaushal Arora28-May-09 17:47
Kaushal Arora28-May-09 17:47 
GeneralRe: How to Create a Dynamic Page in VB and Print the same. Pin
DidiKunz28-May-09 23:14
DidiKunz28-May-09 23:14 
QuestionHow to connect the sql sever to pda device. Pin
PandiaRajan_P28-May-09 1:49
PandiaRajan_P28-May-09 1:49 
AnswerRe: How to connect the sql sever to pda device. Pin
Dave Kreskowiak28-May-09 4:25
mveDave Kreskowiak28-May-09 4:25 
Questioncrysatl report for ms access Pin
hrishiS27-May-09 23:33
hrishiS27-May-09 23:33 
QuestionSend SMS from a VB6 Application Pin
she-Developer27-May-09 21:42
she-Developer27-May-09 21:42 

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.