forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Mask Edits
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Mon Apr 28, 2003 2:57 pm    Post subject: Mask Edits Reply with quote

I saw a recent post regarding length of input in edit boxes. Is there a way to format the input strings? For instance 999-99-9999 for social security numbers or (999) 999-9999 for telephone numbers?

I saw that VDSOBDC.dll had a mask edit function, but I can't find a help file for that to see all the capabilities. Plus, the home page of the author is in Russian, and I don't know how I would go about registering it.

I didn't know if anyone knew any other ways .... ?
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Apr 28, 2003 3:07 pm    Post subject: Reply with quote

How do you mean? Something like the Windows Calculator, which changes $ 1000,5 into $ 1.000,50 ?
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Mon Apr 28, 2003 3:24 pm    Post subject: masked edit Reply with quote

No - I'm talking more about an example like a US phone number.

For instance, in my application, I have an edit box for entering the customer phone number. Currently, there is no limit on the number of characters the user can enter, and there is no set format for entry.

It makes the application more user-friendly if they can just use the number keys and the overall format is already set to:

(___) ___-____

The same principle would apply to date entry, social security numbers, etc.

__ /__ /__ for date

___-__-____ for social security number.



Any help is appreciated - thanks
Back to top
View user's profile Send private message
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Mon Apr 28, 2003 3:30 pm    Post subject: Reply with quote

So the user just types in 5555555555, but it appears in the edit box as (555)555-5555?
_________________
"ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player...
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Apr 28, 2003 3:44 pm    Post subject: Reply with quote

This is the easiest way to do it...

Code:
  DIALOG CREATE,New Dialog,-1,0,144,56
  DIALOG ADD,EDIT,EDIT1,26,14,24,19,
  DIALOG ADD,EDIT,EDIT2,26,48,24,19,
  DIALOG ADD,EDIT,EDIT3,26,82,52,19,
  DIALOG ADD,TEXT,TEXT1,28,8,,,(
  DIALOG ADD,TEXT,TEXT2,28,40,,,)
  DIALOG ADD,TEXT,TEXT3,28,75,,,-
  DIALOG ADD,TEXT,TEXT4,8,8,,,Phone number:
  DIALOG SHOW

%x = @sendmsg(~EDIT1,$00C5,3,0)
%x = @sendmsg(~EDIT2,$00C5,3,0)
%x = @sendmsg(~EDIT3,$00C5,4,0)

:Evloop
wait event
goto @event()

:Close
exit

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Mon Apr 28, 2003 3:54 pm    Post subject: Reply with quote

There was a DLL available at one time that allowed you to do what you are asking! I can't remeber what it is called but i remeber getting if from

www.sools.com - Tommys homepage

It allowed the following plus more....

192.189.0.123
___.___.___.___

for IP address masking plus more....

Nathan
I will see if i still have it and post a link Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Apr 28, 2003 5:36 pm    Post subject: Reply with quote

I think that was the VDSOBDC.dll....
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Mon Apr 28, 2003 6:18 pm    Post subject: Reply with quote

Thanks for the replies!

Yes, it is VDSODBC that has that function in it. But like I was saying, I can't find a help file for that when I download it, and the site is in Russian.

Thanks for the code example. I'll work through it and see if it is applicable for what I need. I was hoping I would find a simple function in another .dll that would provide a masked edit.

Again, thanks for the responses -
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Apr 28, 2003 7:58 pm    Post subject: Reply with quote

There's also this unsuccessful example which was an attempt to
automatically advance the cursor to the next edit. But it didn't work. Sad

Code:
Title Input Test
  DIALOG CREATE,Input Test,-1,0,240,97
  DIALOG ADD,TEXT,TPrompt,13,13,,,Please enter your serial number:
  DIALOG ADD,EDIT,Number1,28,14,46,19
  DIALOG ADD,EDIT,Number2,28,68,46,19
  DIALOG ADD,EDIT,Number3,28,122,46,19
  DIALOG ADD,EDIT,Number4,28,176,46,19
  DIALOG ADD,TEXT,D1,32,61,,,-
  DIALOG ADD,TEXT,D2,32,116,6,13,-
  DIALOG ADD,TEXT,D3,32,170,4,13,-
  DIALOG ADD,BUTTON,OK,60,78,64,24,OK
  DIALOG SHOW
  DIALOG DISABLE,OK
 %%inlen = 6
%x = @sendmsg(~Number1,$00C5,%%inlen,0)
%x = @sendmsg(~Number2,$00C5,%%inlen,0)
%x = @sendmsg(~Number3,$00C5,%%inlen,0)
%x = @sendmsg(~Number4,$00C5,%%inlen,0)


:Evloop
  wait event,
  goto @event()
:Timer
%%String = @dlgtext(Number1)@dlgtext(Number2)@dlgtext(Number3)@dlgtext(Number4)
if @equal(@len(%%string),@fmul(%%inlen,4))
DIALOG ENABLE,OK
else
DIALOG DISABLE,OK
end
 if @equal(@focus(),Number1)
    if @equal(@len(@dlgtext(Number1)),%%inlen)
     DIALOG FOCUS,Number2
   end
 elsif @equal(@focus(),Number2)
    if @equal(@len(@dlgtext(Number2)),%%inlen)
     DIALOG FOCUS,Number3
   end
 elsif @equal(@focus(),Number2)
   if @equal(@len(@dlgtext(Number2)),%%inlen)
    DIALOG FOCUS,Number3
   end
 elsif @equal(@focus(),Number3)
   if @equal(@len(@dlgtext(Number3)),%%inlen)
    DIALOG FOCUS,Number4
   end
 elsif @equal(@focus(),Number4)
   if @equal(@len(@dlgtext(Number4)),%%inlen)
    DIALOG FOCUS,OK
   end
 end
 goto evloop
:OKBUTTON
:Close
warn You entered the following string:@cr()%%String
  exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Tue Apr 29, 2003 1:05 am    Post subject: Reply with quote

I've updated the VDSOBJ02.DLL 2.4.28.2003, it now has a fully functional maskedit control. It allows user definable masks and comes with an example for social security, phone number, zip, date, time. The help file explains each special mask character you can use so you can easily create your own custom masks. You can get the updated VDSOBJ at:

DOWNLOAD HERE
Back to top
View user's profile Send private message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Tue Apr 29, 2003 1:26 am    Post subject: Mask Edit Reply with quote

Sweet!

This looks like just what I need! I've downloaded the file and will check it out tomorrow more thoroughly. It looks like exactly what I was looking for.

If so, I'll be purchasing it. Thanks -
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Tue Apr 29, 2003 3:31 am    Post subject: Reply with quote

Try the vds 4 example 3 script. It is a complete example of using multiple maskedit's.
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Apr 29, 2003 6:53 pm    Post subject: Reply with quote

Nice job, Prakash. Thumbs Up
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Apr 29, 2003 6:55 pm    Post subject: Reply with quote

You really like the new smileys, don't you? Wink
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Apr 29, 2003 6:59 pm    Post subject: Reply with quote

Well I would think we should use them if they're there. Razz Wink

Yes I do like them. Very Happy

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group