Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Параметры Рабочего стола (DeskTop parameters)
#1
Мой сайт может быть открыт браузером с разных устройств. Компьютера, планшета или мобильного телефона. Каждое из этих устройств имеет свой размер экрана. Я хотел бы в зависимости от размера экрана но котором отображается сайт изменять его форматирование. (применять различное расположение элементов на экране для смартфонов и для компьютеров). Для этого мне при запуске нужно получить параметры экрана на котором отображается информация браузером. В первую очередь интересует высоты и ширина экрана (рабочего стола).
Как это сделать?

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?
Reply
#2
Look in the demos, there is a demo which shows this.

The page dimensions are available in:
WebApplication.FormWidth
WebApplication.Formheight
Reply
#3
К сожалению не могу найти примеры в демо.
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 ?

Как правильно обратиться к этому параметру ?
Reply
#4
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)