Win7 x64, Delphi Xe2 update2
Prompt:
The new project, compile as x32, are applied visual (vcl) styles in the project options, by default one is chosen
On the form the button1 and WebBrowser1
In the button we write WebBrowser1.Navigate ('http://google.com');
We start, we press the button - in a browser we see a site google.com, all ок
We compile as x64, it is started ок, by button pressing we receive an error "float division on zerro".
Questions:
At all so (error)? And as with it to struggle? (in x64 mode)
How to apply visual style to strips of scrolling WebBrowser1? (in x32 mode)
:( a native component could not skin, but AlphaControls Skin system - work ok, and webbrowser scrolling lines skinned normal
p.s. update3 yet did not put
p.s.s. bad english: on
This can be done subclassing the TWebBrowser component and handling these events
OnDocumentComplete
OnNavigateComplete2
OnBeforeNavigate2
OnCommandStateChange
OnProgressChange
plus the WM_SIZE windows message.
The key is use the TScrollbar component and a Twincontrol as container to overlap the original webbrowser scrollbars.
I just wrote an article which explains in depth how this can be implemented Delphi Vcl Styles and TWebBrowser
VCL styles cannot be applied to TWebBrowser AFAIK. Its UI is controlled by Internet Explorer, not the VCL.
Related
I am developing a mobile app in FMX where i need Popupmenu but it is showing disable in Tool Palette i cant use it but in VCL its enabled in Tool Palette and can use it. I just want to know if Firemonkey supports Popupmenu or my installation is having problems or we have to use other tools instead of Popupmenu in FMX? or what else can I do?
and actually i opened one VCL project and copied popupmenu from there to FMX and wrote code on one button and that code is
procedure TFRM_Party.BTN_Party_OptionClick(Sender: TObject);
begin
PopupMenu1.Popup(10,10);
PopupMenu1.Parent := Self;
end;
this code is not showing any error and also not performing also.
what to do? anybody having idea?
The short answer to your question is "Yes", you ought to be able to use the FMX version of TPopupMenu in a project created from File | New |Multi-Device Application in the IDE. If you can't find the FMX TPopupMenu on the Component Palette, something must be wrong with your Delphi install. I'm not quite sure what you mean when you say that it's "disabled" - components are usually either on the Component Palette or not, I don't recall seeing one looking disabled there.
You don't say in your question which version of Delphi you are using, but if it has FireMonkey at all, AFAIK it definitely ought to have the FMX version of TPopupMenu.
In Delphi 10.2 Seattle, for example, the FMX TPopupMenu appears on the "Standard" tab of the component palette, and is contained in the source unit FMX.Menus along with TMenuBar and TMainMenu, amongst others.
If you go to Component | Install packages in the IDE, the pop-up should show Embarcadero FMX Standard Components in the list, which is the file dclfmxstd250.bpl in the bin folder of your Delphi install. If that package isn't listed, that explains why you can't find the FMX TPopupMenu, but if that's the case for you, your Delphi ought to be lacking a lot more FMC components besides TPopupMenu. However, it should be easily solved by installing the .bpl file (or equivalent in your Delphi version). If the package is there, clicking the Components button to the bottom right of the pop-up should bring up the entire list of FXM standard components (which in my case does include TPopupMenu).
If your Delphi does include the Embarcadero FMX Standard Components but is still lacking TPopupMenu, you might try creating a new Package, adding FMX.Menus.pas to it and compiling and installing it in the IDE.
BTW, although it is possible to set up a combined FMX + VCL project (Google for how), just because you might be able to put a VCL TPopupMenu on an FMX Form doesn't mean that it's going to work.
Components are Grayed if you can't use its on current OS(your current choice in top combobox)
I have an issue in Delphi 10.1 Berlin using VCL Styles and an external DLL.
I'm using a Nitgen DLL to enroll fingerprints in my application. The process is handled by a COM object in NBSPCOM.dll.
When I call the method to enroll, the form from the DLL appears odd. It shows the Form background, images and controls are wrong, etc.
If I compile the application in XE8, the problem vanishes and all works fine.
I can't find the class of the DLL forms to try a VCL Styles hook.
Some screenshots of the form:
Original form
Wrong Form
When you uses the VCL Styles the native winapi controls (Static, Button, RebarWindow32, ...) are styled using a WH_CBT Hook, My guess is which the dll is using a static or Button winapi control where the background of the image is drawn. To overcome this you can disable the styling of these controls using the Vcl.Themes.TStyleManager.SystemHooks property like so
TStyleManager.SystemHooks := [];
I've ran into a problem with "Vista Dialogs" in "Delphi 10 Seattle" yesterday. It seems to not work well with some VCL Styles.
This bug occured while using "Windows 10 Dark" as default style in my app.
So my immediate thought was that Vista Dialogs does not work with Custom VCL Styles, but when using "Windows" as a default style and using Windows 10 as OS the dialog works fine.
I've uploaded two pictures, one with the style applied showing the visual bug and one without it, working just fine.
Without "Windows 10 Dark" VCL Style applied
With "Windows 10 Dark" VCL Style applied
I've researched about this, this error is mentioned in other posts, but this bug is not what those posts are about...
Anybody understands why this happen? and how can I fix it?
The VCL Styles version included in RAD Studio only can style the classic dialogs, If you want full support for the New Dialogs you must use the VCL Styles Utils project.
Just install the library and add these units to your project.
uses
Vcl.Styles.Utils.Menus, //Popup and Shell Menus (class #32768)
Vcl.Styles.Utils.Forms, //dialogs box (class #32770)
Vcl.Styles.Utils.StdCtrls, //buttons, static, and so on
Vcl.Styles.Utils.ComCtrls, //SysTreeView32, SysListView32
Vcl.Styles.Utils.ScreenTips, //tooltips_class32 class
Vcl.Styles.Utils.SysControls,
Vcl.Styles.Utils.SysStyleHook;
I am trying to make the TEdit control for the program on the "Tool Properties" dialog in the Delphi IDE (*1) accept dropping files from the explorer. This works fine in Delphi 6 and 7 but no longer works in the "new" IDE of Delphi 2005 up.
In Delphi 6/7 dropping a file on the edit control triggers a WM_DROPFILES message which a hook to the WindowProc of the TEdit can catch. In the later versions, no message is received. The hook on WindowProc still works, as it receives all kinds of other messages.
The dialog layout, names and controls is unchanged as far as I can determine.
As a test I even added my own TEdit and TComboBox to the dialog to make sure it's not a problem of these specific existing controls. They are shown fine, but dropping a file doesn't work with these either.
What else could be the problem?
(*1: the one you get through Tools -> Configure Tools -> Add or Edit
This will be a new functionality in GExperts. Auto complete already works for these controls.)
The code is here:
http://sourceforge.net/p/gexperts/code/HEAD/tree/trunk/Source/IDE/GX_IdeToolPropertiesEnhancer.pas
and the actual hooking code is here:
http://sourceforge.net/p/gexperts/code/HEAD/tree/trunk/Source/Utils/GX_dzVclUtils.pas
Win7/x64, Delphi 6 Prof.
Win7 drives me crazy with his side effect. I describe it:
When I force the suggestion with Ctrl+Space, or Delphi do this automatically, the Delphi don't show the suggestion dropdown listbox, he is only bring my all opened forms to front, one by one.
This causes that what I typing is not going to editor window: it is going to any property of the active form, of the active control.
For example.
Ctrl+Space+"ShowMes..."
I don't got ShowMessage with suggestion listbox, I type ShowMess into my main form's caption.
Many times I need to make update pack's because the buttons, caption, etc got "ShowMes" or "Excep" or other property, because I type into these windows...
This function is sometimes broken on win7.
May I can restore the normal working mode without "bring all opened form to front"?
Thanks:
dd
You can disable UAC in Windows 7, see here:
http://www.petri.co.il/disable-uac-in-windows-7.htm
Also running Delphi 6 in Windows XP compatibility mode should do the trick.
See this discussion on the embarcadero forums, it's about Delphi 7, but it's the same issue:
https://forums.codegear.com/thread.jspa?messageID=204928&tstart=0
Finally see here how to run a program in XP compatibility mode:
See: http://www.w7forums.com/application-compatibility-mode-t314.html
Or: http://www.sevenforums.com/tutorials/316-compatibility-mode.html