Results 1 to 6 of 6

Thread: how to make ocx not resizable?

  1. #1

    Thread Starter
    Lively Member cargobay69's Avatar
    Join Date
    Nov 2001
    Location
    Kessel Prison Camp
    Posts
    97

    how to make ocx not resizable?

    How can i make my active x control not sizeable at design-time? By 'design time' i don't mean when I'm designing the control, but after the control is compiled and being used in another program (the other program's design time). Like how the timer and common dialog box control are not sizable.

    Thanks
    Darrin@CB69
    -----------------------------------------------
    Arrogance kills brain cells
    -----------------------------------------------
    Private Sub Sandwich (big As Byte)
    On Error GoTo Pub

  2. #2
    New Member
    Join Date
    Nov 2002
    Location
    Nerdtherlands
    Posts
    3
    Yes, I was asking the same thing, but nobody replyed. Is must be verry hard to do that.

    http://www.vbforums.com/showthread.p...hreadid=214263

  3. #3
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. Private Const STD_WIDTH = 200
    2. Private Const STD_HEIGHT = STD_WIDTH
    3.  
    4. Private Sub Usercontrol_Resize()
    5.    
    6.     With Usercontrol
    7.         .Width = STD_WIDTH
    8.         .Height = STD_HEIGHT
    9.     End With
    10.  
    11. End Sub

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  4. #4
    New Member
    Join Date
    Nov 2002
    Location
    Nerdtherlands
    Posts
    3
    Yes, but how can you do that in Visual C++?

  5. #5

    Thread Starter
    Lively Member cargobay69's Avatar
    Join Date
    Nov 2001
    Location
    Kessel Prison Camp
    Posts
    97
    crptcblade, yeah, i thought about that, but that's not what i want. Using your code, the user still has the ability to drag the edges out, it just snaps back when they let their finger off the mouse. Sorry bud, but that's ugly. I don't even want that little double-ended arrow to appear when the cursor hovers over the boarder. Like I said "Like how the timer and common dialog box control are not sizable." (i.e., no little resizing cursor). Thanks for the reply, any more ideas?
    Darrin@CB69
    -----------------------------------------------
    Arrogance kills brain cells
    -----------------------------------------------
    Private Sub Sandwich (big As Byte)
    On Error GoTo Pub

  6. #6
    Fanatic Member
    Join Date
    Jun 2000
    Location
    Forest
    Posts
    545
    Originally posted by cargobay69
    Like I said "Like how the timer and common dialog box control are not sizable." (i.e., no little resizing cursor). Thanks for the reply, any more ideas?
    Are you sure? I just placed a timer and a common dialog box on my form and I have little arrows to resize. Of course, it snaps back to the original size afterward.

    Anyhow, I usually use the same code that crptcblade post. I figure that once it is on a form, it just snaps back to the set size. By the way, I think that is how the timer and common dialog box work too because I can resize those controls but it just snaps back to the original size.
    Bird of Prey

    Mr. Bald Eagle.
    [img][/img]

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