Solved

Problem with MaskEdBox

Posted on 1998-12-07
7
256 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA error replacing data 6 40
passing parameter in sql procedure 9 63
Copy a row 12 62
Sub or Function is not defined 6 29
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

773 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