Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem with MaskEdBox

Posted on 1998-12-07
7
Medium Priority
?
303 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 400 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…
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…
Suggested Courses

610 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