Passing "commands" to other forms

I have have two forms:

form1.vb
remoteMove.vb

and I have this command in the actions of button1 in RemoteMove form
and this is the code:

Form1.PosM.X += 5
Form1.PosM.Y -+ 5

and PosM is (in Form1) :

Public PosM As Point

so the program doesn't have any problem recognizing the variables...
but when i press the button,
the positions of the object that I am painting on the form doesn't change!...

what's wrong with this

if you guys want, I can post the codes...

Thanks!
Keehun Nam



Answer this question

Passing "commands" to other forms

  • PAS30339

    hi,

    i guess if you post the code will be better

    best regards



  • James Agnew

     

     

    A  write-only property in  form1

     

        Public WriteOnly Property MoveObject() As Point

           

            Set(ByVal value As Point)

                TextBox1.Location = value

            End Set

        End Property

     

    Called in form2 thusly ……

     

       Form1.MoveObject() = New Point(50, 50)

     

     

     



  • Drew Wildner

    Does your onpaint use these values If so, call Invalidate() in the form to force it to redraw itself.



  • Passing "commands" to other forms