Control in Runtime vs Designtime

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Johnny Jörgensen

    #1

    Control in Runtime vs Designtime

    I would like to be able to tell whether my component code is executed when I
    instanciate a control in runtime or in designtime.

    Can anybody give me a clua as to how you can do that?

    Cheers,
    Johnny J.


  • Michael Huber

    #2
    Re: Control in Runtime vs Designtime

    use the DesignMode - Property

    Control ctrl = new Control();
    if (ctrl.DesignMod e)
    {
    //is in designMode
    }


    Comment

    • Johnny Jörgensen

      #3
      Re: Control in Runtime vs Designtime

      Thanks both of you - It was much simpler than I had expected... ;-)

      /Johnny J.

      "Johnny Jörgensen" <jojo@altcom.se wrote in message
      news:OeKylrk3HH A.1484@TK2MSFTN GP06.phx.gbl...
      >I would like to be able to tell whether my component code is executed when
      >I instanciate a control in runtime or in designtime.
      >
      Can anybody give me a clua as to how you can do that?
      >
      Cheers,
      Johnny J.
      >

      Comment

      Working...