Questions tagged [delphi-xe2]

Delphi XE2 is a specific version of Delphi. Delphi XE2 was released on September 1, 2011 and is available as a standalone product or as part of RAD Studio XE2.

delphi-xe2
Filter by
Sorted by
Tagged with
153 votes
1 answer
23k views

SOAP server and client application VCL+indy demo for Delphi XE?

Delphi used to include a demos folder for web Services, but no longer seems to include this. I just tried the Delphi 7 demo projects (SOAPDMServerWAD, a server with almost no UI at all, and ...
Warren  P's user avatar
  • 67.2k
147 votes
2 answers
8k views

How to create "No Activate" form in Firemonkey

In XCode by adding these methods to your NSView subclass can prevent the window from becoming active when clicking on it: - (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent )theEvent { return YES;...
mh taqia's user avatar
  • 3,556
99 votes
1 answer
2k views

Required tags not present when using Delphi XML Data Binding Wizard

I am using the XML Data Binding Wizard in Delphi XE2. The schema has required tags of this type: <xs:element name="MyReport" type="MyReportType" /> <xs:complexType name="MyReportType"> &...
Randomeister's user avatar
  • 1,125
73 votes
2 answers
2k views

Webview not displaying in MacOS using Delphi XE2

I have started to convert the Webview interfaces to be consumed in Delphi. I have managed to get the webkit library to load, and the interface methods that is called appears to work correctly, ...
Phillip Roux's user avatar
  • 1,029
67 votes
1 answer
2k views

BcdDivide function behave differently in Delphi XE and XE2

FmtBcd.pas has been extensively revised rewritten in Delphi XE2. In one of my projects, I have a case that uses a division operation on two Bcd values, but the two versions yield different results. In ...
Chau Chee Yang's user avatar
58 votes
4 answers
2k views

Remote debugging with XE2 - display of strings

I'm remote debugging a large app between DElphi XE2 (update #4) and a Windows XP target. PAServer is running on the target and the application works fine and stops at breakpoints (you would NOT ...
Brian Frost's user avatar
  • 13.3k
54 votes
2 answers
7k views

Is COM broken in XE2, and how might I work around it?

Update: XE2 Update 2 fixes the bug described below. The program below, cutdown from the real program, fails with an exception in XE2. This is a regression from 2010. I don't have XE to test on but I'...
David Heffernan's user avatar
54 votes
4 answers
1k views

Midi Timing Issues with Delphi ASIO VST and MiniHost

I'm coming from a background of using MSC* MidiSequencer for a Delphi XE2 project and have been playing with DelphiASIOVST this weekend on the off chance the MIDI may be stable enough to use as my ...
Charles R. Thompson's user avatar
51 votes
0 answers
2k views

How do I write a TDBCtrlGrid VCL Style custom class?

There are lots of questions here about XE2 VCL Styles and custom colors for Buttons, Panels, edits, etc, and VCL Styles. As much as I wish the existing questions covered it, they don't... So DB ...
Warren  P's user avatar
  • 67.2k
45 votes
1 answer
1k views

Compiler bug when using generics and forward declaration in Delphi XE2

I started project on Delphi 2010, then migrated to XE and now I try to migrate to XE2. After compiling in XE2 (Update 4 Hotfix 1), unit tests began fail with AV. After some debugging, it became clear ...
Chaa's user avatar
  • 486
44 votes
5 answers
8k views

TThreadedQueue not capable of multiple consumers?

Trying to use the TThreadedQueue (Generics.Collections) in a single producer multiple consumer scheme. (Delphi-XE). The idea is to push objects into a queue and let several worker threads draining ...
LU RD's user avatar
  • 34.7k
39 votes
6 answers
108k views

Using Case Statement with String

Say i have a string 'SomeName' and wanted the values return in a case statement. Can this bedone? Can strings be used in a case statement like so Case 'SomeName' of 'bobby' : 2; 'tommy' :19; ...
Glen Morse's user avatar
  • 2,533
38 votes
1 answer
5k views

Firemonkey ScrollBox Bug

We are experiencing what seems to be a strange bug in Firemonkey's ScrollBox component (since TGrid inherits from TScrollBox it also affects all grids). On some ouf our development machines, ...
jpfollenius's user avatar
  • 16.5k
38 votes
1 answer
1k views

Is there a trick for using TSQLMonitor with a TSQLConnection that uses the new ODBC dbExpress driver?

I have been testing the new ODBC dbExpress driver that ships with Delphi XE2, and have noticed that the TSQLMonitor does not seem to work. Thinking that I may have configured the component incorrectly,...
Cary Jensen's user avatar
  • 3,761
36 votes
3 answers
35k views

What are the reasons to use TArray<T> instead of Array of T?

I'm migrating a legacy Delphi application to Delphi-XE2, and I'm wondering if there's a good reason to replace the arrays defined as Array of MyType to TArray<MyType>. So the question is what ...
Salvador's user avatar
  • 16.3k
36 votes
3 answers
3k views

Memory leak in the Win64 Delphi RTL during thread shutdown?

For a long time I’ve noticed that the Win64 version of my server application leak memory. While the Win32 version works fine with a relatively stable memory footprint, the memory used by the 64 bit ...
Adrien Reboisson's user avatar
35 votes
2 answers
152k views

Why does CreateProcess give error 193 (%1 is not a valid Win32 app)

The code below fails to start documents. I get error 193 (%1 is not a valid Win32 app). Starting executables work fine. The files are properly associated, they start the corresponding app when double ...
Jan Doggen's user avatar
  • 8,915
35 votes
2 answers
8k views

Firemonkey (FMX) bitmap and colours

Assume I have a small bitmap in Firemonkey (say 32x24 pixels). So I put a TImage onto a form and in the constructor there is this code: Image1.Bitmap.Create(32, 24); if Image1.Bitmap.Canvas....
Jason's user avatar
  • 2,572
35 votes
1 answer
8k views

How to build using MSBuild and Delphi XE2

I've been building projects using Delphi XE and MSBuild using the following simple example which works fine in a batch file. Project1 is an empty project created using 'File | New | VCL forms ...
Brian Frost's user avatar
  • 13.3k
33 votes
8 answers
40k views

How to open an URL with the default browser with FireMonkey cross-platform applications?

Usually, I use: ShellExecute(0, 'OPEN', PChar(edtURL.Text), '', '', SW_SHOWNORMAL); How can I have the same behaviour (opening a link in the default browser), on all platforms (Windows and OSX)?
Whiler's user avatar
  • 8,076
32 votes
1 answer
2k views

Which language elements can be annotated using attributes language feature of Delphi?

Delphi 2010 introduced custom attributes which can be added to type declarations and methods. For which language elements can a custom attribute be used? The examples which I have found so far ...
mjn's user avatar
  • 36.4k
31 votes
2 answers
1k views

Howto add menu item to Mac OS Finder in Delphi XE2

I'm working on Delphi XE2 application targetting Mac OS and Windows. And I want to have integration into context menu. For windows this is simple task. But for Mac OS I dont know how to do this. I've ...
GothAr's user avatar
  • 503
27 votes
4 answers
11k views

Pass record parameter without declaring it first as a variable

If I am trying to call a procedure which has a record type (not object) as a parameter, is it possible to somehow pass details of that parameter "inline" without having to declare a variable of that ...
Jason's user avatar
  • 2,572
26 votes
6 answers
5k views

Delphi XE2 64-bit extremely slow runtime performance on string routines

I'm porting some applications from 32 to 64 bits delphi, which do a lot of text processing, and noticed an extreme change in processing speed. Did some tests with a few procedures, for example, this ...
hikari's user avatar
  • 3,403
25 votes
3 answers
31k views

Design-time package fails to build - File not found: 'Graphics.dcu'

In Delphi XE2, I have a single control in a pair of design/run time packages. Originally, everything was working fine. I've built each of them many times already. Suddenly without warning, the design ...
Jerry Dodge's user avatar
  • 27.1k
25 votes
6 answers
9k views

Delphi XE2: Possible to instantiate a FireMonkey Form in VCL application?

Prior to Delphi XE2, we have VCL only to create GUI apps. Delphi XE2 states that: Caution: FireMonkey (FMX) and the Visual Component Library (VCL) are not compatible and cannot be used in the ...
Chau Chee Yang's user avatar
25 votes
1 answer
1k views

Delphi XE2 VCL styles, updating caption blocks other controls invalidation

Found a glitch with VCL styles: when you update the form caption, other controls previously redrawn within the same procedure don't get repainted, and you are forced to call Repaint, losing valuable ...
hikari's user avatar
  • 3,403
25 votes
1 answer
3k views

Delphi XE2: Debug a 64 bit dll through a 64 bit app

Has anyone had success in debugging a 64 bit dll by running/attaching to a 64 bit application? I have Delphi code for both the application and the dll. I can debug the application in 32 bit and 64 ...
Steve Magness's user avatar
24 votes
8 answers
44k views

How to bring my application to the front?

I know all the reasons why it is a bad idea. I dislike it if an application steals input focus, but this is for purely personal use and I want it to happen; it will not disturb anything. (for the ...
Mawg says reinstate Monica's user avatar
24 votes
9 answers
40k views

How to count number of occurrences of a certain char in string?

How can I count the number of occurrences of a certain character in a string in Delphi? For instance, assume that I have the following string and would like to count the number of commas in it: S := ...
user avatar
23 votes
8 answers
9k views

How can I automate getting the date of build into a constant visible to my code?

I would like to define in my code a constant holding the date on which the executable was built. I would naturally like to automate that process. I know that I can write a pre-build script using, for ...
David Heffernan's user avatar
23 votes
1 answer
3k views

With FireMonkey and its cross-platforms, where should I store my application data?

Usually, with Windows, I save my application's data in the user folder (%appdata%). For that, I use the function ExpandEnvironmentStrings which is linked to Windows to get the folder I need, and I ...
Whiler's user avatar
  • 8,076
23 votes
2 answers
3k views

What can I do about maximized, styled windows, which show their borders on adjacent monitors?

On a multi-monitor system, a "blank" VCL application maximizes fine, but the same application with styles enabled (and one chosen as default) maximizes incorrectly. What I'm seeing is the right-hand ...
DaveS_Lifeway's user avatar
21 votes
5 answers
36k views

Is there an easier way to do boolean conversions?

I have used this scenario many times in nearly all my projects, when I'm doing some sort of data conversion, when it comes to booleans, I kinda get a little lost when it comes to making it simple. ...
Jerry Dodge's user avatar
  • 27.1k
21 votes
1 answer
3k views

How do I change the way the RAD Studio (2010 and later) IDE formats my code?

How do I configure the RAD Studio IDE to format my code with begin on either the same or next line when I use the Format Source option? One of the most commonly debated preferences is the position of ...
Jerry Dodge's user avatar
  • 27.1k
21 votes
4 answers
5k views

What does "Packed Now Forces Byte Alignment of Records" mean?

The What's New for Delphi XE2 contains the following. Packed Now Forces Byte Alignment of Records If you have legacy code that uses the packed record type and you want to link with an ...
David Heffernan's user avatar
21 votes
1 answer
5k views

How can a designer design a firemonkey style

Firemonkey brings us the ability to add styles, vector graphics, bitmaps, effects, animations etc to our apps. But I'm no designer, so I'll need to hire one to do the fancy work. But as far as I can ...
Mike Sutton's user avatar
  • 4,221
20 votes
6 answers
42k views

How to convert Local time to UTC time in Delphi? and how to convert it back from UTC to local time?

I'm using Delphi and I'm trying to store records using UTC datetime in my database and then restore it back when a client reads it in his local datetime ? any idea how to do this forth back conversion ...
Dreamer64's user avatar
  • 1,035
20 votes
3 answers
13k views

How to define application version in one place for multiple applications?

We have a system which consists of numerous applications. All applications have their version changed at the same time. Currently, when we release a new version, we have to manually open the project ...
Jerry Dodge's user avatar
  • 27.1k
20 votes
6 answers
14k views

Reduce exe file

Using Delphi (or in general any tools, if exist of course), is it possible to reduce size of an exe file, removing all code that not is used but that is present there? (for example, a function or ...
Marcello Impastato's user avatar
20 votes
1 answer
33k views

Example for using Generics.Collections.TObjectDictionary

The Delphi XE2 online help (as well as the Embarcadero DocWiki) is very thin on the documentation of TObjectDictionary (or I am too stupid to find it). As far as I understand it, it can be used to ...
dummzeuch's user avatar
  • 11k
20 votes
1 answer
3k views

Why cannot take address to a nested local function in 64 bit Delphi?

AS. since closing related questions - more examples added below. The below simple code (which finds a top-level Ie window and enumerates its children) works Ok with a '32-bit Windows' target platform....
Sertac Akyuz's user avatar
  • 54.5k
20 votes
2 answers
2k views

Delphi XE2: Is it possible to create Mac GUI applications without FireMonkey?

Using Delphi XE2, is it possible to create a Mac GUI application without using FireMonkey for the GUI? If so, what could be used and how would one go about it?
Shannon Matthews's user avatar
20 votes
1 answer
7k views

Need bidirectional LiveBindings between a control and an object

In Delphi XE2 LiveBindings, I need to bind a VCL control of any type to a property of any type on an arbitrary (non-component) object. I can do this unidirectionally. But I need to do it ...
Phil Gilmore's user avatar
  • 1,306
19 votes
2 answers
11k views

How do I parse a web URL?

I need to be able to break a URL down into different segments. Take this path for example: http://login:[email protected]:8080/some_path/something_else.html?param1=val&param2=val#...
Jerry Dodge's user avatar
  • 27.1k
19 votes
7 answers
4k views

Setting up a large software system in Delphi

We have a software package which is about 16 years old. It's gone through just about every version of Delphi (besides .NET ones). Over the years, things have become very confusing when it comes to ...
Jerry Dodge's user avatar
  • 27.1k
19 votes
4 answers
15k views

DCC Hint: H2161 Warning: Duplicate resource: Type 24 (user-defined), ID 1; File resource ... kept; file ...\WindowsXP.res resource discarded

Get the following error while linking my project in Delphi XE2. Recreating of .dproj file doesn't help. [DCC Hint] H2161 Warning: Duplicate resource: Type 24 (user-defined), ID 1; File resource <...
Dmitry's user avatar
  • 14.5k
19 votes
5 answers
51k views

What is the best way to program a delay in Delphi?

A Delphi application that I'm working on must delay for one, or sometimes two, second(s). I want to program this delay using the best practices. In reading entries about Delphi's Sleep() method on ...
Mike Jablonski's user avatar
19 votes
3 answers
9k views

How to disable VCL styles in Delphi

I am using the new VCL styles system in Delphi XE2. It works great, but I wish to disable it for a particular form that has a number of images on it (a splash/about form). Problem is I can't seem to ...
Alan Clark's user avatar
  • 2,059
19 votes
4 answers
6k views

Firemonkey version of VirtualTreeView

Does anyone happen to know if there is a Firemonkey version of the popular VirtualTreeView in preparation? Also, has anybody collected some experiences with porting custom controls to Firemonkey and ...
jpfollenius's user avatar
  • 16.5k

1
2 3 4 5
52