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:
Option Explicit Const SWP_HIDEWINDOW = &H80 Const SWP_SHOWWINDOW = &H40 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 Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Dim tWnd As Long Dim frmname As String Private Sub Form_Load() frmname = "ConsoleWindowClass" tWnd = FindWindow(frmname, vbNullString) ' Change stuff in quotes so it will shrink it!! i.e. for paint it would be "paint" MsgBox tWnd If tWnd <> 0 Then SetWindowPos tWnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW Else: MsgBox frmname & " not found!" End If End Sub Private Sub Form_Unload(Cancel As Integer) SetWindowPos tWnd, 0, 200, 0, 100, 100, SWP_SHOWWINDOW MsgBox tWnd 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?





Reply With Quote