| O.P.  RE: Button in chat window K, sorry to whine again, but i'm getting an error in VB.NET saying the ShowWindow method is wrongly declared.Is it possible that in .NET, this method has new paramaters? or am I just making the worst mistake ever?
 
 Public Class FragMsnIMButton
 Private WithEvents oMessenger As MessengerAPI.Messenger
 Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
 <Runtime.InteropServices.DllImport("user32.dll")> _
 Private Shared Function ShowWindow(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
 End Function
 
 
 Private Sub FragMsnIMButton_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 oMessenger = New MessengerAPI.Messenger
 End Sub
 
 Private Sub oMessenger_OnIMWindowCreated(ByVal pIMWindow As Object) Handles oMessenger.OnIMWindowCreated
 'ShowWindow(pIMWindow.hwnd, 2) ' maximize the window so that it works
 Dim newBtn As Object
 Dim imhwnd As Long
 newBtn = New FragMsnIMButton ' create a copy of FragMsnIMButton
 imhwnd = pIMWindow.hwnd
 SetParent(newBtn.btnFrag.hwnd, imhwnd)
 newBtn.btnFrag.left = 13500 'Moving the textbox under the display picture
 newBtn.btnFrag.top = 2800 ' ^^ look up
 End Sub
 
 |