| 189 |
+ ADocument + '<a name="bottom"></a></body></html>'); |
+ ADocument + '<a name="bottom"></a></body></html>'); |
| 190 |
|
|
| 191 |
doc.Close; |
doc.Close; |
| 192 |
|
// マルチモニタ対応 |
| 193 |
ARect := CalcRect(Screen.WorkAreaRect, not OnlyTitle); |
ARect := CalcRect(Screen.MonitorFromPoint(p).WorkareaRect, |
| 194 |
|
not OnlyTitle); |
| 195 |
|
|
| 196 |
FDispHtmlDocument := Idispatch(OleVariant(Self.ControlInterface).Document) as DispHTMLDocument; |
FDispHtmlDocument := Idispatch(OleVariant(Self.ControlInterface).Document) as DispHTMLDocument; |
| 197 |
FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2); |
FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2); |
| 341 |
// 以下、初期位置に問題があるときの移動 |
// 以下、初期位置に問題があるときの移動 |
| 342 |
if (Result.Left < WorkArea.Left) then begin |
if (Result.Left < WorkArea.Left) then begin |
| 343 |
// 逆サイドに余裕があれば、出力位置の左右転換 |
// 逆サイドに余裕があれば、出力位置の左右転換 |
| 344 |
if (p.X * 2 < MaxWidth) then begin |
if ((p.X - WorkArea.Left) * 2 < MaxWidth) then begin |
| 345 |
if ( (GikoSys.Setting.PopupPosition = gppTop) or |
if ( (GikoSys.Setting.PopupPosition = gppTop) or |
| 346 |
(GikoSys.Setting.PopupPosition = gppBottom)) then begin |
(GikoSys.Setting.PopupPosition = gppBottom)) then begin |
| 347 |
OffsetRect(Result, -Result.Left, WorkArea.Left); |
OffsetRect(Result, -Result.Left, 0); |
| 348 |
end else begin |
end else begin |
| 349 |
OffsetRect(Result, - (dx1 + 2 * dx2), 0); |
OffsetRect(Result, - (dx1 + 2 * dx2), 0); |
| 350 |
end; |
end; |
| 351 |
end else begin |
end else begin |
| 352 |
// 画面端まで画面幅を小さくする |
// 画面端まで画面幅を小さくする |
| 353 |
Result := Rect(0, Result.Top, |
Result := Rect(WorkArea.Left, Result.Top, |
| 354 |
Result.Right, Result.Bottom); |
Result.Right, Result.Bottom); |
| 355 |
end; |
end; |
| 356 |
end; |
end; |
| 357 |
if (Result.Top < WorkArea.Top) then begin |
if (Result.Top < WorkArea.Top) then begin |
| 358 |
// 底側に余裕があれば、出力位置の上下転換 |
// 底側に余裕があれば、出力位置の上下転換 |
| 359 |
if (p.Y * 2 < MaxHeight) then begin |
if ((p.Y - WorkArea.Top) * 2 < MaxHeight) then begin |
| 360 |
OffsetRect(Result, 0, - (dy1 + 2 * dy2)); |
OffsetRect(Result, 0, - (dy1 + 2 * dy2)); |
| 361 |
end else begin |
end else begin |
| 362 |
// 画面端まで画面高を小さくする |
// 画面端まで画面高を小さくする |
| 366 |
end; |
end; |
| 367 |
if (Result.Right > WorkArea.Right) then begin |
if (Result.Right > WorkArea.Right) then begin |
| 368 |
// 逆サイドに余裕があれば、出力位置の左右転換 |
// 逆サイドに余裕があれば、出力位置の左右転換 |
| 369 |
if (p.X * 2 > WorkArea.Right) then begin |
if ((p.X - WorkArea.Left) * 2 > WorkArea.Right) then begin |
| 370 |
if( (GikoSys.Setting.PopupPosition = gppTop) or |
if( (GikoSys.Setting.PopupPosition = gppTop) or |
| 371 |
(GikoSys.Setting.PopupPosition = gppBottom)) then begin |
(GikoSys.Setting.PopupPosition = gppBottom)) then begin |
| 372 |
OffsetRect(Result, -(Result.Right - WorkArea.Right), 0); |
OffsetRect(Result, -(Result.Right - WorkArea.Right), 0); |
| 386 |
end; |
end; |
| 387 |
if (Result.Bottom > WorkArea.Bottom) then begin |
if (Result.Bottom > WorkArea.Bottom) then begin |
| 388 |
// 上側に余裕があれば、出力位置の上下転換 |
// 上側に余裕があれば、出力位置の上下転換 |
| 389 |
if (p.Y * 2 > WorkArea.Bottom) then begin |
if ((p.Y - WorkArea.Top) * 2 > WorkArea.Bottom) then begin |
| 390 |
OffsetRect(Result, 0, -h - (dy1 + 2 * dy2)); |
OffsetRect(Result, 0, -h - (dy1 + 2 * dy2)); |
| 391 |
// 上に貫いた場合は、 |
// 上に貫いた場合は、 |
| 392 |
if (Result.Top < WorkArea.Top) then begin |
if (Result.Top < WorkArea.Top) then begin |