Guest carloss Posted October 15, 2002 Posted October 15, 2002 Can someone provide a code example of how to cancel displaying a dialog/form while executing the form's LOAD event? Thanks Quote
*Gurus* Derek Stone Posted October 15, 2002 *Gurus* Posted October 15, 2002 Me.Close() Quote Posting Guidelines
Guest carloss Posted October 15, 2002 Posted October 15, 2002 I have already tried me.close() and me.dispose() and nothing returns the control to the calling form. Quote
*Gurus* Derek Stone Posted October 15, 2002 *Gurus* Posted October 15, 2002 Let me see the code. Quote Posting Guidelines
Guest carloss Posted October 15, 2002 Posted October 15, 2002 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 Quote
*Gurus* Derek Stone Posted October 17, 2002 *Gurus* Posted October 17, 2002 Me.Close() works fine. Your If/Then statement isn't being entered. Quote Posting Guidelines
Guest carloss Posted October 17, 2002 Posted October 17, 2002 Sorry but it does because it displays the contents of the msgbox() Quote
*Gurus* Derek Stone Posted October 17, 2002 *Gurus* Posted October 17, 2002 Are you sure the other form is loaded and visible? Quote Posting Guidelines
*Gurus* Derek Stone Posted October 17, 2002 *Gurus* Posted October 17, 2002 Attach the project if you can. You have me wondering. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.