Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7933567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:22:31+00:00 2026-06-03T21:22:31+00:00

I have a windows form project with a main form. There is a textbox

  • 0

I have a windows form project with a main form. There is a textbox leave event that opens a new form. In that new forms load event i have a combobox item loop that populates the combobox items. It works perfectly fine if run on the main form but doesnt work on the second form. Why doesn’t the comboboxes on the secondary form populate when that form is opened via a textbox_leave event from the main form?
this is the leave event

 Private Sub tbChartTitle_Leave(sender As Object, e As System.EventArgs) Handles tbChartTitle.Leave
    If Not tbChartTitle.Text = Nothing Then
        frmTitleAttributes.Show()
    End If
End Sub

This is the code that populates one of the comboboxes on the second form (it works if run on a combobox on the main form)

 Private Sub frmTitleAttributes_Load(sender As Object, e As System.EventArgs) Handles Me.Load
    InitializeComponent()
    AddFonts()
End Sub
Private Sub AddFonts()
    ' Get the installed fonts collection.
    Dim allFonts As New Drawing.Text.InstalledFontCollection
    ' Get an array of the system's font familiies.
    Dim fontFamilies() As FontFamily = allFonts.Families

    ' Display the font families.
    For i As Integer = 0 To fontFamilies.Length - 1
        cbxTitleFonts.Items.Add(fontFamilies(i).Name)
    Next
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:22:32+00:00Added an answer on June 3, 2026 at 9:22 pm

    make sure that the Load handler is hit after you show your form (use break point)

    also you can try to call it in the Shown event

    Private Sub frmTitleAttributes_Shown(sender as Object, e as EventArgs) _ 
         Handles frmTitleAttributes.Shown
    
       AddFonts()
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a windows forms project. It has a main form derived from System::Windows::Forms::Form
I have a windows form on the main thread and another thread that does
In my VS 2008, for main project have this error for control/ form that
Firstly, I have a project with a Windows Form that references another project with
I have a windows media player COM in my Windows Form project that plays
I Have a Windows Form Project , which has a main form,and in this
I have a c# windows form project using watin. I would love to attach
I have a Windows form application that's consuming web services over https and is
I have a Windows Form that contains a custom control container as a UserControl.
I have a Delphi project and the main form is a child window of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.