Hide and show a OlkTextBox control in a formregion

Hi all,

how can I hide and show again a OlkTextBox control in a formregion (VSTO 2005 SE)? There is no function or property like "show", "hide", "visible"..

Thanks, Raul

[209 byte] By [RaulRosenloecher] at [2008-1-10]
# 1

Good find! There is no expected Visible property. I guess a workaround would be to set BorderStyle to olBorderStyleNone and ForeColor/BackColor to the window background color.

SueMosher-OutlookMVP at 2007-10-3 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 2

And set Enabled = False.

SueMosher-OutlookMVP at 2007-10-3 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 3

Got some additional info on this, and it's good news. According to Ryan Gregg on the Outlook team, "Visible is implemented on MSForms.IControl, which is implemented by all of the Olk* controls. You need to cast the control to that interface, or just use late-binding to set this property (along with width, height, top, left, etc)."

SueMosher-OutlookMVP at 2007-10-3 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 4
C#: "MSForms.IControl ictrl = mycontrol as MSForms.IControl" and set it to "ictrl.Visible = false" works fine.

Many thanks. Raul

RaulRosenloecher at 2007-10-3 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...