Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make my own modal window
#9
(03-20-2018, 04:30 AM)davenovo Wrote: Hi Daniel,

To each their own I suppose. If you want to keep 7 dialogs worth of controls on a single form and it works for you, that is awesome. Now, for those that want to keep a single dialogs worth of controls on a single form, and just open that form modally instead of just calling .Show, I am wondering if there is a way to do that.

I do it the way you are talking about and it works fine.  I create my dialogs separately, then load them onto the form during the OnCreate.  I don't do it just to avoid having to deal with a busy design time form (though that is helpful), I do it so that I can use "common dialogs" (of my own requirements) on multiple forms easily.

I create my dialog "content" as frames.  As usual, fill the frame with a region then put your stuff on the region.  During form OnCreate I call a procedure that creates the frame (from the frame design time class) on the form, sets Parent to the form, Visible to false, and the frames' region visible to false.  Then you can use the regions in dialogs.  Don't forget to set RenderInvisibleControls to True on the dialogs.

It has been a while since I did all that, but I'll try to respond if you run into problems with it.  It should work without too much difficulty.

Dan
Reply


Messages In This Thread
Make my own modal window - by davenovo - 03-19-2018, 09:24 PM
RE: Make my own modal window - by DanielFields - 03-19-2018, 10:56 PM
RE: Make my own modal window - by davenovo - 03-19-2018, 10:59 PM
RE: Make my own modal window - by DanielFields - 03-19-2018, 11:31 PM
RE: Make my own modal window - by davenovo - 03-20-2018, 04:30 AM
RE: Make my own modal window - by DanBarclay - 03-22-2018, 06:37 AM
RE: Make my own modal window - by Francesco - 05-30-2019, 03:32 PM
RE: Make my own modal window - by davenovo - 03-20-2018, 03:27 PM
RE: Make my own modal window - by davenovo - 03-22-2018, 07:55 AM
RE: Make my own modal window - by davenovo - 03-29-2018, 04:14 AM
RE: Make my own modal window - by DanBarclay - 03-29-2018, 07:24 PM
RE: Make my own modal window - by davenovo - 03-29-2018, 07:54 PM
RE: Make my own modal window - by DanBarclay - 05-31-2019, 03:20 AM
RE: Make my own modal window - by Francesco - 05-31-2019, 06:01 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)