Softwaremaker
Fri Oct 24 20:34:54 CDT 2003
Thanks NetPointer...this is just what the doctor ordered.
Really appreciate it. I have done that before in VB Classic and the way to
implement this in .NET is similar to that of the pre.NET one.
Thanks.
William
"NetPointer" <shaileshx.s.shah@intel.com> wrote in message
news:bnch2b$fa1$1@news01.intel.com...
> This code is for drag drop..see it and understand it..
> Note: U need to set the autodrag property of textbox....
> Private Sub TextBox1_DragDrop(ByVal sender As Object, ByVal e As
> System.Windows.Forms.DragEventArgs) Handles TextBox1.DragDrop
>
> TextBox1.Text = e.Data.GetData(DataFormats.Text).ToString()
>
> End Sub
>
> Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As
> System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown
>
> Button1.DoDragDrop(Button1.Text, DragDropEffects.Copy)
>
> End Sub
>
>
>
> Private Sub Button2_MouseDown(ByVal sender As Object, ByVal e As
> System.Windows.Forms.MouseEventArgs) Handles Button2.MouseDown
>
> Button2.DoDragDrop(Button2.Text, DragDropEffects.Copy)
>
> End Sub
>
> Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles TextBox1.TextChanged
>
> End Sub
>
> Private Sub TextBox1_DragEnter(ByVal sender As Object, ByVal e As
> System.Windows.Forms.DragEventArgs) Handles TextBox1.DragEnter
>
> e.Effect = DragDropEffects.Copy
>
> End Sub
>
> Regards,
> NetPointer
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> news:%23GZ1Z%23omDHA.964@TK2MSFTNGP10.phx.gbl...
> > * "Softwaremaker" <msdn@removethis.softwaremaker.net> scripsit:
> > > Juz wondering if anyone could point me to useful links or resources
that
> > > explains how to drag and move a button all over a Windows Form ?
> >
> > You will find a sample for moving a control here:
> >
> >
>
<
http://www.mvps.org/dotnet/dotnet/samples/miscsamples/downloads/XmlSerializ
> ation.zip>
> >
> > Notice that this is different from _dragging_ a control.
> >
> > --
> > Herfried K. Wagner
> > MVP · VB Classic, VB.NET
> > <
http://www.mvps.org/dotnet>
>
>