3 ms·
Off-topic: but why did they opt for Windowed (hWnd’d) controls for WinForms when VB6 seemed fine with windowless controls and while there are advantages to wind
by DaiPlusPlus 8y ago
Off-topic: but why did they opt for Windowed (hWnd’d) controls for WinForms when VB6 seemed fine with windowless controls and while there are advantages to windowed-controls (e.g. getting the latest enhancements to Common Controls) it seems WinForms defaults to using older versions and still overrides things like painting events. Almost as if WinForms couldn’t tell if it wanted to be like AWT or more like WxWidgets.
- ygra 8y agoDidn't VB use windowed controls as well? I distinctly remember everything being a ThunderSomething when looking with Spy++.
- DaiPlusPlus 8y agoVB (1-6)’s “built-in” controls like Buttons and Checkboxes were windowless, most of the others were ActiveX controls which were windowed. This carried-over to VBA where some controls are windowless built-ins and the rest are ActiveX too.
- pjmlp 8y agoVB 1 - 4 used VBX controls implemented in C, only with VB 4 came the support for COM (aka ActiveX, aka subset from OLE 2.0).
- barrkel 8y agoButtons and check boxes weren't windowless that I recall. Generally anything that could take focus needed a hwnd. Labels, lines, pictures, those kinds of things could be windowless. And of course anything implemented in a vbx or ocx would need a window.
- barrkel 8y agoWinForms wanted to be more like VCL. That's what it most closely resembled. Common controls, especially shell controls, come in different versions of comctl32 etc. and have been versioned and dynamically selected in the basis of things like application manifests for backward compatibility reasons for a long time. https://docs.microsoft.com/en-us/windows/desktop/controls/common-control-versions https://docs.microsoft.com/en-us/windows/desktop/controls/co... API structures have different sizes so code usually needs to change to support later versions.