Programmatically Displaying the Security Maintenance Dialog


Author
Message
Charles Thomas Blankenship...
Charles Thomas Blankenship
Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
Well, so much for me paying attention to detail.BigGrin



Thanks,



CT

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You are calling show().  If you want the dialog to stick around you either need to set the MDIParent property in the form or call the form as a modal dialog:

loForm.MDIParent = Me
loForm.Show

or

loFOrm.ShowDialog()

Charles Thomas Blankenship...
Charles Thomas Blankenship
Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)Advanced StrataFrame User (708 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
I have created a main form named frmMain.  It contains one button cmdSecurityDialog.  Its code looks like this:

As soon as I press the button, a form with no content quickly shows and then disappears.  This happened both with the code as it is documented in the help topic as well as my trivial modification below (added a member variable to the form class to hole an instance of the form).  I initially thought it may be due to the VFP "problem" of a variable going out of scope.  But, alas, I don't think so as the behavior is equivalent in both incarnations.

Thanks again,

CT

Imports MicroFour.StrataFrame.Security

  Public Class frmMain

  Protected oDialog As SecurityDialog()

  Private Sub cmdSecurityDialog_Click(ByVal sender As System.Object, ByVal e As   System.EventArgs) Handles cmdSecurityDialog.Click

    Using oDialog As New SecurityDialog()

    oDialog.Show()

End Using

End Sub

End Class

 



Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search