Solved

WinFOrms ListBox

Posted on 2013-06-12
13
373 Views
Last Modified: 2013-06-12
How the hey is the font size set in vb code on a WInFOrms ListBox
0
Comment
Question by:lrbrister
[X]
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
13 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 39241065
can u rephrase the question?
0
 
LVL 22

Expert Comment

by:Om Prakash
ID: 39241070
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39241073
the listbox has default font attributes which u can change in the Proprieties pane
screenshot
0
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 

Author Comment

by:lrbrister
ID: 39241080
sedgwick
I need to set the items font size smaller in VB
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 350 total points
ID: 39241094
e.g.

Me.ListBox1.Font = New Font(Me.ListBox1.Font.FontFamily, Me.ListBox1.Font.SizeInPoints - 1)

Open in new window

0
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 150 total points
ID: 39241095
ListBox1.Font = New Font(ListBox1.Font.Name, 6)
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39241096
u can set them any number you want (even 1).
how small do u want the font to be?
0
 

Author Closing Comment

by:lrbrister
ID: 39241102
Thanks.
YOu guys had it first
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39241106
@lrbrister
how my suggestion is wrong?
0
 

Author Comment

by:lrbrister
ID: 39241127
sedgewick
Your images were correct of course.
But the specific question was how to do it in vb code
And kaufmed and JamesBurger answered that 4 seconds apart.
So...my choice...I gave the bulk to kaufmed and a nod to JamesBurger
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39241138
ok, u should have specified that u need code or to be more precise do it programmatically.
0
 

Author Comment

by:lrbrister
ID: 39241165
sedgewick...
My original question specificaqlly said in vb code

Anyway...
I'll try and be more clear.  Thanks for your input
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39241178
u right, my bad.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 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