The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,839 other subscribers

Archive for the ‘Development’ Category

Allocating 4Gb+ of memory in x64 using Delphi XE2 Update 2: Unofficial fix for QC#100726 …

Posted by jpluimers on 2011/11/09

If you are creating x64 applications using Delphi XE2, have Update 2 installed, and are (potentially) allocating more than 4Gb of memory (QC report 100726), then you need the Unofficial fix for QC#100726, or use the latest version of FastMM (see below).

If you use Delphi XE2 (original release) or Update 1, then you don’t have problems in this scenario.

Thanks to FastMM author Pierre le Riche for providing this fix so quickly.

Note that the latest 4.x release of FastMM is now FastMM 4.99 and contains the same fix.

–jeroen

Via: Embarcadero Discussion Forums: Unofficial fix for QC#100726 ….

Posted in Delphi, Development, Mobile Development, Software Development | 4 Comments »

c# – Panel.Dock Fill ignoring other Panel.Dock setting – Stack Overflow

Posted by jpluimers on 2011/11/08

Every once in a a while I do WinForms development. On the .NET platform it still is the best way to create simple business applications that just, well: work.

WinForms apps are not fancy, but the actual users don’t care much, as long as they can their daily work done. They love fanciness of their mobile devices, but for stuff they use 8 hours a day, they just want something that works quickly, well and easily. So WinForms for a baseline is good.

WinForms historically has had two ways of automatically: Anchors and Dock (.NET 2 introduced another way using FlowLayoutPanel and TableLayoutPanel, but often they make things more complicated than needed).

One of the pitfalls of Docking is when you set Dock to Fill. Sometimes the affected control will be too large.
Every time that happens, I am baffled, as .NET is the only platform with that behaviour; I use other platforms too, and they don’t have this docking peculiarity (of course the have others, that’s the fun of using multiple platforms <g>).

The solution is simple:

  1. Right click on the control that misbehaves
  2. Choose “Bring to Front”
Done :)

–jeroen

Via: c# – Panel.Dock Fill ignoring other Panel.Dock setting – Stack Overflow.

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, Development, Software Development, VB.NET, WinForms | 2 Comments »

Zipping .lnk files

Posted by jpluimers on 2011/11/04

.lnk files are very usefull as they can link to both files and directories.

However, somehow the GUI tools for zipping .lnk files tend to compress the .lnk target, not the .lnk itself.
I tried the Windows Explorer, WinZIP and 7zip GUIs to no avail.

The 7za command-line to the rescue:

7za a -tzip lnk-files.zip *.lnk

Unpacking the zip using the GUI works fine though.

You can get the latest 7za here.

–jeroen

Posted in 7zip, Batch-Files, Compression, Development, Power User, Scripting, Software Development | Leave a Comment »

EKON15 download materials on-line at bo.codeplex.com

Posted by jpluimers on 2011/11/03

I uploaded the EKON15 conference download materials to http://bo.codeplex.com.

The changeset you are after is http://bo.codeplex.com/SourceControl/changeset/changes/70872

It contains most of the materials for the Delphi Tage and the Delphi Live conferences too, though I will upload the missing pieces soon.

With the [WayBack] demise of codeplex, these links now have moved to

–jeroen

Posted in Conferences, Delphi, Development, EKON, Event | Leave a Comment »

Using InputBox in C#

Posted by jpluimers on 2011/11/03

Sometimes you just want to ask a user for a simple string of input.

The InputBox function is an easy way to do do this. It has a tiny issue with the icon (it uses the one that belongs to the application installation, not the icon in the project properties).
InputBox has been part of Visual Basic since the 90s. And it is very easy to use from C# and other .NET languages:

  1. Add the Microsoft.VisualBasic assembly (which has been part of the .NET FrameWork since it first got released)  to your solution
  2. Make a call like
    Microst.VisualBasic.Interaction.InputBox("Did you know your question goes here?","Title","Default Text");

Sometimes you have to look a bit further than your regular toolbox for simple solutions.
I should dig up my 2006 session on the My Object in Visual Basic:  that is also very easy to use in C#.

–jeroen

via: Input Message Box in C#?.

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, Development, Software Development, VB.NET, VBS | Leave a Comment »

