Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Solved: Possible cause for "strange" Problem's.



Permlink Replies: 1 - Last Post: Apr 26, 2017 12:40 PM Last Post By: Remy Lebeau (Te...
Samuel Herzog

Posts: 16
Registered: 9/10/00
Solved: Possible cause for "strange" Problem's.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 26, 2017 10:39 AM
Hello Forum,

I just want to let you know about an observation I did today. It might be helpful for some other folk's.

The problem I was investigating today was this.

The property "TCombobox.DropDownCount" did not work anymore in my D7 compiled application. It always showed all items in the dropdownbox.

I searched the internet. --> found some rare entries about people that reported the same problem, but no solution.
I did a standalone example of the problem to simulate. --> but everything worked fine.
I had a look at the dfm-file. --> everything looked fine.

Finally I found the troublemaker. After deleting the .res-file and reopening the project in the IDE, the problem was gone.

How did I get into this situation? I previously opened the project with Delphi XE10.1 and saved the project.
So the .res-file saved by Delphi XE10.1 can cause strange problem when opening the project again in D7.

Sam
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Solved: Possible cause for "strange" Problem's.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 26, 2017 12:40 PM   in response to: Samuel Herzog in response to: Samuel Herzog
Samuel wrote:

So the .res-file saved by Delphi XE10.1 can cause strange problem
when opening the project again in D7.

I don't see how that is possible.

In Delphi 2006 and earlier, the TComboBox.DropDownCount property is implemented
completely manually (see the source for the TCustomCombo.AdjustDropDown()
method in StdCtrls.pas). When TComboBox receives notification from Windows
that the drop-down list has been displayed, TComboBox manipulates the list
window directly to resize its height.

In Delphi 2007, TComboBox was updated to use the CB_SETMINVISIBLE window
message if ComCtrl32.dll v6 (aka, Visual Styles) is enabled. But TComboBox
still also manually resizes the list window as well, even with ComCtrl32
v6 enabled.

So, even if your .res file has a missing/corrupt application manifest resource,
I don't see how that can prevent DropDownCount from working one way or the
other.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02