Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Browsing all 1440 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Delphi `with` post and discussion revisited (via: wiert.me and LinkedIn)

A bit more than a year ago, I wrote about Delphi: you should avoid the `with` statement as it makes your code less future proof. That caused some nice comments on the blog, and some more on LinkedIn...

View Article


Image may be NSFW.
Clik here to view.

Interesting comment by Joseph G. Mitzen delphi on my “Delphi – for … in on...

Joseph G. Mitzen posted a very interesting (and elaborate <g>) comment on a post from me in 2009: Delphi – for … in on enumerated data types « The Wiert Corner – irregular stream of stuff. The...

View Article


Image may be NSFW.
Clik here to view.

Delphi: Variant versus OleVariant (via: RAD Studio API Documentation)

I used to forget about the difference between Variant and OleVariant, and used them like this: Use OleVariants for OLE, and Variants for non OLE. There is no need to manually clear them. Luckily I was...

View Article

Image may be NSFW.
Clik here to view.

Delphi: a few short notes on LoadString and loading shell resource strings...

I’m not a real expert on LCID (the values like 1033 (aka 0×409 or $409) and 1043 (aka 0×413 or $413), but here are a few notes on stuff that I wrote a while ago to obtain shell32.dll resource strings...

View Article

Image may be NSFW.
Clik here to view.

(Old style Pascal objects): Could you please remind me if Objects support...

I observe an increase of people not asking questions on Stack Overflow any more… Today, two interesting questions caught my eye. The first one was by Martijn Coppoolse about Is it possible to figure...

View Article


Image may be NSFW.
Clik here to view.

Drawing fully justified text to a canvas (via: Parnassus OÜ – Delphi...

Though fully justified text is most often in print, and not much in user interfaces any more, this might come in useful one day (it is based on the GDI functions TextOut and SetTextJustification):...

View Article

Image may be NSFW.
Clik here to view.

The StackOverflow Pascal/DelphiSyntax Highlighter

Found out where the StackOverflow Pascal has its origins: What happened to comments in syntax highlighter? – Meta Stack Overflow. Like any syntax highlighter, it is not perfect (only a Delphi compiler...

View Article

Image may be NSFW.
Clik here to view.

Delphi syntax for TODO list (via: How set up todo list categories in Delphi...

A while ago, some of the TODO comments in my source code disappeared from the TODO list. I wondered why, so I found this question: How set up todo list categories in Delphi 2010?. The Delphi TODO item...

View Article


Image may be NSFW.
Clik here to view.

How Can I Determine Which Version of Word is Installed on a Computer? – Hey,...

Late binding sometimes is your friend: Set objWord = CreateObject("Word.Application") Wscript.Echo "Version: " & objWord.Version Wscript.Echo "Build: " & objWord.Build objWord.Quit The...

View Article


Image may be NSFW.
Clik here to view.

Delphi: workaround for when you loose many of the ModelMaker Code Explorer...

ModelMaker Code Explorer (MMX for short) stores the keyboard shortcuts in the registry. I’ve had it occur once that somehow most (about 95%) of the shortcuts got lost. Two thinks I learned from...

View Article

Image may be NSFW.
Clik here to view.

Spring4D: How is the GlobalContainer intended to be used? Are there important...

Short answer: do not use the GlobalContainer. Long answers are in this Spring4D thread: How is the GlobalContainer intended to be used? Are there important don’ts? – Google Groups. Especially read this...

View Article

Image may be NSFW.
Clik here to view.

Word API Documents collection documentation: moved and changes with the...

I’ve done a bit of WinWord automation and came across different locations for the API: New Style: Word 2013: Documents Object (Word) –...

View Article

Image may be NSFW.
Clik here to view.

Delphi: using IInterface to restore cursor at end of mehod (prelude to a...

A long while ago, I wrote about a (then overdue post) on .NET/C#: Using IDisposable to restore temporary settrings example: TemporaryCursor class. I had been using a similar technique in Delphi since...

View Article


Image may be NSFW.
Clik here to view.

Delphi: a memento that executes any code at end of method

Following up on yesterdays Delphi: using IInterface to restore cursor at end of mehod (prelude to a memento that executes any code at end of method) here is the memento I meant. They are based on...

View Article

Image may be NSFW.
Clik here to view.

Delphi: interesting unit uExecFromMem from DelphiBasics.info: start an...

A long while ago, DelphiBasics.info (they are hosted on Google Sites) posted a very interesting via: uExecFromMem unit. It was only a code snippet, not much usage info. One of the things you can do...

View Article


Image may be NSFW.
Clik here to view.

The dreaded with… Debugging today, I found another gotcha (: – via: Lars Fosdal

In the With Statement series: Lars Fosdal – Code Rants The dreaded with… Debugging today, I found another gotcha. In this case, both Self and DisconnectedClient has a property named ClientIdentifier....

View Article

Image may be NSFW.
Clik here to view.

Which Windows Resource Editor do you use?

In the past, I used the XN Resource Editor, but it hasn’t been maintained for a while. Which resource editor do you use? Take Our Poll Based on a few links I found, I will be trying these: IcoFX – The...

View Article


Image may be NSFW.
Clik here to view.

Delphi: (ab?)using managed types to help guarantee initialisation of stack...

I mentioned Delphi managed types is in Delphi “Variant Records”, a few notes indicating they are special. Managed by the RTL, you can use them to your advantage when you have record types that – when...

View Article

Image may be NSFW.
Clik here to view.

Delphi and C++ Builder VCL Library Buffer Overflow

Since this did not make it to DelphiFeeds yet: I’ve seen the function PaletteFromDIBColorTable in Graphics.pas go back as far at least until Delphi 2006, and references on the web as far back as Delphi...

View Article

Image may be NSFW.
Clik here to view.

When deadlocks become livelocks (via: Do deadlocks cause high CPU...

Depending on how you organize locks (for instance via waiting on semaphores or mutexes or spinlocks), deadlocks can become livelocks: Inability to make forward progress because of conflicting spinlocks...

View Article
Browsing all 1440 articles
Browse latest View live