[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MessageView


I've been finding that Form_Open just does not always run when a form opens
(or rather, embeds) !

eg...
hMyInerForm.Load(hParentForm)

The parent form opens and embeds the inner form okay but the inner forms
Form_Open event only fires if i do this..
hMyInerForm.Load(hParentForm)
hMyInerForm.Show


Respects
BruceS




On Fri, 4 Oct 2024 at 06:16, BB <adamnt42@xxxxxxxxx> wrote:

> Maybe I wasn't real good at explaining this.
>
> With a standalone form, whether it is the top level form or a popup, the
> message view doesn't try to show itself until MessageView1.Open is called.
> But when the form is opened as an embedded form in a tabpanel it appears to
> try and show the MessageView control. In the code for MessageView there is
> the GetTextWidth() method below. It fails and the execution aborts because
> $hIcon has not been set.
>
> I have no idea why it's trying to show the message panel just because the
> form is inside a tabpanel.
>
> b
> On 3/10/24 5:57 pm, BB wrote:
>
> This code doesn't cope when $hIcon has not been set.
>
> Private Sub GetTextWidth() As Integer
>
>   Return Max(16, Me.Parent.ClientW - $hIcon.W - $hClose.W - Desktop.Scale * 6)
>
> End
>
> which happens when the MessageView has not been called yet, but it does run when the form is opened in a TabPanel.
>
>
> b
>
>

Follow-Ups:
Re: MessageViewBruce Steers <bsteers4@xxxxxxxxx>
References:
MessageViewBB <adamnt42@xxxxxxxxx>
Re: MessageViewBB <adamnt42@xxxxxxxxx>