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

x
?
Solved

Updown in a textbox

Posted on 1998-10-14
3
Medium Priority
?
210 Views
Last Modified: 2010-04-30
Anybody know how to place a updown control inside a textbox?
Thanks
0
Comment
Question by:Calibus
[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
  • 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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

721 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