122
|
ImageSize property on 32 (specifies the size of control' icons)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:ImageSize := 32
oMaskEdit:Images("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqNUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlwyV21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+CMPo9MBMC+j2vC8j7wS8cFNI4kBo05UIvfCT/NsnsApU+0Fqg/T+oy/kPxC0sEQfErKQK96+w28UWRI8UGvO8sTLS9r2PWmsMJTDTask3CsIbIEQRA3shOXEEAO/GclJ9" +;
"FEKrrA8FRbKMXRIlb0JxCkjS1LMswhCcvuel0cv26cSMa8Ufx+2sQwhEUoSXOCjSbLcnxjKc7sdKUVyq28NtVI71P9P7JxtQEapjQ6fzfM8zPfNE2PhIsLL63E40slk5y7N89LcyU9SvMb3SdUc6VJLj5VLVLfO/PS9KzNFHUa/0XyBD0dxlS9cxhMlTRSoNXypPErWDPyfNS+MwprRNO0FD8wVVZ1AI08URwVRjtJ1WCn21QkkUrXVLVPQS/XIkFgTxT9iONZ9xVTdq+L1eKg3kkF6Upe68XtfV51/MtrVjBlwYFL1ev8y1/P6/lyzzYl02wntj0RVFmS1Qa+M5as93QxEUW9e993rfmQ2+vy65M/mL1lhl/2bj2ByVduMtNhCJT9hdz41nN14Ld12Z9UjfI/oUAaGseiw6+uFLLhcVabJOS5RqOE0BHlZ5VnEr5fOMs3st+aa/bbRzrJGV51Y0b0DbqaWXZD90hIsPbjWu52+6Wyadpe66hhO+P/Xi" +;
"oW5rD8ZbrUZuVg6n1dsE/cXmewu1m9PVwnd35/nueXho/NaJzmjc61W76esuT77eG8pTquy9TwWH8LEzG8RDfFalx3Gcfvna9rvG/cptGLd9tuI6TZOP5Fiqi99vea+X4VRcBq/JZZtVQ9cwSs5lsXE372+a9z7PbfB3VVqHyvMctLto8uob6eV0m/cD6MN2v+T33t6sBut42vdv2bJ8a997x2maFJfK+qArbGJPEKE+1qTflMsIdW/GCJX17KcT6/czr/X+u1g29B7j/4BQfWkkx4zIHisjhPCmE0K4SwtXM+d4BvHRwNZOoBph9IJvPek9d40FoMJxf691jj2ywQQcHEWET4XJwkTszlVqm2GokewxtBT1DpQjRxDN0rUVDNKdC3lb6tzNOwh6upMSSYfv4YBCl/bsn9PxiFCEo7SI6Obc9HeOrnY8x4jtHtdpN4GRbaorhsbu18Pph5CiHymI0RpSXGJ/z2oUOxYxG858AyiI+bfJtuTcG5yelBJy" +;
"T8okhqFd4a5yxL0rvulYtKCsZiWxWkc1s1cRoxxwhA31DLE0mR9l9HqX8fJgTDmFMVH0MIsRzVYnwnMi1dyzmhLt2kS2pxIiU62Wj5ptQGlSYFakLonTUJNLKaM5WzlffEkuFkk5wTrhVO2eE7G6lJhxFFYUZ55zmn0WuBCD4pzhirFCKkbomsOoIYmZx5p90LoYWGPdD5g0QmJRKYxbZ6zYoVQ2jVGylSak7KSkFH6RSjpHKFuU+YMyNo5SulkC6I0vonTCitMXPoEpVS2H5FQfEqp2R1opIgAEkJISYARTCukOhmPNI5Ex/wzGHUsicMwA1LHgQ90Y/KpoQHAD+pB/R4NzIaMAB9Xaw1gqaAOsh/A/ptIkWUfhGK1kZH8RgH5GqvgArqRmt4AAPrTroRofBGADkqr6Rmu4D7CEaHARiwpJrEEZsXXwlVjyMWRsaRqwdkLGNBABZmytmyMnaINZqyVpLR2ftKAAAdd6h2osbaskdiq4EZtgSmyNcbVW" +;
"RJNXe3AA7REar3b0stlAAXBtoRmvJGLjEYAHUWsFcwCD/rnaop9aEICMAPdK5hT6xpeuzdOtAgKuJeGfdq6ggEbkTvAP+p9UCHXrvKkcgIA==")
oMaskEdit:Warning := "<img>1</img> <font ;16>Invalid character"
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
121
|
ImageSize property on 16 (specifies the size of control' icons)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:ImageSize := 16
oMaskEdit:Images("gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOqdSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVttmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8acvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtT" +;
"GsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgPnwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg==")
oMaskEdit:Warning := "<img>1</img> Invalid character"
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
120
|
Is it possible to add leading-zero for masking floating points
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "-###,###,##0.00;;;float"
oMaskEdit:Text := "1234"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
119
|
How can I show the full mask if the field is empty and gets the focus
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "!(999) 000 0000;;;warning=Invalid character!,select=4,overtype"
oMaskEdit:AllowEmptyValue := 1/*exAllowEmptyValueShowMask*/
oMaskEdit:Text := ""
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
118
|
How can I mask a date (keep leading zeroes always visible) (method 4)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "!00/00/0000;;0;empty,validateas=1,invalid=Invalid date!,warning=Invalid character!,select=4,overtype"
oMaskEdit:Text := Transform("01/02/2001","")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
117
|
How can I mask a date (keep leading zeroes always visible) (method 3)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "!00/00/0000;;0;select=4,empty,overtype"
oMaskEdit:Text := Transform("01/02/2001","")
oMaskEdit:Warning := "Invalid character!"
oMaskEdit:Invalid := "Invalid date!"
oMaskEdit:ValidateAs := 1/*exValidateAsDate*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
116
|
How can I mask a date (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 4/*exSelectRequiredEditableGotFocus*/
oMaskEdit:Mask := "!99/99/9999;; ;select=4,overtype"
oMaskEdit:Text := Transform("01/02/2001","")
oMaskEdit:Warning := "Invalid character!"
oMaskEdit:Invalid := "Invalid date!"
oMaskEdit:ValidateAs := 1/*exValidateAsDate*/
oMaskEdit:AllowEmptyValue := -1/*exAllowEmptyValueShowNothing*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
115
|
How can I make the field to support empty values (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "!(999) 000 0000;;;empty,select=4,overtype,invalid=invalid phone number,beep"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
114
|
How can I make the field to support empty values (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:AllowEmptyValue := -1/*exAllowEmptyValueShowNothing*/
oMaskEdit:Mask := "!(999) 000 0000"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
113
|
How do I get the value with no double quoted strings
PROCEDURE OnChange(oMaskEdit)
DevOut( oMaskEdit:Value(3) )
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Change := {|| OnChange(oMaskEdit)} /*Fired while the user changes the control's text.*/
oMaskEdit:Mask := "`IP address is `{0,255}\.{0,255}\.{0,255}\.{0,255}"
oMaskEdit:MaskChar := 48
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Text := "1.2.3.4"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
112
|
How can I mask a RGB color
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`RGB(`{0,255},{0,255},{0,255}`)`"
oMaskEdit:MaskChar := 48
oMaskEdit:Text := "RGB(255,0,0)"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
111
|
I noticed that an empty field is validated. Can this be changed
PROCEDURE OnValidateValue(oMaskEdit,NewValue,Cancel)
Cancel := .T.
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:ValidateValue := {|NewValue,Cancel| OnValidateValue(oMaskEdit,NewValue,Cancel)} /*Validates the field's value, once the user leaves the field.*/
oMaskEdit:Invalid := "The value you entered isn't appropriate for the input mask <b>'<%mask%>'</b> specified for this field."
oMaskEdit:Mask := "!(999) 000-0000"
oMaskEdit:SelectGotFocus := 4/*exSelectRequiredEditableGotFocus*/
oMaskEdit:InsertMode := 1/*exEditOvertypeMode*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
110
|
How can I play a beep when the user enters inappropriate value for the field, instead displaying the tooltip
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Invalid := " "
oMaskEdit:Mask := "!(999) 000-0000"
oMaskEdit:SelectGotFocus := 4/*exSelectRequiredEditableGotFocus*/
oMaskEdit:InsertMode := 1/*exEditOvertypeMode*/
oMaskEdit:Text := "123-4567"
oMaskEdit:AllowBeep := .T.
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
109
|
How can I restrict the data input until the user enters appropiate value (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Invalid := "The value you entered isn't appropriate for the input mask <b>'<%mask%>'</b> specified for this field."
oMaskEdit:Mask := "!(999) 000-0000"
oMaskEdit:SelectGotFocus := 4/*exSelectRequiredEditableGotFocus*/
oMaskEdit:InsertMode := 1/*exEditOvertypeMode*/
oMaskEdit:Text := "123-4567"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
108
|
How can I restrict the data input until the user enters appropiate value (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "!(999) 000-0000;;;invalid=The value you entered isn't appropriate for the input mask <b>'<%mask%>'</b> specified for this field."
oMaskEdit:SelectGotFocus := 4/*exSelectRequiredEditableGotFocus*/
oMaskEdit:InsertMode := 1/*exEditOvertypeMode*/
oMaskEdit:Text := "123-4567"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
107
|
How do I set the control's field from right to left
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`Phone: `!(999) 000 0000"
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Text := "8450287"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
106
|
How can I specify multiple masks
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:InsertMode := 1/*exEditOvertypeMode*/
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:VisibleMasks := 6
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Masks := "Local;!000-0000|Domestic;!(999) 000-0000|International;!`+1` 999-000-0000|Dialed in the US;!`1` 999-000-0000|Dialed from Germany;!`001` 999-000-0000|Dialed from France;!`191` 999-000-0000"
oMaskEdit:Text := "845 0287"
oMaskEdit:ActiveMask := 1
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
105
|
How can I mask a date (method 1, limit date)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "{1,12}/{1,31}/{1950,2015}"
oMaskEdit:Text := Transform("01/02/2001","")
oMaskEdit:Warning := "Invalid character!"
oMaskEdit:Invalid := "Invalid date!"
oMaskEdit:ValidateAs := 1/*exValidateAsDate*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
104
|
How can I mask a medium time (method 3)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "99:00;;0;overtype"
oMaskEdit:Text := "01:22"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
103
|
How can I mask a medium time (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "{1,12}:{0,59} »[aApP]M"
oMaskEdit:Text := "11:22 AM"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
102
|
How can I mask a medium time (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "99:00 »[aApP]M"
oMaskEdit:Text := " 1:22 PM"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
101
|
How can I mask a short time (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "00:00;;0;overtype"
oMaskEdit:Text := "01:22"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
100
|
How can I mask a short time (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "00:00"
oMaskEdit:Text := "01:22"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
99
|
How can I mask a long time (method 3)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "99:00:00;;0;overtype"
oMaskEdit:Text := "01:22:00"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
98
|
How can I mask a long time (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "{1,12}:{0,59}:{0,59} »[aApP]M"
oMaskEdit:Text := "11:22:34 AM"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
97
|
How can I mask a long time (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "99:00:00 »[aApP]M"
oMaskEdit:Text := " 1:22:00 PM"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
96
|
How can I mask a password
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := ";;;password"
oMaskEdit:Text := "12"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
95
|
How can I mask an extension
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "99999"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "12"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
94
|
How can I mask a zip code
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "00000-9999"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "12"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
93
|
How can I mask a social security number
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "000-00-0000"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "12"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
92
|
How can I mask a phone number
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "!(999) 000 0000"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "8450287"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
91
|
How can I mask a binary number (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "[01][01][01][01][01][01][01][01];;0;overtype"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "001"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
90
|
How can I mask a binary number (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "[01][01][01][01][01][01][01][01]"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "001"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
89
|
How can I mask a hexa number (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "»[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F];;0;overtype"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "00f"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
88
|
How can I mask a hexa number (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "»[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "00f"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
87
|
How do I mask an integer number
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := ";;;float,grouping=,digits=0"
oMaskEdit:Text := Transform(12345.67,"")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
86
|
How do I mask a decimal point number, including grouping of digits
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := ";;;float"
oMaskEdit:Text := Transform(12345.67,"")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
85
|
How can I mask an email address
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "`e-mail: `*@*.*"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "mfl@ex"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
84
|
How can I mask an URL address
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "`http://`*.*.*"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "www."
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
83
|
How can I mask an IP addresse
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "{0,255}.{0,255}.{0,255}.{0,255}"
oMaskEdit:Text := "12.2"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
82
|
How can I mask a license key
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Mask := "AAAA-AAAA-AAAA-AAAA"
oMaskEdit:Text := "12A"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
81
|
How can I specify the accepted characters only, converted to lowercase
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`1,2,3,4,a,A,b,B or c,C(->lowercase): `«[1-4aAbBcC][1-4aAbBcC][1-4aAbBcC][1-4aAbBcC]"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "WAa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
80
|
How can I specify the accepted characters only, converted to uppercase
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`1,2,3,4,a,A,b,B or c,C(->uppercase): `»[1-4aAbBcC][1-4aAbBcC][1-4aAbBcC][1-4aAbBcC]"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "WAa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
79
|
How can I specify the accepted characters only
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`1,2,3,4,a,b or c: `[1-4abc][1-4abc][1-4abc][1-4abc]"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "WAa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
78
|
How can I input a number with lower and upper margins
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`number between 1950 and 2050: `{1950,2050}"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
77
|
How can I mask an url
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`any: `http://*.*.*"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "www.exontrol.com"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
76
|
How can I enter any characters combinations, converted to lowercase
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`any: `«*"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
75
|
How can I enter any characters combinations, converted to uppercase
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`any: `»*"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
74
|
How can I enter any characters combinations
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`any: `*"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
73
|
How can I enter any letter, converted to lowercase (entry required) (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter(->lowercase): `«[a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z]"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
72
|
How can I enter any letter, converted to lowercase (entry required) (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter(->lowercase): `<<<<"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
71
|
How can I enter any letter, converted to uppercase (entry required) (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter(->uppercase): `»[a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z]"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
70
|
How can I enter any letter, converted to uppercase (entry required) (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter(->uppercase): `>>>>"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
69
|
How can I enter any character or a space (entry optional)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`character,space,optional: `CCCC"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
68
|
How can I enter any character or a space (entry required)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`character,space: `&&&&"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
67
|
How can I enter any letter or space (entry optional)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter,space,optional: `????"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
66
|
Is it possible to display the field with no masking or placeholders, when it has no focus
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:TextIncludeLiteralsLoseFocus := 1/*exClipModeLiteralsInclude*/
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`Phone: `!(999) 000-0000"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
65
|
I have the mask starting with literals, is it possible to assign the text on editable part only, when calling the Text property
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`Upper Hexa [0-9a-fA-F]: `»[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "09af"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
64
|
How can I enter a proper name, so the first letter to be upper, rest lower, and so on
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter(->uppercase),any,space,letter(->uppercase),any: `»L««*» »L««*"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "mihai filimon"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
63
|
How can I enter the first letter converted to upercase, and anything else after as typed (proper)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter(->uppercase),any: `»L«*"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "aFILe"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
62
|
How can I enter the first letter converted to upercase, and anything else after in lowercase (proper)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter(->uppercase),any: `»L««*"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "aFILe"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
61
|
How can I enter any letter (entry require)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter: `LLLL"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
60
|
How can I enter any letter, digit, converted to lowercase (entry required)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter(->lowercase),digit: `«AAAA"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "AA"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
59
|
How can I enter any letter, digit, converted to uppercase (entry required)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter(->uppercase),digit: `»AAAA"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
58
|
How can I enter any letter, digit (entry required)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`letter,digit: `AAAA"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "Aa"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
57
|
How can I enter a hexa character, converted to lower, [0-9a-fA-F] ( entry required )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`Lower Hexa [0-9a-fA-F]: `«[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "FF"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
56
|
How can I enter a hexa character, converted to upper, [0-9a-fA-F] ( entry required )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`Upper Hexa [0-9a-fA-F]: `»[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "ff"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
55
|
How can I enter an upper case hexa character, [0-9],[A-F] ( entry required )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`Hexa [0-9],[A-F]: `XXXX"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "12"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
54
|
How can I enter a lower case hexa character, [0-9],[a-f] ( entry required )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`Hexa [0-9],[a-f]: `xxxx"
oMaskEdit:TextIncludeLiterals := 2/*exClipModeLiteralsExclude*/
oMaskEdit:Text := "12"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
53
|
How can I enter a digit or space (entry not required; plus and minus signs not allowed)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`digit,space,optional: `9999"
oMaskEdit:Text := "12"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
52
|
How can I enter a digit (0 through 9, entry required; plus [+] and minus [-] signs not allowed)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`digit: `0000"
oMaskEdit:Text := "12"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
51
|
How can I enter a digit, +, - or space (entry not required)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Mask := "`digit,+,-,space,optional: `####"
oMaskEdit:Text := "12"
oMaskEdit:Warning := "Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
50
|
How can I add more literals at once (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "" + CHR(34) + "This text is included between \" + CHR(34) + "\" + CHR(34) + " characters: " + CHR(34) + " 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
49
|
How can I add more literals at once (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`This text is included between \`\` characters: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
48
|
Is it possible to change the control's border, using your EBN objects
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oMaskEdit:Appearance := 16777216/*0x1000000+*/
oMaskEdit:Warning := "Invalid character"
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
47
|
How can I get the value as it is displayed
PROCEDURE OnChange(oMaskEdit)
DevOut( oMaskEdit:Text() )
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Change := {|| OnChange(oMaskEdit)} /*Fired while the user changes the control's text.*/
oMaskEdit:Mask := "00:00:00;;;overtype"
oMaskEdit:Text := "12"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
46
|
How can I get the just typed and accepted characters from the field
PROCEDURE OnChange(oMaskEdit)
DevOut( oMaskEdit:Value(2) )
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Change := {|| OnChange(oMaskEdit)} /*Fired while the user changes the control's text.*/
oMaskEdit:Mask := "00:00:00;;;overtype"
oMaskEdit:Text := "12"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
45
|
How can I get the value with no masking or placeholder character
PROCEDURE OnChange(oMaskEdit)
DevOut( oMaskEdit:Value(1) )
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Change := {|| OnChange(oMaskEdit)} /*Fired while the user changes the control's text.*/
oMaskEdit:Mask := "00:00:00;;;overtype"
oMaskEdit:Text := "12"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
44
|
How can I change the masking or placeholder character (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`Time: `00:00;;0;overtype"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
43
|
How can I change the masking or placeholder character (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`Time: `00:00"
oMaskEdit:MaskChar := 48
oMaskEdit:InsertMode := 1/*exEditOvertypeMode*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
42
|
Can I use your overtype mode in a multi-line control
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Text := "text"
oMaskEdit:MultiLine := .T.
oMaskEdit:InsertMode := 1/*exEditOvertypeMode*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
41
|
Is it possible to show the control's content with a different color, while the control's content is not valid
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`Phone: `!(999) 000 0000"
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Text := "8450287"
oMaskEdit:SetProperty("ForeColorRich",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oMaskEdit:Type := 1/*exTypeRichEdit*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
40
|
How can I select the empty and editable entity, when the control got the focus (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`Date: `{1,12}/{1,31}/{1950,2050}"
oMaskEdit:SelectGotFocus := 2/*exSelectEditableGotFocus*/
oMaskEdit:Text := "1/1/"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
39
|
How can I select the empty and editable entity, when the control got the focus (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`Date: `{1,12}/{1,31}/{1950,2050};;;select=2"
oMaskEdit:Text := "1/1/"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
38
|
How can I select the entire text, when the control got the focus (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`Date: `{1,12}/{1,31}/{1950,2050};;;select=1"
oMaskEdit:Text := Transform("01/01/2001","")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
37
|
How can I select the entire text, when the control got the focus (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`Date: `{1,12}/{1,31}/{1950,2050}"
oMaskEdit:SelectGotFocus := 1/*exSelectAllGotFocus*/
oMaskEdit:Text := Transform("01/01/2001","")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
36
|
Does your control support subscript or superscript, in HTML tooltips
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Warning := "<sha ;;0>Invalid <b><font ;6><off -6>2<off 4>3<off 4>1 character"
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
35
|
How can I change the font on the control's tooltip
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Warning := "<font ;14>Invalid character"
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
34
|
How can I display any picture on the field's tooltip
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
oMaskEdit:Warning := "<img>pic1</img> Invalid character"
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
33
|
How can I display any icon on the field's tooltip
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oMaskEdit:Warning := "<img>1</img> Invalid character"
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
32
|
How can I change the visual appearance of the tooltip shown when user pressed an invalid character (Method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:SetProperty("Background",65/*exToolTipBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 0,0,255 } ) , .F. ))
oMaskEdit:SetProperty("Background",66/*exToolTipForeColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,0 } ) , .F. ))
oMaskEdit:Warning := "Invalid character"
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
31
|
How can I change the visual appearance of the tooltip shown when user pressed an invalid character (Method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oMaskEdit:SetProperty("Background",64/*exToolTipAppearance*/,0x1000000)
oMaskEdit:Warning := "Invalid character"
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
30
|
Is it possible to show a message when the user enters an invalid character ( method 2 )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`Time: ` 00:00:00;;;warning=Invalid character"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
29
|
Is it possible to show a message when the user enters an invalid character ( method 1 )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Warning := "Invalid character"
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
28
|
Is it possible to play a beep/sound when user enters an invalid character ( method 2 )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "`Time: ` 00:00:00;;;beep"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
27
|
Is it possible to play a beep/sound when user enters an invalid character ( method 1 )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:AllowBeep := .T.
oMaskEdit:Mask := "`Time: ` 00:00:00"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
26
|
How can I prevent showing the field's content menu when the user right clicks the control ( method 2 )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := ";;;nocontext"
oMaskEdit:Text := "text"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
25
|
How can I prevent showing the field's content menu when the user right clicks the control ( method 1 )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:AllowContextMenu := .F.
oMaskEdit:Text := "text"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
24
|
Is it possible to let user choose the inserting mode, when he presses Insert key ( method 2.2 )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "00:00;;;inserttype,overtype"
oMaskEdit:Text := "12:3"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
23
|
Is it possible to let user choose the inserting mode, when he presses Insert key ( method 2.1 )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oMaskEdit
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oMaskEdit := XbpActiveXControl():new( oForm:drawingArea )
oMaskEdit:CLSID := "Exontrol.MaskEdit.1" /*{43F80262-F652-11D3-AD39-00C0DFC59237}*/
oMaskEdit:create(,, {10,60},{610,370} )
oMaskEdit:Mask := "00:00;;;overtype,inserttype"
oMaskEdit:Text := "12:3"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|