Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004

    Unanswered: control form properties from methods within form

    hola all,
    I'm rather unfamiliar with Paradox/objectpal and have a question: I'd like to control the visual properties of a form from a method within said form, specifically I'd like to change the color of the form based on the operating system. I've found what I need to check the os but I'm not sure how to alter the appearance of the form from within a method in the form (also would like to know how to assign an rgb color to the form).

    many thanks!

  2. #2
    Join Date
    Apr 2004
    ok, figured it out. I forget the exact code but involved reading form properties into an array and then setting the new values in the array and iterating through the array to set all changed values in the form.

  3. #3
    Join Date
    Aug 2003
    Bologna - Italy
    I don't think you need any array.

    You can simply change the color of the form by using the color property of the form object; in a method on the form:


    and that's all.

    Remember that colors are, as always in windows, longints, and that you can use the predefined constants:

    Black, Blue, Brown, DarkBlue, DarkCyan, DarkGray, DarkGreen, DarkMagenta, DarkRed, Gray, Green, LightBlue, Magenta, Red, White, Yellow, Transparent

    and also clBtnFace and similar constants to read system configured colors (those the user set in the screen control panel).

    Remember also that you may need to change the PAGE color, if it's not transparent.

    The only failure is not trying to do it.

Posting Permissions

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