WebControl rendering an ActiveX ctrl - design time problem

Discussion in 'ASP .Net Building Controls' started by Gergely Varadi, Jul 25, 2003.

  1. I develop webcontrols that render ActiveX controls. In the
    GetDesignTimeHTML() I simply call the MyControl.RenderControl() method
    that generates the client-side code and appends some other HTML stuff:

    public override string GetDesignTimeHtml()
    {
    StringWriter sw = new StringWriter();
    HtmlTextWriter htw = new HtmlTextWriter(sw);
    ((MyControl)this.Component).RenderControl(htw);

    string sHTML = sw.ToString();
    sHTML += "<p>Some info for debugging that in release I don't want.";
    }

    public override void RenderBeginTag{HtmlTextWriter writer)
    {
    writer.WriteBeginTag("OBJECT");
    //Render ActiveX control of the given classid
    writer.WriteAttribute("CLASSID", "clsid:" + this.ClassInfo);
    ...
    }

    Now the problem is that if I drop this webcontrol on an aspx page then
    the mouse-actions work really strange:

    -right-clicking on the webcontrol's surface gets me the right-click
    popup menu (as desired) be it the ActiveX control or the "Some info
    for debugging..." text.
    -left-clicking on the webcontrol's surface depends. If I move the
    mouse on the ActiveX, it has arrow-cursor swallowing the left-click,
    yet moving on the text "Some info for debugging..." the mouse cursor
    becomes a four direction arrow allowing me to move the control on the
    page.

    I presume that the ActiveX control gets window messages like in Visual
    Inderdev it did. However, FrontPage can handle this situation.

    Why this difference and how can I move a WebControl rendering solely
    an ActiveX ctrl?
    Gergely Varadi, Jul 25, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Danny

    Implement Ctrl-C, Ctrl-V

    Danny, Aug 14, 2003, in forum: C++
    Replies:
    5
    Views:
    630
    CBFalconer
    Aug 15, 2003
  2. Danny

    Implement Ctrl-C, Ctrl-V

    Danny, Aug 14, 2003, in forum: C Programming
    Replies:
    5
    Views:
    643
    CBFalconer
    Aug 15, 2003
  3. Angus
    Replies:
    5
    Views:
    2,080
    Michael Rauscher
    Nov 18, 2006
  4. Replies:
    2
    Views:
    1,389
    Munna
    Jul 10, 2008
  5. Replies:
    0
    Views:
    540
Loading...

Share This Page