Jump to content
Xtreme .Net Talk

How to cancel displayin a dialog form in the LOAD event


Recommended Posts

Guest carloss
Posted

Can someone provide a code example of how to cancel displaying a dialog/form while executing the form's LOAD event?

 

Thanks

Guest carloss
Posted
I have already tried me.close() and me.dispose() and nothing returns the control to the calling form.
Guest carloss
Posted

Here it is, and thanks for your time....

 

Private Sub OpenProjTask_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

 

If LoadProjects(psUserUnit, psUserTeam, psUserGroup) Then

If psLastProjectName <> "" Then

cbProj.Text = psLastProjectName

LoadTasks(plLastProjectNbr, psUserUnit, _

psUserTeam, psUserGroup)

End If

Else

MsgBox("The projects you participate in have no tasks assigned!", MsgBoxStyle.Critical)

Me.Close()

Me.Dispose()

End If

Guest carloss
Posted
Sorry but it does because it displays the contents of the msgbox()

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...