All,
I have a custom usercontrol, its .Width grows at run-time. It grows to the right by leaps and bounds. I end up exposing this Property in code:
VB Code:
Public Property Get Width() As [COLOR=Red]Integer[/COLOR] Width = UserControl.Width End Property Public Property Let Width(ByVal vNewValue As [COLOR=Red]Integer[/COLOR]) UserControl.Width = vNewValue End Property
and internally the size grows, here is a snippet:
VB Code:
Public Sub Add(strCellName As String, strCellTagName As String, strCellValue As String) On Error GoTo Err ' m_NumCells = m_NumCells + 1 ' Load smrtCell(m_NumCells) ' With smrtCell(m_NumCells) .Height = CELL_HEIGHT .Width = CELL_WIDTH .Left = smrtCell(m_NumCells - 1).Left + CELL_WIDTH .Top = 0 .Visible = True .ProgramName = m_ProgramPrefix .Tag = strCellName .TagName = strCellTagName ' If strCellTagName <> "" Then .ReadOnly = False .PadOnTouch = True Else .ReadOnly = True .PadOnTouch = False End If ' .HookToHost .Value = strCellValue End With ' [COLOR=Red]UserControl.Width = m_NumCells * CELL_WIDTH[/COLOR] ' Exit Sub Err: If Err.Number = 6 Then ' ' OverFlow - (m_NumCells * CELL_WIDTH) greater than max integer value. ' Exit Sub ' End If End Sub
So, the UserControl.Width is defined as a Integer Type. This is beyond my ability to modify as someone else (Microsoft) created UserControls.
I need my control to grow more than the Integer can allow. I think this means the maximum size (in pixels) is 32,768 (2^15).
I need it to be bigger, but I cannot change the fact that the UserControl.Width is limited to a number that fits in an Integer.
I suspect this could be overcome using a different scalemode, other than twip . Any thought/suggestions?
Thanks!
Dave




Reply With Quote