tag:blogger.com,1999:blog-1532151022505671498.post1036103641602735012..comments2023-11-24T22:28:36.140+01:00Comments on Delphi sorcery: Delphi XE2 - heating up the hype: playing the matchmaker for VCL and FMXStefan Glienkehttp://www.blogger.com/profile/05509404049325709406noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-1532151022505671498.post-66491402800215771082012-05-22T12:54:37.210+02:002012-05-22T12:54:37.210+02:00Just discovered this - its a lifesaver and works w...Just discovered this - its a lifesaver and works well! Thanks.<br /><br />BUT it only seems to work if the form is a standalone form (e.g. the main form) within the application. I have an application with a number of child forms, which are embedded in the main form, setting the parent of the child form to a panel within the main form. If I then try to embed an FMX form within the child form, it fails to display (although it shows now errors). The same child form, if set as the application main form, displays the FMX form correctly.<br /><br />Is there any workaround that will allow me to do this?violamanhttps://www.blogger.com/profile/18264218160857821485noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-75741638953481177582011-09-16T11:39:01.214+02:002011-09-16T11:39:01.214+02:00Looks promising, thanks for the unit!
I’ve encoun...Looks promising, thanks for the unit!<br /><br />I’ve encountered one caveat, though: don’t set the Transparent property of the form to True; that disabled Aero on my Win7 machine (had to reboot to get it back enabled).<br /><br />Also, after setting Transparent back to False, the FMXForm got instantiated twice; once inside the VCL form, and once stand-alone. I had to manually remove the Transparent property from the .fmx resource file to get it working properly again.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-25232797897879281892011-09-06T18:45:43.874+02:002011-09-06T18:45:43.874+02:00@Stefan, yes, I failed too...
The Hydra costs $49...@Stefan, yes, I failed too...<br /><br />The Hydra costs $499.Edwin Yhttps://www.blogger.com/profile/04453313411079119897noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-75321405203003922432011-09-06T18:19:42.720+02:002011-09-06T18:19:42.720+02:00@Edwin: Yes, I think you can do that using the Win...@Edwin: Yes, I think you can do that using the Winapi.Windows.SetParent routine instead of using the property (which results in a recreation of the handle and therefor might not work). Anyway the FMX form did not show anything for me but I got it flashing when doing the Show() which indicates that something happened. I have not enough knowledge of FMX (yet) to tell what is necessary to make it work as a host for some VCL element.Stefan Glienkehttps://www.blogger.com/profile/09320735081289619570noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-8812688306339970142011-09-06T18:12:17.783+02:002011-09-06T18:12:17.783+02:00@Stefan,
But a FMX formis still a win32/win64 win...@Stefan,<br /><br />But a FMX formis still a win32/win64 window on the MS Windows platform, right? So can we make it a parent window of other windows? (I don't know much about windows API.) If yes, we can set the bounds of the child windows in a timer.Edwin Yhttps://www.blogger.com/profile/04453313411079119897noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-52139495783962690312011-09-06T12:37:32.103+02:002011-09-06T12:37:32.103+02:00@Edwin: Actually I think that's not that easy ...@Edwin: Actually I think that's not that easy (if possible at all) because as far as I have seen in FireMonkey only the window itself has a window handle. Even if you can make your VCL window child of the FMX window that doesn't do anything because FMX does not work that way.<br /><br />Maybe THAT's a task for the RemObjects guys.Stefan Glienkehttps://www.blogger.com/profile/09320735081289619570noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-71753875325531885372011-09-06T08:42:34.783+02:002011-09-06T08:42:34.783+02:00Great tip, Stefan!
I tried the other way around -...Great tip, Stefan!<br /><br />I tried the other way around - to show a **standalone* VCL form in a FMX application successfully, however, I failed to find a way embedding a VCL form into a FMX panel or a FMX form in a FMX application. Any hints?<br /><br />The code I tried: <br /><br /> frmVcl := TFrmMyVcl.Create(self);<br /> frmVcl.ParentWindow := self.Handle; <br /> frmVcl.Show;Edwin Yhttps://www.blogger.com/profile/04453313411079119897noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-62682601368544174952011-09-05T17:36:34.084+02:002011-09-05T17:36:34.084+02:00You know that FireMonkey is based on various techn...You know that FireMonkey is based on various technologies (VGScene, DXScene, GLScene) that all worked with the VCL, right?<br /><br />So I rather think the guys at Embarcadero just did not want that compatibility hell for FireMonkey right from the start so they don't support it officially although there is no reason why it should not work together. Maybe we will know since I asked that on the official forums - still waiting for some answer.<br /><br />Anyway I don't claim this is the only working solution and there is no better, if I had it I would sell it before RemObjects does.<br /><br />I just tried to provide something for those coming from VGScene or wanting to put a nice animation made with FireMonkey into their VCL application. It's up to them to test it, use it, provide feedback or ignore it.<br /><br />Btw, check your sources (http://blogs.remobjects.com/blogs/ejay/2011/08/18/p2909): Hydra is not only about mixing FireMonkey and VCL but mixing FireMonkey/WinForms and WPF/FireMonkeyStefan Glienkehttps://www.blogger.com/profile/09320735081289619570noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-37312505943544096392011-09-05T03:54:39.163+02:002011-09-05T03:54:39.163+02:00Stefan, I wasn't criticising your testing regi...Stefan, I wasn't criticising your testing regime. No amount of testing can prove that it is safe to mix FireMonkey and VCL.<br /><br />It isn't a question of there being a deliberate design constraint to prevent it, thus if you can work around that constraint you have somehow proven something. Rather it is simply that no consideration for co-existence of FM in a VCL app (or vice versa) has been given in *either* framework.<br /><br />Thus, you can prove that scenarion "A" works by building it and seeing that it works. But this tells you nothing about the viability of scenario "B" (in fact, it doesn't necessarily tell you enough about scenario "A" either as the instability may be in the form of a Heisenbug that simply hasn't yet manifested itself in that scenario either).<br /><br />The principle problem is that the message dispatch mechanism in FireMonkey is very, very different from the mechanism in the VCL. And neither mechanism expects any *other* framework to be "listening in" on that message queue.<br /><br />Until I've seen the source of the FireMonkey framework I can't say what conflicts might arise, but it's enough for me that Embarcadero have said "we don't guarantee this will work". I might find that it does work only to find myself high and dry after months of development when I finally run across a scenario that renders my application useless.<br /><br /><br />Someone might then ask how RemObjects are able to offer/claim the ability to mix FM and VCL code in Hydra...<br /><br />I would ask this in return... if it's so easy, why do they feel it's such a big deal to make it worth making a part of Hydra ?<br /><br />(and I'd also suggest that if you really have to do this, then at least shore up your applications future security with the peace of mind you will get from being able to get support from RemObjects for any failings that you might uncover... they presumably won't get much help from Embarcadero if the problem is a deep, deep conflict between the frameworks, but at least you will have the resources of RemObjects looking into it for you, rather than flailing around entirely on your own)Jolyon Smithhttps://www.blogger.com/profile/12189834837787604468noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-87001056978191362572011-09-03T20:34:25.231+02:002011-09-03T20:34:25.231+02:00Nice find Stefan. I'll be giving this a spin.Nice find Stefan. I'll be giving this a spin.Kyle A. Millerhttps://www.blogger.com/profile/00746080784088323364noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-82675810186306822002011-09-03T14:27:48.647+02:002011-09-03T14:27:48.647+02:00I'm so sorry Jolyon, that I could not make som...I'm so sorry Jolyon, that I could not make some extensive testing for something that came out like 2 days ago...<br /><br />Anyway since VCL and FMX are two separate frameworks I expect them to work together. FMX form is just a regular window that I can put whereever I want. You only have to be careful with your uses clauses and fully qualify the units to avoid ambiguity when you have both in your application.Stefan Glienkehttps://www.blogger.com/profile/09320735081289619570noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-84287819563387144072011-09-03T09:34:11.512+02:002011-09-03T09:34:11.512+02:00With DUnit-Tests Russian Roulette is also a safe g...With DUnit-Tests Russian Roulette is also a safe game as you can see here: <br /><br />http://www.youtube.com/watch?v=3ZzoB6xBWOI&feature=player_embeddedAdministratorhttps://www.blogger.com/profile/15395629568357116638noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-40751033339682568842011-09-03T01:35:18.609+02:002011-09-03T01:35:18.609+02:00Russian Roulette is a fun game to play.
"I b...Russian Roulette is a fun game to play.<br /><br />"I but a bullet in this gun put it to my head and pulled the trigger a few times and it seemed OK to me... clearly the people that make guns and ammunition don't know what they are talking about when they say they can be dangerous!"<br /><br />;)Jolyon Smithhttps://www.blogger.com/profile/12189834837787604468noreply@blogger.com