Results 1 to 5 of 5

Thread: Custom Control - Performing action ONLY during Design time

  1. #1
    Guest
    I am in the process of making a custom button, and in the resize event, I only want to perform a redraw when in design time. If the button is running in the compiled program, I want it to ignore the command. Is there any way to distinguish between design time and run time in a control?

    Thanks,
    Jordan

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    hmm, sounds stupid but can't you just comment out the sub before compiling it and decomment it when using in runtime eviroment?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3
    Guest
    Yes, but I was just wondering if there was any way to distinguish between design time and runtime in a control so that I don't have to manually comment and decomment every time.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Code:
    If UserControl.Ambient.UserMode then
      'Runtime code
    else
      'Designtime code
    end if
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Guest
    They don't call em guru's for nothing. Thanks Kedaman.

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