|
-
Sep 13th, 2005, 10:03 AM
#1
Thread Starter
New Member
AnimateWindow Problem
When my program loads, I would like the form to slide smoothly up from the task bar just like alert messages in Microsoft AntiSpyware. I have gotten my form to slide up, but it is not smooth and there is weird looking black area above the form as it is sliding up.
What could be causing this?
-
Sep 13th, 2005, 10:08 AM
#2
-
Sep 13th, 2005, 10:20 AM
#3
Re: AnimateWindow Problem
Have you tried my submission from the CodeBank? I suggest using the code from post #22. You can add the FormAnimator class to your project and then you would simply add a class-level variable to your Form of type FormAnimator something like this:
VB Code:
Private animator As New FormAnimator(Me, _
FormAnimator.AnimationMethod.Slide, _
FormAnimator.AnimationDirection.Up, _
300)
and you should find that it slides up smoothly.
-
Sep 13th, 2005, 02:15 PM
#4
Thread Starter
New Member
Re: AnimateWindow Problem
jmcilhinney,
Your code was very similiar to mine, but I tried yours and it has the exact same problem. I'm using a custom shape form with transparency(not Regions), could that have something to do with it?
-
Sep 13th, 2005, 07:12 PM
#5
Re: AnimateWindow Problem
 Originally Posted by Tyler-2000
jmcilhinney,
Your code was very similiar to mine, but I tried yours and it has the exact same problem. I'm using a custom shape form with transparency(not Regions), could that have something to do with it?
I'm quite sure it does. The form probably can't be redrawn quickly enough to keep up with the animation. You could try increasing the duration a bit, but I'm not confident that that will make a difference. You could try using the Blend effect instead, so your form behaves like the Outlook new mail notification, although I'm not sure that will make a difference either.
-
Sep 14th, 2005, 09:08 AM
#6
Thread Starter
New Member
Re: AnimateWindow Problem
Making the duration longer helped a little, it made the black bar thinner. The blend effect just goes from black to the form instantly. Then I tried Centre with a duration of 50, and the black area is hardly noticeable so I may keep it that way.
I'm wondering how fast a PC needs to be to draw a custom form with a slide animation smoothly. My system is a P4 2.4Ghz with a geforce4 128mb.
Last edited by Tyler-2000; Sep 14th, 2005 at 09:11 AM.
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
|