Solved

Problem with MaskEdBox

Posted on 1998-12-07
7
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…

705 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