You need at least 5Gb free space for Update 2 for #Delphi XE2, C++Builder XE2 and RAD Studio XE2

Posted by jpluimers on 2011/11/02

Yesterday, Update 2 for Delphi XE2 / C++ Builder XE2 / RAD Studio XE2 became available for download.

A few notes from my experience upgrading from a full RAD Studio XE2 Update 1 install (from ISO):

  • You need at least 5 Gb free disk space to install Update 2.
    The installer won’t warn you in advance: it will indicate it needs more disk space when it cannot update the first file that does not fit.
    In my case (VMware image of 40 Gb with 4 Gb free), that was not enough.
  • It will leave a 300 Mb directory at %temp%\radstudio_xe2_update2_download
  • Downloads are available from the altd http and ftpd ftp servers for registrered users at about 300 kilobyte per second each.
    Expect a total download time of at least:

    1. 15 minutes for the 300 Mb XE2 Update 2,
    2. 90 minutes for the complete 2.5 Gb XE2 install ISO that includes Update 2,
    3. 40 minutes for the 800 Mb XE2 Help Update 1,
    4. 20 minutes for the 350 Mb RADPHP XE2 Update 2.
  • The Update 2 install will wait a very long time in the “Validating” phase. Just be patient, it will get there in the end.
  • Though the  Help Update 1 is a lot bigger download, you usually only install one language and then it needs around half a gigabyte.

There are a ton of changes (154 changes files in the C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\source directory tree alone) including some of the things I came across that now have been fixed:

  1. warnings about duplicate resources when including MidasLib
  2. refreshing of BindingList
  3. when the FireMonkey designer is visible, Alt-key combinations now work again

–jeroen

Via: Update 2 for Delphi XE2, C++Builder XE2 and RAD Studio XE2 now available – DelphiFeeds.com.

Posted in Delphi, Delphi XE2, Development, Software Development | 8 Comments »

.NET/C# WinForms: simple solution to Panel.Dock Fill ignoring other Panel.Dock setting – Stack Overflow

Posted by jpluimers on 2011/11/02

It has been a while, but I have done some WinForms maintenance on business apps. For those kinds of apps, WinForms still is a productive environment, apart from one thing:

When you have a Dock of Fill, sometimes that control fills more than it should.

The reason is the order in which things are being calculated.

I always forget the trick, as other very productive environments for writing business apps don’t have this peculiarity (they have others, life is full of interesting peculiarities <g>).

Simple solution:

  1. Right-Click on the control that has Dock=Fill
  2. Choose “Bring to Front”

Now it fills exactly the wanted area :)

Thanks Jeff Cuscutis for posting this concise solution.

–jeroen

Via: c# – Panel.Dock Fill ignoring other Panel.Dock setting – Stack Overflow.

Posted in .NET, Development, Software Development, WinForms | Leave a Comment »

Delphi: solution for “How can I find all the units in my Delphi app?” (via Stack Overflow)

Posted by jpluimers on 2011/11/01

Delphi Tricks (from Chris Hesik, see link below) to show which units are compiled into an app:

  • Use the modules view, this will show you what units (and source files!) the debugger knows of for your modules.
  • Use the –depends switch on the commandline: this will output a .d file listing all the .dcus and .dcps for your modules.

–jeroen

Via: debugging – How can I find all the units in my Delphi app? – Stack Overflow.

Posted in Delphi, Development, Software Development | Leave a Comment »

TODO: batch file to properly backup Skype history

Posted by jpluimers on 2011/10/27

This is on my todo list: Smarter Skype Backups | Universe’s Blog.

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development | Leave a Comment »

tortoisegit – Porting TortoiseSVN to TortoiseGIT – Google Project Hosting

Posted by jpluimers on 2011/10/26

This should be the first line on the TortoiseGITS home page; I always keep forgetting this step at new installations:

Please install msysgit 1.6.1 or above before install tortoisegit http://code.google.com/p/msysgit

–jeroen

via tortoisegit – Porting TortoiseSVN to TortoiseGIT – Google Project Hosting.

Posted in Development, DVCS - Distributed Version Control, Software Development, Source Code Management | Leave a Comment »