Prod.: Engine, ver.: 6020, ID: 60001295, Wish : I wish to set the StartPosition to the VectorDraw subforms

Wish : I wish to set the StartPosition to the VectorDraw subforms

Article60001295
TypeWish
ProductEngine
Version6020
Date Added1/28/2011
FixedYes [6/3/2011]
Submitted byvissarion giorspiros
Keywords

Subject

I wish to set the StartPosition to the VectorDraw subforms

Summary

I wish to set the StartPosition to the VectorDraw subforms like for the linetype dialog.

Solution

In version 6021 we added a new static class in VectorDraw.Professional.Dialogs that can be used to set the starting point of vectordraw dialogs.
This static class is named as vdrawDialogProperties and has the following static properties

summary>Gets or sets the System.Drawing.Point that represents the upper-left corner of the System.Windows.Forms.Form in screen coordinates.
public static System.Drawing.Point Location

summary>Gets or sets the starting position of the form at run time.
public static FormStartPosition StartPosition

This class can be used as following for example to the Linetype dialog
VectorDraw.Professional.Dialogs.vdrawDialogProperties.StartPosition = FormStartPosition.Manual;
VectorDraw.Professional.Dialogs.vdrawDialogProperties.Location = new Point(10, 10);
VectorDraw.Professional.Dialogs.GetLineTypeDialog.Show(vdFramedControl.BaseControl.ActiveDocument, this, "", true);
VectorDraw.Professional.Dialogs.vdrawDialogProperties.StartPosition = FormStartPosition.WindowsDefaultLocation; //Remember to set the value back since this is a static property!