|
-
Feb 5th, 2009, 09:14 PM
#1
Thread Starter
Member
[RESOLVED] Moving form at runtime, using code.
What I want is a control that you click and drag to move the form (Window1). This is incredibly easy in regular visual basic, but wpf manages to make it difficult because the GUI is in a separate thread...
I have the code for the click and drag part, but I need to know how to actually move the form, say, 1 pixel to the left at runtime.
What I've figured out so far is that you can make doubleanimations at runtime with:
Code:
Dim anim As New DoubleAnimation
anim.From = 0
anim.To = 360
anim.Duration() = New Duration(New TimeSpan(0, 0, 0, 0, 500))
anim.RepeatBehavior = New RepeatBehavior(4)
and so on...
but I can't figure out how to use this to actually change the window's position.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|