by James Chesterson (1 Submission)
Category: Custom Controls/Forms/Menus
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating:
(3 Votes)
This code allows you to embed a sub form unto a "main" form. Supports loading/unloading. Uses tabs to load and unload 3 simple sub forms.
This allows you to have cleaner code by splitting UIs into different forms instead of having invisible frames on the same form
Inputs
Takes mouse input for tabs, could be converted for buttons, images etc or keystrokes.
Side Effects
1: Sometimes there is a slight flicker when changing forms.
2: If you do not unload an embedded form when closing the program it will stay in memory.
API DeclarationsPrivate Declare Function SetParent Lib "user32" _
(ByVal hWndChild As Long, _
ByVal hWndNewParent As Long) As Long