Weird problem - buttons without caption...

Posted on 2006-11-25
Last Modified: 2010-04-05
I am experiencing the weirdest thing I ever encountered in Delphi... and so far I cannot explain it. And also I cannot solve it.

Some components (usual ones like CheckBox, ComboBox, Buttons, MessageBoxes) seem to have their caption invisible. So the text is there because I can see the surrounding dotted rectangle around it when they receive focus. Also for Comboboxes, they dropdown in the list and the list is as long as it should be but there is no text there... if I browse through it and select one of it's invisible items... the combobox shows me the text that was supposed to be in the dropdown list.
Also some ShowMessage boxes do not have the message body, and neither the buttons on the showmessage box. So the ShowMessage and MessageDlg... shows me a form with no text on it, and 1 or 2 buttons (Ok Cancel) but the buttons have no text on them . Everything on the standard ShowMessage and MessageDlg is empty.

The interesting thing is that I have to very similar forms that contain almost the same components (anyway the same component types like Edits, ComboBoxes... and so on), so there are no other types of components on them. And one of the forms works like a charm, the other gives me headackes.
The most interesting thing is that this behavior only seems to appear on certain computers. On my own ones they work great. But on one of my client's computers (3 computers) don't.

At first I thought maybe it's something wrong in the registry... but if it were, then all the forms that have MessageDlg and ShowMessage , Checkboxes and Comboboxes on them should have the same problem, but they don't.

Another thing: On these two particular forms that are 98% identical (the one that works and the other that doesn't) half of the components are created in design time and the other half are created on runtime.
Also another thing is that on both of them I use standard Delphi VCL components plus a Jedi component called jvScrollMax (where I create on runtime some components). But since I do almost the same steps in both forms I don't think that this component is to blame.

So this is probabely something internal in Delphi, but I cann't figure it out.
Any ideeas?

Question by:calinutz
LVL 11

Author Comment

ID: 18012536
And yes... I free all my runtime created components if anyone asks..
LVL 11

Author Comment

ID: 18012554
Also weird... (that makes me think it's something wrong with the registry) is that another application from my applications pack sent to the same client started to behave similarly. I mean, there is no jvScrollMax component in that application, and still some checkboxes, and Buttons on some forms do not have Captions on them.
LVL 28

Expert Comment

ID: 18012618
well, first thing is first: the application works perfectly just that the text is not displayed, right? in this case try to make a small application that send a WM_gettext message to one of thos components (must have handle) and see if it gets anything (this app will be run by your client. something like winspy, if you can make your client use that correctly to get you teh information. but safest is to just make this small app :) )
this will tell you if there is a problem displaying or there is no text there ;)
second: showmessage and messagedlg do not have text???? I find it hard to believe since those are standard windows controls. delphi just creates some kind of wrapper on them.
so question is: are there some "weird" applications in the clients machine?
they didn't by any chance upgrade to vista, did they? (since one of your clients "started" having the issue, makes me think something changed in their environment, and the OS is first in my mind)

then comes fird: are you using some sort of components for skinning? or anything that changes the UI/appearence? hooking maybe? localization (as in translations)?
consider this scenario:
- application wants to display something, so it makes the call
- this call is being intermediated by "something" (skinning module, translation module, whatever)
- the modules bailes out for some reason and since it's badly written, the call is forgot
- the application doesn't get the response so there is nothing to display

I am thinking of the translation/skinning part. am I close? :D
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.


Accepted Solution

Ghitza earned 500 total points
ID: 18012748
Do you use by any chance an exe packer called RLPack (basic edition)?
I had a similar behaviour after packing my executables with this one. If so, then try packing them with something else... like UPX or something.
RLPack is very strong but seems to count on some resources that are local or something like that... and when you deploy the app the named resources are just not there with your app.

Best regards

Expert Comment

ID: 18013076
I've seen this kind of thing with custom colors.  If you're using custom colors, try using the standard clWindowText for the font color, and see if the text shows up.  If it does, than some security crazed nut has locked the end user out of using custom colors, and the user profile needs to be fixed.
LVL 11

Author Comment

ID: 18014177
ciuly -- I do not use theming nor skinning and yes the error appears even for windows standard controls.
ghitza -- yours is the right guess (merci) I actually was using the RLPack (silly mistake)
Meldrachaun -- I thought of custom colors from the start but it wasn't that (I wasn't using any custom colors (just the standard ones) and I even tested it with changed colors for the captions with the same result)

Thanks to all
LVL 11

Author Comment

ID: 18014180
I notified the RLPack team about this bug, so hopefully no one else will encounter this problem

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now