private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
string clubname = "", clublocation = "", contactname = "", contactaddress = "", contactlocation = "";
Club tempclub = new Club(Convert.ToInt32(comboBox1.SelectedText)); //A custom object Club(int somenum)
tempclub.GetClubInfo(ref clubname, ref clublocation, ref contactname, ref contactaddress, ref contactlocation); //Reads the row where the first column == comboBox1.SelectedText
ClubNameTextBox.Text = clubname;
ClubLocationTextbox.Text = clublocation;
ContactNameTextBox.Text = contactname;
ContactAddressTextBox.Text = contactaddress;
ContactLocationTextBox.Text = contactlocation;
}
}
The program gets to the line where I declare a Club object, then inexplicably jumps to:
class TablessControl : TabControl
{
protected override void WndProc(ref Message m)
{
// Hide tabs by trapping the TCM_ADJUSTRECT message
if (m.Msg == 0x1328 && !DesignMode) m.Result = (IntPtr)1;
else base.WndProc(ref m);
}
}
Which I used to hide the tabs on a TabControl (DIY 'Wizard' style window).It just keeps running the Wndproc method over and over (and over) again in an infinite loop. The program does not lock up, it simply skips the rest of my SelectedIndexChanged event.
The combo box is populated with a list of numbers from a database. When the Club object is created, it populates it's private variables with the rest of the info from that record(row). The GetClubInfo() method is supposed to set the strings to the values stored in the Club object. Only...it doesn't get to that line; i set a break on it, and it never broke. I set a break on the declaration of Club, and it stepped into WndProc.
Any ideas as to why this would happen?


Sign In
Create Account


Back to top









