Solved

Problem with MaskEdBox

Posted on 1998-12-07
7
243 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

746 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

12 Experts available now in Live!

Get 1:1 Help Now