I use Basic4ppc mostly to create desktop applications, and there is something that's always been annoying me.
All the controls on desktop have the visual style of Windows 2000 (Or some other early windows-version).
When you run an application on a phone the control style changes to the Windows-mobile style.
Why doesen't the same thing happend with Vista?
I use Basic4ppc mostly to create desktop applications, and there is something that's always been annoying me.
All the controls on desktop have the visual style of Windows 2000 (Or some other early windows-version).
When you run an application on a phone the control style changes to the Windows-mobile style.
Why doesen't the same thing happend with Vista?
None of the suggestions worked.
The manifest thing didn't do anything at all.
Cableguy, I do not fully understand how to add a control from the FormExDesktop library.
Don't you mean ControlExDesktop?
:sign0085:
First of all I'm using Vista. Consequently I fail to see why I should make an XP manifest file.
And also, I wanted an answer from someone who could tell me why Basic4ppc doesn't adjust the style of basic controls (Buttons, Combo boxes, Check boxes...) depending on how thoose controls should look like!
Getting shirty when people are trying to help is not a good idea.
You DO need a manifest file, there are other options if you have Visual Studio or the SDK but manifests are easiest.
Most controls adapt automatically but you also need to use the Door library to set the FlatStyle property of Buttons, CheckBoxes And RadioButtons to "System" to get them drawn according to a theme.
A bit of research later and using the Door library I got it to work without a manifest file. This works on .NET 2.0 and later.
EDIT:- Note that on .NET 2.0 Buttons, CheckBoxes and RadioButtons no longer need their FlatStyle properties altered to support visual styles. I have amended the attachment accordingly
I don''t know, probably not as it is a .NET Framework facility which I would hope would find out if the the OS supported visual styles and fail gracefully if not. You could always ErrorLabel it to make sure.
B4X:
Sub SetAppStyle
ErrorLabel(StyleErr)
obj1.New1(False)
obj1.CreateNew("System.Windows.Forms.Application" & obj1.System_Windows_Forms)
obj1.RunMethod("EnableVisualStyles")
obj1.SetProperty("VisualStyleState", "ClientAndNonClientAreasEnabled")
StyleErr:
End Sub