Ok...I'm working on a simple type word processor. Just soemthing to play with cuz I got bored. Anyways...I'm trying to set a combobox near the top of the form that has all the installed fonts and you can choose your font from there. Simple enough I would assume. I have as much as the combobox listing the installed fonts.
Private Sub frmScribble_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'set font combobox
Dim ComboFonts As Drawing.Text.InstalledFontCollection
ComboFonts = New Drawing.text.InstalledFontCollection
Dim Family As FontFamily
For Each Family In ComboFonts.Families
cboFonts.Items.Add(Family.Name)
Next
cboFonts.SelectedIndex = 0
End Sub
Now...what I can't get is the selection process down. I figure I need to use the SelectedIndexChange event from the combobox control, but from there I'm stuck. Can anyone help me with this problem?
The ethical thing for MS to do (a foreign concept) would be to continue full support for WIndows-10; until WIndows-11 is stable and mature enough to be considered reliable. Give users the ability to get decent use out of hardware they have bought, that MS decided are no longer able to run WIndows-11.
Why should users give up using a relatively stable OS (after almost a decade from its initial release) and move to a Beta+ level OS? Maybe in four or five more years, when it finally becomes more stable. Oh, and we have finally gotten fair use out of the hardware we bought, only to have MS say "toss it."
Funny enough, the aesthetic is pretty much the only thing I like from Windows 11 so I don't mind a distro that looks like it but the perks of it being Linux underneath. I'm usually a 'start with the base and build it myself' type Linux person but if a distro is close enough to what I'd likely set it to myself, no reason not to start with a good chunk of the work done for me.
Question
Brewzzin
Ok...I'm working on a simple type word processor. Just soemthing to play with cuz I got bored. Anyways...I'm trying to set a combobox near the top of the form that has all the installed fonts and you can choose your font from there. Simple enough I would assume. I have as much as the combobox listing the installed fonts.
Now...what I can't get is the selection process down. I figure I need to use the SelectedIndexChange event from the combobox control, but from there I'm stuck. Can anyone help me with this problem?
Thanks!
Link to comment
https://www.neowin.net/forum/topic/292320-vbnet-help-with-font-combobox/Share on other sites
7 answers to this question
Recommended Posts