oxygene

Is Delphi Prism a new version of Delphi .net?

巧了我就是萌 提交于 2019-12-05 09:48:20
First of all (before this question get down voted): I am a developer developing 99,99% of my programs using Delphi targeting Win32 (developing in Delphi 7 still, very slowly migrating to Delphi 2010). When Delphi 2006 or 2007 (can't remember which version at the moment) came out I bought the RAD Studio edition to be able to start developing .net applications using Delphi.net and VCL.net. I played around with it for some short time, but in the end, due to work load just kept using Delphi 7 as development platform. When Delphi 2010 came was released, I decided to give .net a go once more, and

DLL example in Oxygene

泪湿孤枕 提交于 2019-12-02 07:30:33
Can somebody tell me where to find an example in how to make an DLL (WindowsControlLibrary) in Oxygene for .NET? In the old Delphi, you make an export section. To create an Unmanaged DLL Export using Delphi Prism and call it with Delphi 2010 you must do the following: In Delphi Prism: File | New | Project In the Tree View on the Left, select Delphi Prism Select Windows Class Library Press OK. This will create the template for the Windows Class Library Right Click on the Project "ClassLibraryX" and Select Properties: Under Compatibility select "Allow unsafe code" Under Build, find the General

How to enforce single instance of an application under mono?

狂风中的少年 提交于 2019-12-02 04:25:37
问题 So, I am able to enforce single instance of my application on Windows as follows. [STAThread] class method Program.Main(args: array of string); begin var mutex := new Mutex(true, "{8F6F0AC4-B9A1-45fd-A8CF-72F04E6BDE8F}"); if mutex.WaitOne(Timespan.Zero, true) then begin Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ThreadException += OnThreadException; lMainForm := new MainForm; lMainForm.ShowInTaskbar := true; lMainForm.Visible := false;

How to prevent Closing and Disposing of a winform in the FormClosing event?

百般思念 提交于 2019-12-01 05:46:35
问题 This question may seem like a duplicate, but I just ran in to this issue while I was testing my program and I am kind of confused as to how you solve it. I have a winform and it has a form closing event. In the event, I pop open a messagebox asking the user, "Are you sure you want to close the window?." If they pushed yes button, the application closes window and prevents it from being disposed as expected. So, I can open it again. However, if they pushed no button, it still closes the window

Why are there so many $IF DEFINED(CLR) in the VCL/RTL?

限于喜欢 提交于 2019-11-29 09:07:17
I've just compared the Delphi 2009 VCL/RTL code to the 2010 one. I noticed that there are many $IF DEFINED(CLR) conditional defines and they got more in the 2010 version. I thought that these conditional defines have fall into disuse, since Delphi .NET has been discontinued. The VCL/RTL aren't really used in Delphi Prism? Or are they? We're still using Delphi.NET internally for parts of the IDE and for some of the .NET versions of DBXpress delivered with Delphi Prism. Because of that, we're maintaining the CLR portions insofar as what is needed by those parts of the product. We're also

Why are there so many $IF DEFINED(CLR) in the VCL/RTL?

六眼飞鱼酱① 提交于 2019-11-28 02:28:24
问题 I've just compared the Delphi 2009 VCL/RTL code to the 2010 one. I noticed that there are many $IF DEFINED(CLR) conditional defines and they got more in the 2010 version. I thought that these conditional defines have fall into disuse, since Delphi .NET has been discontinued. The VCL/RTL aren't really used in Delphi Prism? Or are they? 回答1: We're still using Delphi.NET internally for parts of the IDE and for some of the .NET versions of DBXpress delivered with Delphi Prism. Because of that, we

How can I pass a Delphi string to a Prism DLL?

ぃ、小莉子 提交于 2019-11-27 23:16:54
We try to pass a string from a native Delphi program to a Delphi Prism DLL. We have no problem passing integers, but strings are mismatched in the DLL. We saw Robert Love's code snippet in response to another question, but there is no code for the native Delphi program. How can we pass strings from Delphi to a Delphi Prism DLL? The best way would be to use WideString. For several reasons. It is Unicode and works before D2009 It's memory is managed in ole32.dll, so no dependency on either Delphi's memory manager or the CLR GC. You do not have to directly deal with pointers In Oxygene, you could