Problem with MaskEdBox

When I'm working with Windows 98 and Windows NT 4, and i use MaskEdBox control, it's aligment goes to the Right, How can i resolve it?, nobody can answer this question, help me.
Who is Participating?
majed100598Connect With a Mentor Commented:
!! i think that the proble with windows 98 only
- send me information about the windows version you use,visual basic vesrion you use.
- simply if you want to set the allignment to the left
use these line

at design time set the maskedbox properties like
format dd/mm/yyyy
mask ##/##/#####

at code for example at new data entrey

maskedbox1.mask=" "
maskedbox1.text=" "

set on gotfocus method of maskedbox


its will work fine
I can tell you how to solve this.
1. dont use a maskEdBox.
2. use format on onfocus
3. use selectcase or if then.. to allow nums/keys/whatever on keypress
Maskedboxes tend to be buggy.  By doing it my way..the extra code can
be put in a module and reused in all apps.
good luck
Try to use ltrim or rtrim command.
7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

expertosAuthor Commented:
I don't want to use a textbox, i want to resolve the problem with MaskEdBox, because i'm using it on all my aplicattions and it runs very well on windows 95. thank you
Hi !
Is it what you mean when at win95 its left align but on winnt its right align ??
you can't change the alignement with a maskeditbox, it's always a left alignement.
- try to compile your program on winnt with you programmed it under win95/98 (or on win95/98 if you programmed it under winnt).
- check your mask

it's all i can propose you.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.