Developing for Dynamics GP

by David Musgrave (Perth, WA, Australia) and the Microsoft Dynamics GP Developer Support Team (Fargo, ND, USA)

Controlling a Visual Studio Tools Window Position

Controlling a Visual Studio Tools Window Position

  • Comments 3

David MeegoMohammad Daoud has found a great technique to control the initial location of a Visual Studio Tools window, so that it is centered on the screen regardless of resolution.

Please have a look at his blog post for more information: 

Starting the Dynamics GP AddIn form centered in the screen

Thanks for the great work.

David

  • Posting from the Dynamics GP Blogster

    http://dynamicsgpblogster.blogspot.com/2009/02/developing-for-dynamics-gp-weekly.html

  • Forum Post by Borvik

    www.tek-tips.com/viewthread.cfm

    Helpful code.

  • Hi David!

    I clicked on the link to Mohammad's blog and get a 'sorry this page does not exist'.

    Thinking I need to subscribe to the site to be able to get to it, I tried to add my email address and hit submit.  got back:

    "

    Server Error in '/DynamicsInnovations' Application.

    --------------------------------------------------------------------------------

    The ConnectionString property has not been initialized.

     Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: The ConnectionString property has not been initialized.

    Source Error:

    Line 9:          If Me.btr_email.Value = "" Then Exit Sub

    Line 10:         Dim MainConn As New System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnectionString"))

    Line 11:         MainConn.Open()

    Line 12:         Dim SQLCmd As New System.Data.SqlClient.SqlCommand("Select * From Contacts WHERE eMail = '" & Me.btr_email.Value & "' IF @@RowCount < 1 INSERT INTO Contacts (EMAIL) VALUES ('" & Me.btr_email.Value & "')", MainConn)

    Line 13:         SQLCmd.ExecuteNonQuery()

    Source File:  \\boswinfs03\home\users\web\b598\whl.daoudm\DynamicsInnovations\RSS2MAIL.aspx    Line:  11

    Stack Trace:

    [InvalidOperationException: The ConnectionString property has not been initialized.]

      System.Data.SqlClient.SqlConnection.PermissionDemand() +4876819

      System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +20

      System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117

      System.Data.SqlClient.SqlConnection.Open() +122

      ASP.rss2mail_aspx.Page_Load(Object sender, EventArgs e) in \\boswinfs03\home\users\web\b598\whl.daoudm\DynamicsInnovations\RSS2MAIL.aspx:11

      System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14

      System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35

      System.Web.UI.Control.OnLoad(EventArgs e) +99

      System.Web.UI.Control.LoadRecursive() +50

      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

    --------------------------------------------------------------------------------

    Version Information: Microsoft .NET Framework Version:2.0.50727.3634; ASP.NET Version:2.0.50727.3634 "

    I couldn't find a 'contact us' on his page, thought you might be able to forward this info if you have his email address.

    Take care!

    M

Page 1 of 1 (3 items)
Comments Information

PLEASE READ BEFORE POSTING

Please only post comments relating to the topic of this page.

If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.

Leave a Comment
  • Please add 2 and 6 and type the answer here:
  • Post