Solved

How to set Form position when using AnimateWindow API?

Posted on 2004-08-31
1
398 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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 …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…

737 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