Results 1 to 2 of 2

Thread: Colors and FOnts in UserControls

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    Essex, Engalnd
    Posts
    5

    Unhappy

    I am new to activex programming. I have an application that i have converted to an activex control. My problem is that the i use api call to paint onto the usercontrol background, the fonts I select does not always change and the color always stays balck and grey.

    Any Ideas?


    Thanks Daz

  2. #2
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Arrow Erm...

    Not quite clear what it is you're trying to do but when you create ActiveX controls, you have a global (to the user control) object called 'Ambient'.

    The 'Ambient' object is basically whatever container that the particular instance of your activex control is sitting in.

    For example, Ambient.Font gives you access to the stdFont object of the container.

    There is a UserControl event called 'AmbientChanged' that passes in the name of the property that has changed and the value.

    There are all sorts of things you can do to integrate your ActiveX control with it's environment and you shouldn't need to use API calls.

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