Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

maskedbox

Posted on 1999-06-22
10
Medium Priority
?
540 Views
Last Modified: 2011-09-20
Does the MaskEdBox have an alignment property?
0
Comment
Question by:markg1
[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
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 4

Expert Comment

by:vindevogel
ID: 1518956
No, but this won't help you I guess ....
You probably want to know how to do alignment with it, right ?
0
 

Author Comment

by:markg1
ID: 1518957
yep.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 1518958
I just tried some API calls that work fine with a command button but they don't work with a masked edit box (or an ordinary text box for that matter)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:vindevogel
ID: 1518959
No good solutions I can think of.

Rewrite it yourself ?
Find another on www.activex.com ?

0
 

Author Comment

by:markg1
ID: 1518960
I'll leave the question open for awhile to see if anyone else knows.
Thanks for the effort.
0
 
LVL 3

Expert Comment

by:jbil
ID: 1518961
Try this.

'can give appearance of allingning text
'put maskedit inside picture1

Option Explicit

Dim maskAllign As String
Private Sub Form_Load()
Picture1.FontSize = MaskEdBox1.Font.Size
Picture1.BackColor = MaskEdBox1.BackColor
MaskEdBox1.BorderStyle = mskNone
maskAllign = "center" 'or "left","right"
Picture1.Height = MaskEdBox1.Height
Picture1.Width = MaskEdBox1.Width
MaskEdBox1.Text = ""
End Sub

Private Sub MaskEdBox1_Change()
Dim mywide
With MaskEdBox1
    mywide = Picture1.TextWidth(.Text & "   ")
    .Top = Picture1.ScaleTop
    .Width = mywide
End With

Select Case maskAllign
Case "center"
 MaskEdBox1.Left = Picture1.Width / 2 - MaskEdBox1.Width / 2

Case "right"
 MaskEdBox1.Left = (Picture1.Width - MaskEdBox1.Width)

Case "left"
 MaskEdBox1.Left = (Picture1.ScaleLeft)

End Select

End Sub

Private Sub Picture1_GotFocus()
MaskEdBox1.SetFocus
End Sub

0
 

Author Comment

by:markg1
ID: 1518962
THANKS
You've been a big help.
0
 

Author Comment

by:markg1
ID: 1518963
want theses points?
0
 
LVL 3

Accepted Solution

by:
jbil earned 200 total points
ID: 1518964
Sure, Thanks.


'can give appearance of allingning text
'put maskedit inside picture1

Option Explicit

Dim maskAllign As String
Private Sub Form_Load()
Picture1.FontSize = MaskEdBox1.Font.Size
Picture1.BackColor = MaskEdBox1.BackColor
MaskEdBox1.BorderStyle = mskNone
maskAllign = "center" 'or "left","right"
Picture1.Height = MaskEdBox1.Height
Picture1.Width = MaskEdBox1.Width
MaskEdBox1.Text = "" 
End Sub

Private Sub MaskEdBox1_Change()
Dim mywide
With MaskEdBox1
    mywide = Picture1.TextWidth(.Text & "   ")
    .Top = Picture1.ScaleTop
    .Width = mywide
End With

Select Case maskAllign
Case "center"
 MaskEdBox1.Left = Picture1.Width / 2 - MaskEdBox1.Width / 2

Case "right"
 MaskEdBox1.Left = (Picture1.Width - MaskEdBox1.Width)

Case "left"
 MaskEdBox1.Left = (Picture1.ScaleLeft)

End Select

End Sub

Private Sub Picture1_GotFocus()
MaskEdBox1.SetFocus
End Sub

 
 

0
 

Author Comment

by:markg1
ID: 1518965
thanks for all the time
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…
Suggested Courses

722 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