by Jeffrey Afable (1 Submission)
Category: Miscellaneous
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Thu 17th September 2009
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Using your PHP Functions in VB.NET
Public Class Form1
Dim my_webService As New MyInfo.MyPHPNET '<------ Declare the variable that will set
' your PHP functions.
Dim myInfo As New MyInfo.my_info '<------ Declare the variable that will
' handle the return or input for your
' PHP functions.
Dim msg As String '<------ Message handler
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Try
myInfo.my_name = InputBox("Enter you name:", "PHP in VB.NET", "unknown")
myInfo.my_work = InputBox("Enter you work:", "PHP in VB.NET", "nowork")
msg = my_webService.setMyInfo(myInfo)
MsgBox("SetMyInfo: " & msg)
Catch ex As Web.Services.Protocols.SoapException
MsgBox(ex.Message)
End Try
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
Try
Dim name As String
name = InputBox("Enter you name:", "PHP in VB.NET", "unknown")
myInfo = my_webService.getMyInfo(name)
MsgBox("GetMyInfo: '" & myInfo.my_name & _
"' with a work as '" & myInfo.my_work & "'")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class