Solved

Problem with MaskEdBox

Posted on 1998-12-07
7
249 Views
Last Modified: 2013-12-26
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.
0
Comment
Question by:expertos
7 Comments
 
LVL 3

Expert Comment

by:myqlG
ID: 1488753
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
0
 

Expert Comment

by:neelam_s
ID: 1488754
Try to use ltrim or rtrim command.
0
 

Author Comment

by:expertos
ID: 1488755
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
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 3

Expert Comment

by:Sendoh
ID: 1488756
Hi !
Is it what you mean when at win95 its left align but on winnt its right align ??
0
 
LVL 2

Expert Comment

by:cedricd
ID: 1488757
you can't change the alignement with a maskeditbox, it's always a left alignement.
0
 
LVL 2

Expert Comment

by:cedricd
ID: 1488758
- 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.
0
 
LVL 2

Accepted Solution

by:
majed100598 earned 200 total points
ID: 1488759
!! 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=" "
maskedbox1.mask="##/##/####"

set on gotfocus method of maskedbox

maskedbox.selstart=0
maskedbox.selslen=len(maskedbox1.text)

its will work fine
by: m_salah@hotmail.com
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Write data from SQL to CSV file - position 1 52
VBA color chart bars 12 77
Child Form in front 4 37
VB6 ListBox Question 4 32
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now