Atozed Forums
Параметры Рабочего стола (DeskTop parameters) - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Параметры Рабочего стола (DeskTop parameters) (/thread-1433.html)



Параметры Рабочего стола (DeskTop parameters) - Сергей Александрович - 12-14-2019

Мой сайт может быть открыт браузером с разных устройств. Компьютера, планшета или мобильного телефона. Каждое из этих устройств имеет свой размер экрана. Я хотел бы в зависимости от размера экрана но котором отображается сайт изменять его форматирование. (применять различное расположение элементов на экране для смартфонов и для компьютеров). Для этого мне при запуске нужно получить параметры экрана на котором отображается информация браузером. В первую очередь интересует высоты и ширина экрана (рабочего стола).
Как это сделать?

My site can be opened by a browser from different devices. Computer, tablet or mobile phone. Each of these devices has its own screen size. I would like depending on the size of the screen on which the site is displayed to change its formatting. (apply different arrangement of elements on the screen for smartphones and for computers). To do this, I need to get the parameters of the screen on which the information is displayed by the browser at startup. Primarily interested in the height and width of the screen (desktop).

How to do it?


RE: Параметры Рабочего стола (DeskTop parameters) - kudzu - 12-14-2019

Look in the demos, there is a demo which shows this.

The page dimensions are available in:
WebApplication.FormWidth
WebApplication.Formheight


RE: Параметры Рабочего стола (DeskTop parameters) - Сергей Александрович - 12-14-2019

К сожалению не могу найти примеры в демо.
WebApplication.FormWitdh - Я прочитал. Следующий вопрос возникает такой. А как изменить размеры формы?

В моем проекте есть форма fmTail. В DesignTime я могу установить ее размеры, Но я не знаю как установить размеры программно. Вариант написания :
fmTail.Width := 1000 ;
выдает ошибку
[dcc32 Error] unTail.pas(1132): E2003 Undeclared identifier: 'fmTail'


455 / 10000
АНГЛИЙСКИЙ
Перевести вGoogleBing
Unfortunately I can not find examples in the demo.
Web Application.Form With - I read. The next question is this. And how to change the size of the form?

There is an fmTail form in my project. In DesignTime, I can set its dimensions, But I don't know how to set the dimensions programmatically. Variant writing :
fm Tail.Width: = 1000 ;
throws an error
[[dcc32 Error] until.pos(1132): E2003 Undeclared identifier: 'fmTail'

How to access this parameter correctly ?

Как правильно обратиться к этому параметру ?


RE: Параметры Рабочего стола (DeskTop parameters) - kudzu - 12-15-2019

fmTail is the name of your form? If so you need to add it to your uses clause of the unit you want to use it from. This is standard Delphi stuff.

Regarding setting the size. I dont think the browser lets you do that except with a new window.