x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Module to Modify eVB Window Styles

WinCEDev Page Icon Posted 2023-09-10 8:50 PM
#
Avatar image of WinCEDev
Factor Fanatic

Posts:
52
Location:
Europe
Status:
This module lets you set various styles and other window properties in your eVB applications.

Various helper functions are provided for common actions, or you can use GetStyle/LetStyle and GetExStyle/LetExStyle to easily set or clear additional styles. Check out the readme file included in the repository for all functions.

For example, to add a maximize and minimize button to the form, you can modify Form_Load as follows:
 
Private Sub Form_Load() 
FormExtensions_LetMaximizeBox Me, True
FormExtensions_LetMinimizeBox Me, True
End Sub

Other features include:

  • Make the window resizable.

  • Add an OK button to the window (requires subclassing).

  • Set the tool window style (window will not appear in the taskbar).

  • Make the window always on top.


The example project demonstrates all of these functions.
To get started, download the repository from the link below, and add the FormExtensions.bas module to your project.

Known Issues:

  • Not all styles work properly in the emulator. They do however work properly on the device.

  • Not strictly an issue, but it appears that in Windows CE, the values for WS_MAXIMIZEBOX and WS_MINIMIZEBOX are switched compared to desktop Windows. The constants in the module have been updated to reflect this. If anyone knows more about this or if it was ever documented anywhere by Microsoft, I would love to know!


Links:

GitHub Repo


Edited by WinCEDev 2023-09-10 9:19 PM




(app.png)



(app_minmaxresize.png)



Attachments
----------------
Attachments app.png (1KB - 0 downloads)
Attachments app_minmaxresize.png (1KB - 0 downloads)
 Top of the page
thenzero Page Icon Posted 2023-09-10 11:24 PM
#
Avatar image of thenzero
Subscribers
H/PC Elite

Posts:
674
Location:
United States
Status:
Wow. Neat. Thanks!
 Top of the page
Jump to forum:
Seconds to generate: 0.203 - Cached queries : 58 - Executed queries : 11