Where is the move-function?

  • Thread starter VBTricks.de.vu Webmaster
  • Start date
V

VBTricks.de.vu Webmaster

Hello everybody,

I've been programming using VB6 for some years now and now I want to
learn VB.net. One of the first things I'm missing most is the
Move-function for controls. Is there no function like this in .net anymore?


Thanks in advance,

Stefan

--
___________________________________www.VBTricks.de.vu
the free resource for Visual Basic, Gambas and Pascal
components, tips & complete projects

www: http://www.VBTricks.de.vu
mail: vbtricks <at> gmx <dot> net
_____________________________________________________
 
H

Herfried K. Wagner [MVP]

VBTricks.de.vu Webmaster said:
I've been programming using VB6 for some years now and now I want to learn
VB.net. One of the first things I'm missing most is the Move-function for
controls. Is there no function like this in .net anymore?

This method doesn't exist any more. Set the controls location/size
separately:

\\\
With Me.ListView1
.Location = New Point(10, 10)
.Size = New Size(100, 100)
End With
///
 
J

Jay B. Harlow [MVP - Outlook]

Stefan,
Rather then call Control.Move to move a control, you set the
Control.Location property to move the control.

Something like:

Dim aPoint As New Point(10,10)
Dim aTextBox As TextBox

aTextBox.Location = aPoint

Hope this helps
Jay
 
C

Cor Ligthert

Stefan,

To move a label a little sample, when you push the button the label goes
everytime 3 points down to the bottom right.
\\\
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click

Label1.Location = New System.Drawing.Point(Label1.Location.X _
+ 3, Label1.Location.Y + 3)
End Sub
///

I hope this helps?

Cor
 
V

VBTricks.de.vu Webmaster

Thx,

gonna write my own replacement-function.


Stefan

--
___________________________________www.VBTricks.de.vu
the free resource for Visual Basic, Gambas and Pascal
components, tips & complete projects

www: http://www.VBTricks.de.vu
mail: vbtricks <at> gmx <dot> net
_____________________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top