Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Weird problem - buttons without caption...

Posted on 2006-11-25
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Accepted Solution

Ghitza earned 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

722 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