DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: ActiveX Control Visibility

  1. #1
    Vini Guest

    ActiveX Control Visibility


    I have created an ActiveX control that shows a calendar control on clicking.
    The problem is that if the control is palced near the bottom of the form
    the calendar is only half visible till the boundary of the form. Can the
    control exceed the form boundary without resizing the form

    Thanks
    Vini

  2. #2
    Mike Culley Guest

    Re: ActiveX Control Visibility


    Vini,

    This is not possible. The control is a child window of the form, which cannot
    go beyond the bounds of the form.

    But, you could put the calendar on another form and show this form when reqd.
    Make the form borderless. The form can be part of a UserControl project if
    you are doing it that way.

    Michael Culley

    "Vini" <vini_b@hotmail.com> wrote:
    >
    >I have created an ActiveX control that shows a calendar control on clicking.
    >The problem is that if the control is palced near the bottom of the form
    >the calendar is only half visible till the boundary of the form. Can the
    >control exceed the form boundary without resizing the form
    >
    >Thanks
    >Vini



  3. #3
    Jonathan Crossland Guest

    Re: ActiveX Control Visibility


    "Mike Culley" <m_culley@one.net.au> wrote:
    >
    >Vini,
    >
    >This is not possible. The control is a child window of the form, which cannot
    >go beyond the bounds of the form.
    >
    >But, you could put the calendar on another form and show this form when

    reqd.
    >Make the form borderless. The form can be part of a UserControl project

    if
    >you are doing it that way.
    >
    >Michael Culley
    >
    >"Vini" <vini_b@hotmail.com> wrote:
    >>
    >>I have created an ActiveX control that shows a calendar control on clicking.
    >>The problem is that if the control is palced near the bottom of the form
    >>the calendar is only half visible till the boundary of the form. Can the
    >>control exceed the form boundary without resizing the form
    >>
    >>Thanks
    >>Vini

    >


    Vini, this is possible.
    Use the SetParent API call.
    With this you can change the parent of the control in question and therefore
    will not be restricted by the form's region.
    You will have to use placement API like SetWindowPos, ClientToScreen, ScreenToClient
    to get the Top and Left correct.
    remember that it deals with pixels.


  4. #4
    Michael Culley Guest

    Re: ActiveX Control Visibility


    Vini,

    I would not recommend this method. A control that changes its parent is asking
    for trouble. The method of showing a form is much safer.

    Michael Culley

    "Jonathan Crossland" <jamon@webmail.co.za> wrote:
    >
    >"Mike Culley" <m_culley@one.net.au> wrote:
    >>
    >>Vini,
    >>
    >>This is not possible. The control is a child window of the form, which

    cannot
    >>go beyond the bounds of the form.
    >>
    >>But, you could put the calendar on another form and show this form when

    >reqd.
    >>Make the form borderless. The form can be part of a UserControl project

    >if
    >>you are doing it that way.
    >>
    >>Michael Culley
    >>
    >>"Vini" <vini_b@hotmail.com> wrote:
    >>>
    >>>I have created an ActiveX control that shows a calendar control on clicking.
    >>>The problem is that if the control is palced near the bottom of the form
    >>>the calendar is only half visible till the boundary of the form. Can the
    >>>control exceed the form boundary without resizing the form
    >>>
    >>>Thanks
    >>>Vini

    >>

    >
    >Vini, this is possible.
    >Use the SetParent API call.
    >With this you can change the parent of the control in question and therefore
    >will not be restricted by the form's region.
    >You will have to use placement API like SetWindowPos, ClientToScreen, ScreenToClient
    >to get the Top and Left correct.
    >remember that it deals with pixels.
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center