PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Paul D. Elliott on June 07, 2007, 01:39:48 PM

Title: re: MS masked edit
Post by: Paul D. Elliott on June 07, 2007, 01:39:48 PM
Jose,

Would you be so kind as to show how to do things like set & get the data for the control?
Also how to set the font & color?

I'm talking about your message

http://planetsquires.com/support/index.php?topic=1172.msg5753#msg5753


If you're too busy then I'll understand. I'll just wait for Paul to get FF v3 out the door and use
his masked edit control.

Thanks.
Title: Re: re: MS masked edit
Post by: Jose Roca on June 07, 2007, 10:58:26 PM

' sets the foreground and background colors
Local vColor As Variant
vColor = %Blue As Dword
Object Let DISPATCH_FORM1_OCXCONTROL1.ForeColor = vColor
vColor = RGB(255, 250, 250) As Dword
Object Let DISPATCH_FORM1_OCXCONTROL1.BackColor = vColor
Local vFontName As Variant
vFontName = "Verdana"
' Sets the font properties
Object Let DISPATCH_FORM1_OCXCONTROL1.FontName = vFontName
Local vFontBold As Variant
vFontBold = -1 As Long
Object Let DISPATCH_FORM1_OCXCONTROL1.FontBold = vFontBold
Local vText As Variant
vText = "12345.12"
' Sets the text
Object Let DISPATCH_FORM1_OCXCONTROL1.Text = vText


To get the text, use Object Let DISPATCH_FORM1_OCXCONTROL1.Text To vText.

A list of properties and methods of the control:

ClipMode property
PromptInclude property
AllowPrompt property
AutoTab property
MousePointer property
FontBold property
FontItalic property
FontName property
FontSize property
FontStrikethru property
FontUnderline property
HideSelection property
MaxLength property
Format property
Mask property
FormattedText property
SelLength property
SelStart property
SelText property
ClipText property
PromptChar property
Text property
MouseIcon property
Appearance property
BackColor property
Font property
ForeColor property
Enabled property
hWnd property
BorderStyle property
OLEDragMode property
OLEDropMode property
AboutBox method
Refresh method
OLEDrag method

You should read the documentation for the control.