Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with adding AXDataSource sample

Status
Not open for further replies.

gcole

Programmer
Aug 2, 2000
390
US
I have the following code from the example in VB6.0 that comes with Visual Studio. It is not working. How can I assign the hieght,width,top and left properties so the buttons are in the right position?

Private Sub UserControl_Resize()
'This code will execute when the MyData is initialized or
'whenever it is resized to rearrange the constituent
'controls and provide a consistent appearance
lblCaption.Move 0, 0, Width, Height
CmdFirst.Move 0, 0, cmdFirst.Width, Height - 60
CmdPrev.Move CmdFirst.Left + CmdFirst.Width, 0, _
CmdPrev.Width, Height - 60
CmdLast.Move (Width - CmdLast.Width) - 60, 0, _
CmdLast.Width, Height - 60
CmdNext.Move CmdLast.Left - CmdNext.Width, 0, _
CmdNext.Width, Height - 60
lblCaption.Height = TextHeight("A")
lblCaption.Move CmdPrev.Left + _
CmdPrev.Width, ((Height - 60) _
/ 2) - (lblCaption.Height / 2), _
CmdNext.Left - (CmdPrev.Left _
+ CmdPrev.Width)
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top