-
1 Attachment(s)
VB6 - Add-in tools
i updated the Tab-strip add-in:
1 - added the windows maximizated, but, seems, these part autor add it on another version: https://www.vbforums.com/showthread....sing-hooking);
2 - added: when we create a form the AutoRedraw is True and ScaleMode is pixels;
3 - added some nice classes(Pixels(GDIPlus), image(DIB's), and more)\functions(APIDoEvents())(add the DLL with Project-References for use them).. PS: we can't use the CConsole class with a form(the form will freeze until we close the Console);
the VB6 can be Absolete, but i love it and we can make allmost everything with it ;)
Attachment 196104
-
Re: VB6 - Add-in tools
the IDE have 1 big bug\problem: everytime you maximize de window(by API or VB code), the IDE loses is focos....
so, the best solution and tested: is before maximize, save the HWND IDE:
Code:
Dim hwndIDE As Long
Public Function GetIDEHwnd() As Long
' A classe do IDE do VB6 é "wndclass_desked_gsk"
GetIDEHwnd = FindWindow("wndclass_desked_gsk", vbNullString)
End Function
Public Sub MaximizeEverything()
On Error Resume Next
Dim win As VBIDE.Window
hwndIDE = GetIDEHwnd() ' Pega o pai
' 1. Maximiza tudo (mantendo seu loop original)
For Each win In gVBInstance.Windows
If win.Type = vbext_wt_Designer Then
Dim hDesigner As Long
hDesigner = win.hwnd
If hDesigner <> 0 Then
ShowWindow hDesigner, SW_MAXIMIZE
End If
ElseIf win.Type = vbext_wt_CodeWindow Then
win.WindowState = vbext_ws_Maximize
End If
Next win
' 2. O Pulo do Gato: Força o IDE principal a retomar o foco do SO
' Isso força o Windows a redesenhar todas as janelas filhas (MDI)
If hwndIDE <> 0 Then
SetForegroundWindow hwndIDE
End If
End Sub