Results 1 to 3 of 3

Thread: Help convert to .net

  1. #1

    Thread Starter
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Help convert to .net

    VB Code:
    1. Private type RECT
    2.     Left As Long
    3.     Top As Long
    4.     Right As Long
    5.     Bottom As Long
    6.     End Structure
    7.  
    8.     Sub PositionForm()
    9.         Dim WindowRect As RECT
    10.         SystemParametersInfo(SPI_GETWORKAREA, 0, WindowRect, 0)
    11.         Me.Top = WindowRect.Bottom * Screen.TwipsPerPixelY - Form1.Height
    12.         Me.Left = WindowRect.Right * Screen.TwipsPerPixelX - Form1.Width
    13.     End Sub
    this will place the form above the taskbar, but it gives out a ton of errors. Does anyone know?

  2. #2
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    Re: Help convert to .net

    one thing i notice is your RECT. It should be like this:
    VB Code:
    1. Private STRUCTURE RECT
    2. DIM ....
    3. DIM....
    4. DIM...
    5. End STRUCTURE

  3. #3
    Member
    Join Date
    Jun 2005
    Posts
    48

    Re: Help convert to .net

    Instantiate a graphics object, then do a graphics.drawrectangle( pen, x, y, width, height)

    import system.drawing first

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width