Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialog form not waiting for OK Click

Status
Not open for further replies.

CraigBest

Programmer
Aug 1, 2001
545
US
Hi Folks

I have a dialog form in my VB.NET 2008 project that I modified slightly to allow it to be passed a pair of parameters by overloading the ShowDialog() method.

Code:
    Public Overloads Function ShowDialog(ByVal Commodity As String, ByVal Shiprecv As String) As String()

        ShowSelections(Commodity, Shiprecv)

        If MyBase.ShowDialog = Windows.Forms.DialogResult.OK Then
            Return msSelection
        Else
            Return Nothing
        End If

    End Function

What's happening is the form displays, performs the ShowSelections() proc, then comes back here and finishes up and returns to the calling form without waiting for the OK button click (where I fill the msSelection string variable). I'm not sure why this isn't working as I expect it should. Can anyone help?

Thanks

Craig


CraigHartz
 
OK Never mind, somehow there was a form.Show command in the Dialog form that was screwing it al up. That's working now. Sorry!

CraigHartz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top