Option Strict Off Option Explicit On Friend Class frmMain Inherits System.Windows.Forms.Form ' ' Scout submission is asynchronous, so we need to make it stick around ' (we can't just declare it locally in a function because it could get deleted ' before it finishes) ' Dim WithEvents scout As BUGZSCOUTLib.BugzScoutCtl Private Sub cmdOK_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdOK.Click cmdOK.Enabled = False cmdOK.Text = "Submitting..." scout = New BUGZSCOUTLib.BugzScoutCtl() scout.URL = txtURL.Text scout.DefaultMessage = txtMessage.Text scout.Project = txtProject.Text scout.Area = txtArea.Text scout.UserName = txtUser.Text scout.SubmitBug(txtDescription.Text, txtExtra.Text, txtEmail.Text, chkNewBug.CheckState = System.Windows.Forms.CheckState.Checked) End Sub ' ' scout_Failure ' Fired when the control had problems with the submission - No response ' received from the server. (DNS/Network issues most likely culprit) ' sError - error string received back from the control ' Private Sub scout_Failure(ByVal sError As String) Handles scout.Failure txtStatus.Text = "Unfortunately we were unable to transfer your information: " & sError cmdOK.Text = "Submit" cmdOK.Enabled = True End Sub ' ' scout_Success ' Fired when the control successfully connects to server. Does not guarantee that ' the submission is successful. You need to verify by looking at the return contents. ' sContents - data received from submission, normally an xml payload ' Private Sub scout_Success(ByVal sContents As String) Handles scout.Success Dim xml As New MSXML2.DOMDocument() If xml.loadXML(sContents) Then txtStatus.Text = xml.documentElement.nodeName & ": " & xml.documentElement.text Else txtStatus.Text = "There was a problem parsing the results from the submission." End If cmdOK.Text = "Submit" cmdOK.Enabled = True End Sub End Class