To Use A Global Variable Add it to our ap-main.h file – this is automatically included in all files (see creating a project if this file is not in your project) You can’t make strings global – only normal variable types However you can just pass a handle to a string or come other object […]
Category: Forms
Re-sizable Forms
Making Form Re-Sizable AutoScroll Set to true, to enable scroll bars when needed. You can then just add controls outside of the forms size and the scroll bars will appear to allow then to be seen. Minimum Size Set the minimum size for the form Padding Set to force a bit of space after the […]
Refresh Form
To cause form controls such as a text box to be refreshed after updating them before your code goes and does something time consuming and intensive you can use this: this->Refresh(); This does work, if it doesn't try adding a System::Threading::Thread::Sleep(200) after it.
Rename Form
You need to deal with the renaming of the resource file or otherwise you get a MissingManifestResourceException. TBC…
Right Click Menus
Create a ContextMenuStrip from the toolbox
Transparency
Transparency is actually simulated by drawing the pixels of the Parent, which is the form. Therefore you only see the form pixels, stacking effects don’t work. One approach is to just draw the images in the form’s Paint event, or consider WPF which has a very different rendering model that easily supports transparency. […]
Z Order
Force Label To Front MyLabel->BringToFront();