Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

Weird problem - buttons without caption...

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?

1 Solution
calinutzAuthor Commented:
And yes... I free all my runtime created components if anyone asks..
calinutzAuthor Commented:
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.
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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
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.
calinutzAuthor Commented:
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
calinutzAuthor Commented:
I notified the RLPack team about this bug, so hopefully no one else will encounter this problem
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now