How to display a list of the database?

Please tell me how to get a list of all existing SQL Server database instances into a listbox , so that the user can select their database. Thank you!

You'll want to use the sys.databases table for that probably;
SELECT name 
FROM sys.databases