Hi all,

well heres another issue i can't find a solution to. Look at this example
vb.net Code:
  1. Private Sub Button1_Click(sender As Object, _
  2.   e As EventArgs) Handles Button1.Click
  3.    Button1.Tag = LblPlacer.Margin
  4. End Sub
  5.  
  6. Private Sub Button2_Click(sender As Object, _
  7.   e As EventArgs) Handles Button2.Click
  8.     Button1.Margin = Button1.Tag ' this is wrong huh
  9. End Sub

so how do i do this? what i am doing is as follows, when button1 is clicked the placer location is stored in button 1's tag property, this placer label is moved elsewhere by modifying its location in some manner. when i click button 2 then button 1 is moved to the location of the placer label when button1 was clicked.

As for solutions this is just an exercise within these constraints, i know i could set a global thickness and use this but i wish for this example to use the Tag Property as although storing onto the tag is easy and examples abound, I have found no examples of what to do with an object in a tag. I'm guessing i need to use GetType for this?