Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Updown in a textbox

Posted on 1998-10-14
3
Medium Priority
?
211 Views
Last Modified: 2010-04-30
Anybody know how to place a updown control inside a textbox?
Thanks
0
Comment
Question by:Calibus
  • 2
3 Comments
 
LVL 4

Expert Comment

by:mcix
ID: 1439958
What do you mean by place it inside a TextBox?
0
 
LVL 4

Accepted Solution

by:
mcix earned 400 total points
ID: 1439959
This would actually put it "inside" a TextBox:

Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Form_Load()
    Dim mlngAPIResult As Long
   
    mlngAPIResult = SetParent(UpDown1.hWnd, Text1.hWnd)
    UpDown1.Left = Text1.Width - UpDown1.Width - 50
    UpDown1.Top = 0
End Sub

0
 
LVL 1

Expert Comment

by:mr_krishna
ID: 1439960
Place one textbox control and updown control in a form.
Set the following buddy control properties.
Goto custom properties. Here buddy tab page. In this page
set Buddy control property to "text1" and buddy property to "text".
When you set the buddy control property to text1 it automatically aligned the text box. This look likes spin control.
If you want to change the Min, Max, value properties of buddy control whatever you want.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Suggested Courses

972 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