Results 1 to 2 of 2

Thread: Setting another program maximized

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    269

    Setting another program maximized

    Hey guys,

    I just cannot get this code to work. I am trying to make another programs window fullscreen so i have been trying to double click its window (which makes it fullscreen normally)

    Here is what I am using. I wonder is there a simpler way to tell the program, run in fullscreen mode. If there was a better way than below I would love to see it.

    Thx
    KT

    VB Code:
    1. Private Sub Command314_Click()
    2. Dim abc As Long
    3.  
    4. param = MakeLong(200, 200)
    5.  
    6. Call SendMessage(whwnd, WM_LBUTTONDBLCLK, 0, param)
    7.  
    8. End Sub
    9.  
    10. Public Function PadString(ByVal sIn As String, ByVal Length As Long, ByVal PadChar As String)
    11.  
    12. If Len(sIn) < Length Then
    13.    PadString = String$(Length - Len(sIn), PadChar) & sIn
    14. Else
    15.     PadString = Left$(sIn, Length)
    16. End If
    17.  
    18. End Function
    19.  
    20. Public Function MakeLong(ByVal LoWord As Integer, ByVal HiWord As Integer) As Long
    21.  
    22. MakeLong = Val("&H" & PadString(Hex(HiWord), 4, "0") & PadString(Hex(LoWord), 4, "0"))
    23.  
    24. End Function

  2. #2
    Fanatic Member pradeepkrao's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey
    Posts
    534

    HI

    Hi,

    Use the following..

    hWnd = FindWindow(vbNullString,"Caption Of the window")

    ShowWindow(hWnd,SW_MAXIMIZE)

    Regards,
    Pradeep
    Learn by others experience as you cannot live long to experience them all.
    www.freewebs.com/pradeepkrao

    LOOK AT MY GAMES AT MY WEB SITE.

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