Why doesn't OnShow for the main form work?

I have stuff in the OnShow event of the main form, which populates several lists with the StuffLB procedure. I need these lists populated after any of my other forms have been shown with a ShowModal call.

After such a modal form is closed, the main form is simply redrawn where the modal form was, and its OnShow event OnShow not fire.

The only way I can fire the OnShow event is:

 frmM.Hide; frmB.ShowModal; frmM.Show; 

Is the only way to populate the list to use the StuffLB call after each StuffLB call on StuffLB ? I have about 25 forms that are available.

I would hope that OnShow means when it will be shown again, in part or in full.

I would be grateful for any help or suggestions.

+4
source share
1 answer

OnShow Event fires when the form becomes visible. You can use the OnActivate event. However, since this is your code that calls ShowModal another form, just put the required code in a separate method and call here and in FormShow .

+8
source

All Articles