Click here to Skip to main content
15,882,113 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi i just use the code of this:
Adjust combo box drop down list width to longest string width[^]

My problem is it go outside the screen's bounds.

What I have tried:

see the image below. it display longest text but it goes outside the windows
https://imgur.com/a/6kqodpD.png[^]
Posted
Updated 9-Aug-22 19:31pm

1 solution

So check it and restrict it to the screen width: Screen.PrimaryScreen Property (System.Windows.Forms) | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900