Announcement

Collapse
No announcement yet.

Screen location

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Screen location

    I think I know how ot do this and am going to drive on with my thoughts but can someone confirm this:

    If I want to start my app in the VERY top left corner each time, how would you do it?

    I'm assuming get screen size, get left side of screen, that's the tricky part...


    Scott


    ------------------
    Scott
    mailto:[email protected][email protected]</A>
    MCSE, MCP+Internet
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    Hi Scott,
    Can't you just use the SetWindowPos API with X and Y set to 0
    for SDK or use 0's in the x and y coordinates in the Dialog New
    statement for DDT?

    ------------------
    [email protected]



    [This message has been edited by Wyman A Belts (edited July 02, 2000).]

    Comment


    • #3
      Scott --

      Wyman is right... Unless you're dealing with a multiple-monitor system (98/ME/2000 only) the top-left corner of the screen will always be 0,0. Hmmm... That is, unless somebody has dragged the Tak Bar to the left edge of the screen. Here is some code for getting the "work area" of the desktop, i.e. everything except the Task Bar...

      Code:
      #INCLUDE "WIN32API.INC"
      DIM Rect1 AS LOCAL RECT 
      SystemParametersInfo %SPI_GETWORKAREA, BYVAL 0, VARPTR(Rect1), 0
      Then the elements of Rect1 (Rect1.nLeft etc.) will contain the numbers you need.

      -- Eric

      ------------------
      Perfect Sync: Perfect Sync Development Tools
      Email: mailto:[email protected][email protected]</A>

      "Not my circus, not my monkeys."

      Comment


      • #4
        OK Thanks

        I thought I had known that, but I remember VB confusing me...




        ------------------
        Scott
        mailto:[email protected][email protected]</A>
        MCSE, MCP+Internet
        Scott Turchin
        MCSE, MCP+I
        http://www.tngbbs.com
        ----------------------
        True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

        Comment

        Working...
        X