Page 1 of 1
Problem with Monitor 4K
Posted: Thu Apr 06, 2017 6:33 am
by 16680577
Hi,
It is impossible to resize a control "TeeChart on 2017 Pro ActiveX" by code if the size in [Twips] of the screen is bigger than a single integer. Integer long is required.
TChart.Width
TChart.Height
You can correct this problem
Philippe
Re: Problem with Monitor 4K
Posted: Fri Apr 07, 2017 5:45 am
by 16680577
Hi,
Detailed testing...
TChart.Width
TChart.Height
The maximal value accepted is 31450, is too small for a monitor 4K...
Best regards
Philippe
Re: Problem with Monitor 4K
Posted: Mon Apr 10, 2017 10:24 am
by yeray
Hello,
TChart ActiveX is a wrapper from TeeChart VCL; TChart inherits TControl, that declares Width as an Integer. So I'm not sure there's much we can do here.
http://docwiki.embarcadero.com/Librarie ... trol.Width
Re: Problem with Monitor 4K
Posted: Mon Apr 10, 2017 11:38 am
by 16680577
Hi,
Thank you for this information. I had an identical problem with the function native of sizing and moving of a form Access. The function "DoCmd.MoveWindow" is limited to values "Integer". But it is the bug of Access that I was able to by-pass with the API... Here is the same constructed function directly with the API. TControl is certainly not updated for a very long time...
Code: Select all
Sub FormMoveWindow(vobForm As Form, Optional vloLeft As Long = -1, Optional vloTop As Long = -1, Optional vloWidth As Long = -1, Optional vloHeight As Long = -1)
' Remplace Access DoCmd.MoveWindow
' en Pixels
Dim rectForm As RECT
Dim vloL As Long
Dim vloT As Long
Dim vloW As Long
Dim vloH As Long
If Not ((vloLeft = -1) And (vloTop = -1) And (vloWidth = -1) And (vloHeight = -1)) Then
' Récupérer le rectangle de la fenêtre du controle
GetWindowRect vobForm.hwnd, rectForm
' Adapter les valeurs
If vloLeft = -1 Then
vloL = rectForm.Left
Else
vloL = vloLeft
End If
If vloTop = -1 Then
vloT = rectForm.Top
Else
vloT = vloTop
End If
If vloWidth = -1 Then
vloW = rectForm.Right - rectForm.Left
Else
vloW = vloWidth
End If
If vloHeight = -1 Then
vloH = rectForm.Bottom - rectForm.Top
Else
vloH = vloHeight
End If
' Repositionner et redimentionner le formulaire
MoveWindow vobForm.hwnd, vloL, vloT, vloW, vloH, True
End If
End Sub
If you corrected the bug "Access Anchor Control", I do not maybe need any more to use these properties. But for a monitor 4K, it is not correct.
Thank you very match
Best regards
Philippe