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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PictureBox scrolling Top Property Integer Limit

Status
Not open for further replies.

jv6886

Programmer
Dec 31, 2002
46
US
Here's my situation:

I have a Frame inside of a PictureBox with vertical and horizontal scroll bars for scrolling the Frame. Inside the Frame I have about a zillion controls (I didn't design it, but unfortunately I have to maintain it) organized into sections (using other Frames).

It has worked OK until recently when I had to add yet another section to the Frame. Now it won't scroll all the way to the bottom.

I was able to work around the ScrollBar issue of 32,767 limit in the Max property. Now I have the problem that the Top property of the Frame won't go any lower than -32,768 when I'm scrolling to the bottom. I found this rather interesting since the MSDN documentation states that this property will take a "Single-precision number".

Though I would love to be able to, re-design is not an option at this time. This kludge was designed by a consulting firm. Though we have tried to explain the myriad of problems associated with this type of layout, the execs in the company have taken a liking to the flow of the form and don't want us to change it.

Any ideas or suggestions for work-arounds would be greatly appreciated.

Thank you,
wcprog
 
>I found this rather interesting since the MSDN documentation states that this property will take a "Single-precision number".

That's just so it can handle relevant values for different scale modes. The values get translated if necessary by VB into the relevant underlying integer value (representing device units, pixels) that is used by the API call that actually does the work (either SetWindowPos or MoveWindow). The limitation you have encountered, therefore, is of the API not of VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top