
In that case set the styles you need explicitly instead of getting and 'or'ring them. If you have to remove the fmx form's borders, setting BorderStyle sets the WS_POPUP style which you cannot use with WS_CHILD. SetWindowLong(FMHWnd, GWL_STYLE, GetWindowLong(FMHwnd, GWL_STYLE) or WS_CHILD) An example usage could be: varįMHWnd := FmxHandleToHWND(FMForm.Handle) As is documented in SetParent function you have to set the child flag manually. The cause of the behavior is that the window manager does not know you have made your firemonkey window a child, hence it is deactivating the previously active window when you activate the firemonkey window.
#Firemonkey vs vcl full#
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,įMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.Layouts, FMX.Memo FireMonkey is not only a visual framework but a full software development framework, and retains many features available with VCL. SetWindowLong(LFMHWnd, GWL_STYLE, GetWindowLong(LFMHwnd, GWL_STYLE) or WS_CHILD)

LFMHWnd := FmxHandleToHWND(LFMForm.Handle) LFMForm.BorderStyle := TFmxFormBorderStyle.bsNone Procedure TMainForm.Button1Click(Sender: TObject) Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, System.Classes, Vcl.Graphics, Vcl.Controls, FMX.Forms, Vcl.Forms, Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, What should I do to reach a similar result with FireMonkey? I want controls on the FireMonkey form to be usable, but keep the parent form activated. When displaying a VCL form on a TPanel of another, this doesn't happen the forms apparently "merge". I have included sample projects for VCL and Firemonkey for Delphi 10.1 Berlin.

#Firemonkey vs vcl download#
The most obvious consequence of that is the window border changing color all the time. Use Delphi RTTL to support a larger number of controls without coding specifically for each control or including the unit for the control Download Source. My problem is that clicking (controls on) the embedded form causes the VCL form (containing that TPanel) to become deactivated. I used the trick described in this question to display a FireMonkey form on a TPanel in a VCL application.
