Sorry if the title is misleading, but i couldnt think of a name for it. I have a client called Trillian (like aim+msn+yahoo all in one buddylist)..

Well, i have this code ATM to find the thing and shrink it

VB Code:
  1. Option Explicit
  2. Const SWP_HIDEWINDOW = &H80
  3. Const SWP_SHOWWINDOW = &H40
  4. Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
  5. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  6. Dim tWnd As Long
  7. Dim frmname As String
  8. Private Sub Form_Load()
  9. frmname = "ConsoleWindowClass"
  10. tWnd = FindWindow(frmname, vbNullString) ' Change stuff in quotes so it will shrink it!! i.e. for paint it would be "paint"
  11.     MsgBox tWnd
  12.     If tWnd <> 0 Then
  13.         SetWindowPos tWnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW
  14.     Else: MsgBox frmname & " not found!"
  15.     End If
  16. End Sub
  17.  
  18. Private Sub Form_Unload(Cancel As Integer)
  19.     SetWindowPos tWnd, 0, 200, 0, 100, 100, SWP_SHOWWINDOW
  20.     MsgBox tWnd
  21. End Sub

well, this is for shrinking Dos windows and resizing. Im wondering, is it possible to find the windows coordinates before resizing it, so i place it exactly as it was?