initialization
  TActiveFormFactory.Create(
    ComServer,
    TActiveFormControl,
    TAFExp,
    Class_AFExp,
    1,
    '',
    OLEMISC_SIMPLEFRAME or OLEMISC_ACTSLIKELABEL,
    tmApartment);
倒数第2行中可以有很多参数,在ACTIVEX 这个UNIT里可以看到,那么这些参数是什么含义呢?有什么效果?

解决方案 »

  1.   

    这些应该都是系统定义的常量,用以描述窗体的风格等等
    如果你经常用动态创建窗体,你会经常用到系统的一些常量的
    OLEMISC_SIMPLEFRAME or OLEMISC_ACTSLIKELABEL //说明窗体具有 OLEMISC_SIMPLEFRAME 和 OLEMISC_ACTSLIKELABEL 风格,你还可以根据需要自己再追加其他风格,甚至连模式窗体的风格你也可以自己设置
      

  2.   

    OLEMISC_SIMPLEFRAME 
    This value is used with controls. It indicates that the control is a simple grouping of other controls and does little more than pass Windows messages to the control container managing the form. Controls of this sort require the implementation of ISimpleFrameSite on the container's site. OLEMISC_ACTSLIKELABEL 
    This value is used with controls. It s the control as a label for whatever control comes after it in the form's ordering. Pressing a mnemonic key for a label control activates the control after it. 
      

  3.   

    我也知道这些是改变窗体风格的,但不知道该用哪些个
    我需要在OCX上面加一副图片,图片的白色部分变成透明,其他颜色部分就显示图片的颜色
    我尝试着做不规则的OCX,但没有实现,所以想到改窗体风格试试