Solved

How to set Form position when using AnimateWindow API?

Posted on 2004-08-31
1
379 Views
Last Modified: 2012-05-05
Using the AnimateWindow API to display a Form.  This works, but the Form position is random.

I have tried this, but the position still seems to be random:

Dim f2 As New Form2
        f2.Left = 600
        f2.Top = 600
        AnimateWindow(f2.Handle, 300, AnimateWindowFlags.AW_VER_NEGATIVE Or AnimateWindowFlags.AW_CENTER)
        f2.Show()

Thanks for any ideas.
0
Comment
Question by:mistert006
1 Comment
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 500 total points
ID: 11942896
have you tried


Dim f2 As New Form2
f2.StartPosition =FormStartPosition.Manual
        f2.Left = 600
        f2.Top = 600
        AnimateWindow(f2.Handle, 300, AnimateWindowFlags.AW_VER_NEGATIVE Or AnimateWindowFlags.AW_CENTER)
        f2.Show()
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question