Results 1 to 4 of 4

Thread: OCX Question

  1. #1
    Guest

    Question

    Hi!

    I created an OCX (works great, everything's fine with that), but when I add it to my project there are a few properties I don't want.

    I have my own properties - OK with that, but there are also some properties (wich are HEIGHT and WIDTH) I don't want. TOP, LEFT, VISIBLE and others that are added(?) by VB are fine.

    If you take a look at the MS Winsock OCX you'll see it doesn't have the HEIGHT and WIDTH properties and no matter how I size it, it "Jumps" back to it's original/default sizes.

    How can I accomplish this?

  2. #2
    Guest
    No-one?

    OK, I admit... Just bringing it to the top of the list

  3. #3
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Phew!! I spent an hour or so reading over a couple of ActiveX chapters trying to figure this one out, but with no luck, sorry. If there is a way to get rid of certain properties it's a secret someone is ready to come off of yet. As far as keeping the control always the same size here is some code for that.

    Code:
    Private Const I_MAX_WIDTH As Integer = 1000
    Private Const I_MAX_HEIGHT As Integer = 500
    
    Private Sub UserControl_Resize()
        UserControl.Height = I_MAX_HEIGHT
        UserControl.Width = I_MAX_WIDTH
    End Sub
    Good Luck and if you find out the answer, email me PLEASE!!!
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  4. #4
    Guest
    Thanks for helping. Too bad it wasn't exactly what I was looking for But it'll do for now... Thanx again buddy!

    Maybe someone else has any idea?

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