Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resize Event on a Form... 2

Status
Not open for further replies.

Snaggs

Programmer
Jan 11, 2000
393
US
Ok, I've looked hi and low to figure this one out but couldn't find the solution. So I'm posting to the experts. I have a form that has an image control on it. When the form is resized I want to set the height and width of the control to that of the form, plus or minus a few twips to allow for a nice boarder. I have code in the Form_Resize event and the event fires when the form is resized, but for some reason it "ALWAYS RETURNS THE SAME VALUE!!!" for Height and Width.

Is there a property that I have to set to make these values change correctly with the size of the screen? Here's the code I'm using:

Private Sub Form_Resize()
Debug.Print Me.Width, Me.Detail.Height, Me.Name
imgViewer.Width = Me.Width - 120
imgViewer.Height = Me.Detail.Height - 420
End Sub

Thanks for any help you might be able to offer on this one! Snaggs
tribesaddict@swbell.net
To define recursion, we must first define recursion.
 
AhHa!

According to Microsofts Q document of Q136124 on their support site, a property called 'InsideHeight' and 'InsideWidth' were added to Access 95. However, they don't show up as visible properties, however the DO WORK!

Just thought I would post the resolution in case someone else ran across this same problem. Snaggs
tribesaddict@swbell.net
To define recursion, we must first define recursion.
 
Snaggs,

Thanks for the info. It was very helpful even nearly 4 years later.

Also, I love your sig.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top