Thanks for confirming my observations Allen. After further trial and error,
the following seems to be doing what I want fairly well. I'd appreciate it
if anyone would let me know if they see any obvious pitfalls to this
approach (note that my Form Header and Form Footer sections have a height of
zero):
Private Sub Form_Resize()
Me.Width = Me.InsideWidth - 0.25 * 1440
Detail.Height = Me.InsideHeight - 0.25 * 1440
If (Me.Width / 1440) <= 10 Then ImgEdit1.Width = 4.9167 * 1440 Else
ImgEdit1.Width = Me.Width - 5.0833 * 1440
If (Detail.Height / 1440) <= 7.5 Then ImgEdit1.Height = 7.3333 * 1440 Else
ImgEdit1.Height = Detail.Height - 0.1667 * 1440
ImgEdit1.FitTo 1
End Sub
Regards,
s/KAM
"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
news:40d24d24$0$28951$5a62ac22@per-qv1-newsreader-01.iinet.net.au...[color=blue]
> Hi Kevin.
>
> Right: if you physically drag the window size such that it is bigger than
> the height of of the sections, then the height of the window has no
> relationship to the height of the sections.
>
> Stephen Lebans has a free downloadable example showing " a Form that
> demonstrates the relationships of the Form and Section Height and Width
> properties" in this link:
>
http://www.lebans.com/formdimensions.htm
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users -
http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Kevin Myers" <KevinMyers@austin.rr.com> wrote in message
> news:10d3o0sklj7gt7d@corp.supernews.com...[color=green]
> > Thanks to both Allen and Bri for their very helpful comments. Based on[/color]
> what[color=green]
> > they said, here is what I put in the code for my form:
> >
> > Private Sub Form_Resize()
> > If (Me.Width / 1440) <= 10 Then ImgEdit1.Width = 4.9167 * 1440 Else
> > ImgEdit1.Width = Me.Width - 5.0833 * 1440
> > If (Detail.Height / 1440) <= 7.5 Then ImgEdit1.Height = 7.3333 * 1440[/color][/color]
Else[color=blue][color=green]
> > ImgEdit1.Height = Detail.Height - 0.1667 * 1440
> > End Sub
> >
> > Unfortunately this still isn't working. The method does seem to be
> > executing when the form is resized, but the values of Me.Width and
> > Detail.Height don't seem to be changing. In the properties for the form[/color]
> the[color=green]
> > Default View is set to Single Form, Auto Resize is set to No and Border
> > Style is set to Sizable. In properties for the Detail section, Can Grow[/color]
> and[color=green]
> > Can Shrink are both set to Yes, while for the Form Header and Form[/color][/color]
Footer[color=blue][color=green]
> > sections these properties are both set to No.
> >
> > What am I overlooking?
> >
> > Thanks,
> > s/KAM[/color]
>
>[/color]