Home All Groups Group Topic Archive Search About

moving controls with in an image

Author
29 Aug 2006 10:22 AM
Adrian.Martin.Taylor
Hello

I'm affriad i'm a bit of a novice to VB but have been asked to create a
form.

I wanted to create a map which will display powerstations in thier
correct geographical positions. I have a combobox (which is linked to a
database in excel) and when the powerstation name is selected I want
the corresponding label to appear on the map in the correct position??

I have a coordinate system working on my image/map,

Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
'show X,Y for station reference purposes
    fr_coord.tb_x_coord.Value = X
    fr_coord.tb_y_coord.Value = Y
End Sub

I thought i would be able to use these coordinates to position the
label with the Moveto command but it isn't there in my version of VB

Any help would be much appreiciated

Adrian

Author
29 Aug 2006 11:07 AM
Peter Proost
In vb.NET the location property is use to position a control,
for example: Label1.Location = new System.Drawing.Point(X,Y)

Hth

Greetz, Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

<Adrian.Martin.Tay***@gmail.com> schreef in bericht
Show quoteHide quote
news:1156846948.175938.144290@75g2000cwc.googlegroups.com...
> Hello
>
> I'm affriad i'm a bit of a novice to VB but have been asked to create a
> form.
>
> I wanted to create a map which will display powerstations in thier
> correct geographical positions. I have a combobox (which is linked to a
> database in excel) and when the powerstation name is selected I want
> the corresponding label to appear on the map in the correct position??
>
> I have a coordinate system working on my image/map,
>
> Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As
> Integer, ByVal X As Single, ByVal Y As Single)
> 'show X,Y for station reference purposes
>     fr_coord.tb_x_coord.Value = X
>     fr_coord.tb_y_coord.Value = Y
> End Sub
>
> I thought i would be able to use these coordinates to position the
> label with the Moveto command but it isn't there in my version of VB
>
> Any help would be much appreiciated
>
> Adrian
>
Author
30 Aug 2006 5:27 AM
GhostInAK
Hello Adrian.Martin.Tay***@gmail.com,

"a database in Excel".. Ye Gods! 

-Boo