I have a VB6 app which queries an Oracle database, then links through to various other non VB applications with the data it has retrieved. It links to another VB6 app, a lotus notes app and an Attachmate Extra! session.
The problem I have is that the Notes and Attachmate windows do not resize properly once linked to. They will only take up three quarters of the screen and it is then impossible to maximise the window properly.
Below is some code to link to the Attachmate session.
PrevHndl = FindWindow(vbNullString, sWindow)
'Check for success.
If PrevHndl <> 0 Then
' Move window
MoveWindow PrevHndl, x, y, nWidth, nHeight, 1
'Activate the application.
result = SetForegroundWindow(PrevHndl)
ShowWindow PrevHndl, 1
If objEuroSAP Is Nothing Then
res = EnumWindows(AddressOf pfCallBack_EnumWindows, 0&)
On Error Resume Next
Set objEuroSAP = GetObject("c:\my documents\attachmate\" & Trim(gsSAPUser) & ".edp")
Any ideas anyone?