Window with horizontal and vertical scrollbars

I have a from whose view size is bigger than the screen size of some computers.

How can I use the “Open form window” and “DIALOG” commands to show a window with horizontal and vertical scrollbars?

You need to use a Window type which allows scrollbars.

and you need to set your FORM size bigger than the Window size.
SET WINDOW RECT changes the window.
Open form window opens in the size of the form.

So you need to use FORM SET SIZE to set a form size larger than the window…

Thank you for your reply Thomas. Unfortunately I can not get it to work.

I use “Open form window” to open a small window with window type “Plain form window”. According to the documentation that window type supports scrollbars.

From the small form, I open the bigger form using the DIALOG command. But the window gets automatically resized to the bigger size. When I set the window size of the bigger form to a small size and then call FORM SET SIZE to define the view size, I still get the same effect: the window is resized to the bigger size.

Example can be downloaded here:

Can you please explain what I am missing?

sorry, my mistake. You clearly wrote DIALOG and I missed that.

What I described works for MODIFY RECORD/SELECTION.
I’m not aware of a way to add scrollbars to a dialog and I honestly never even tried doing so. I always tried to adapt the content to the form size.

In v18 there is a way to do so, but you might need to change you use your forms.
Subforms changed drastically in the last year.
Use a subform as a container. In your case the size of the window.
Inside the subform, display first “small form”. When you want to switch to “large form”, don’t call dialog, just assign another content (OBJECT SET SUBFORM).
Use OBJECT SET SCROLLBAR to enable/disable hor/vert scrollbar as you need.

I know this is different coding than before. Using subforms has some nice advantages. By example in the past I had my main customer form with 10 pages. Loading and running the code for all was slow. Now I have a form with only one page with an empty subform and a tab above.
The tab control is not switching between pages, but using OBJECT SET SUBFORM to load and display each page. This is way faster (even more faster in home office), as side effect produced more clean code. It does not matter if you need 10 or 100 pages, you can scale as you want (or your customer demand) without speed impact

I understand, if that is not a solution for your case, just wanted to mention this works for me. If you need scrollbars (and scrollbar control) with DIALOG command, please post a feature request.

Yes, that is what I used to do as well. I took over a project from a different developer, with an input form with far too many fields (in my opinion). And the customer wants all the fields on one page. At work they have all 27" iMacs, so no problem there. Now he wants to open the same form on his 13" MacBook and he has the problem that the window is bigger than his screen and he can not scrolll the content.

It is too much work to recode all this with subforms. So I will file a feature request.