Why winform panel won't update?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Net4life
    New Member
    • Jan 2013
    • 1

    Why winform panel won't update?

    I have a winform with a penal which is supposed to be used a LED indicator for a serial port communication. Basically, it is supposed to flash RED Color if not it should be BLACK.

    As a test, I created a very simple program - winform with a panel, timer and a button.

    When you click the button, it starts the timer and updates the panel's backcolor back and forth between black and red every second.

    This test program works flawlessly on Windows. However, when I run the same program on Linux under MONO, the panel only gets updated, when I move my mouse or click or drag on the winform. If not, it simply ceases to update.

    What am I doing wrong? Any help will be greatly appreciated. Thank you.
  • adriancs
    New Member
    • Apr 2011
    • 122

    #2
    Try this:
    Code:
    panel1.Refresh()

    Comment

    Working...