CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Apr 2009
    Posts
    3

    Having trouble access controls from another class... HELP PLZ!!!

    Hello everyone, I have a problem. I have a main class, and a fuel class... in the main class i have 3 radio buttons, a combo box, and a button. Once one of the radio buttons is clicked, I check the index of the combobox. If the index is >=0 then the button is enabled. Here is my snipped of code (in the fuel class)...

    public void enableParkingButton()
    {
    frmMain m = new frmMain();

    if (m.rbtnParkingDaily.Checked == true || m.rbtnParkingWeekly.Checked == true || m.rbtnParkingMonthly.Checked == true)
    {
    q.btnPurchasePass.Enabled = true;
    }
    }

    Basically once the program gets to that first if statement, it completely ignores it. I have been struggling with this for a few days now, and can't really do anything else until i figure this out.

    thanx

    By the way, I am using visual studio 2008 express edition.
    Last edited by Boy_Narf; April 7th, 2009 at 09:41 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured