Site Search:
Sign in | Join | Help

Forms created using VS Tools for GP is not centered

Last post 03-05-2008 10:49 PM by Jayson Valencia. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-04-2008 3:01 AM

    Forms created using VS Tools for GP is not centered

    Hi Guys,

    Have you ever encountered GPaddin forms not centering even if you already set the property to centerscreen? Does anybody encountered this also or it's just me? If so, does anybody know how to resolve this issue?

    JAYSON VALENCIA
    MCP/MCTS
    DEVELOPMENT TEAM LEAD
    IDEALSOFT
    Filed under:
    • 203.125.138.46
  • 03-04-2008 10:21 PM In reply to

    Re: Forms created using VS Tools for GP is not centered

    Hi Steve,

     Can you answer this?

    JAYSON VALENCIA
    MCP/MCTS
    DEVELOPMENT TEAM LEAD
    IDEALSOFT
    • 203.125.138.46
  • 03-05-2008 9:28 AM In reply to

    Re: Forms created using VS Tools for GP is not centered

    Sorry, Jason... I'm not sure that this is possible. Custom forms are not opened INSIDE of dynamics, but reside outside. It may not be possible. I'll leave this thread open, maybe someone else knows?

    Anyone else care to chime in? Even to say it's not possible? A bad answer is still an answer.

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • 216.77.101.2
  • 03-05-2008 9:35 PM In reply to

    Re: Forms created using VS Tools for GP is not centered

    Thanks Steve, I appreciate all your help. Maybe somebody else can do this, I'll be trying to programmatically setting the form position based on the screen size for the mean time. It could be a work around - an ugly workaround though

     

    JAYSON VALENCIA
    MCP/MCTS
    DEVELOPMENT TEAM LEAD
    IDEALSOFT
    • 203.125.138.46
  • 03-05-2008 10:49 PM In reply to

    Re: Forms created using VS Tools for GP is not centered

    Here is the code:

        Public Sub CenterForm(ByRef oFrm As System.Windows.Forms.Form)
            oFrm.SetBounds((System.Windows.Forms.Screen.GetBounds(oFrm).Width / 2) - oFrm.Width / 2, _
                            (System.Windows.Forms.Screen.GetBounds(oFrm).Height / 2) - oFrm.Height / 2, oFrm.Width, oFrm.Height, Windows.Forms.BoundsSpecified.Location)
        End Sub

    JAYSON VALENCIA
    MCP/MCTS
    DEVELOPMENT TEAM LEAD
    IDEALSOFT
    • 203.125.138.46
Page 1 of 1 (5 items)