locked
i have a php file residing in server .. i want to execute that file from vb.net desktop application without opening the browser window RRS feed

  • Question

  • i have a php file residing in server .. i want to execute that file from vb.net desktop application without opening the browser window

    ashish

    Monday, June 25, 2012 5:15 AM

Answers

All replies

  • i have a php file residing in server .. i want to execute that file from vb.net desktop application without opening the browser window
    Monday, June 25, 2012 5:11 AM
  •    I don't have a server to test this with but wouldn't something like this work?

    Imports System.IO
    
    Public Class Form1
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    
        End Sub
        
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            ListBox1.Items.Clear()
            If FolderBrowserDialog1.ShowDialog() = DialogResult.OK Then
                    ListFiles(FolderBrowserDialog1.SelectedPath)
            Else
                Exit Sub
            End If
        End Sub
    
        Private Sub ListFiles(ByVal folderPath As String)
            Dim fileNames = My.Computer.FileSystem.GetFiles(folderPath, FileIO.SearchOption.SearchTopLevelOnly, "*.*")
            For Each fileName As String In fileNames
                ListBox1.Items.Add(fileName)
            Next
        End Sub
    
        Private Sub FolderBrowserDialog1_HelpRequest(sender As Object, e As EventArgs) Handles FolderBrowserDialog1.HelpRequest
    
        End Sub
    
        Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
            System.Diagnostics.Process.Start(ListBox1.SelectedItem.ToString())
        End Sub
    
    End Class


    You've taught me everything I know but not everything you know.


    Monday, June 25, 2012 9:55 AM
  • System.Net.WebClient should do.

    Regards, MusicDemon

    • Proposed as answer by Armin Zingler Monday, June 25, 2012 8:04 PM
    • Marked as answer by Youen Zen Monday, July 9, 2012 5:46 AM
    Monday, June 25, 2012 10:37 AM
    • Proposed as answer by MusicDemon Monday, June 25, 2012 4:29 PM
    Monday, June 25, 2012 1:06 PM
  • Please do not duplicate posts across forums... merging this with the question in VB General.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Monday, June 25, 2012 4:16 PM