Click to See Complete Forum and Search --> : how to make ocx not resizable?
cargobay69
Nov 25th, 2002, 10:25 AM
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
cdvries
Nov 25th, 2002, 02:54 PM
Yes, I was asking the same thing, but nobody replyed. Is must be verry hard to do that.
http://www.vbforums.com/showthread.php?s=&threadid=214263
crptcblade
Nov 25th, 2002, 10:00 PM
Private Const STD_WIDTH = 200
Private Const STD_HEIGHT = STD_WIDTH
Private Sub Usercontrol_Resize()
With Usercontrol
.Width = STD_WIDTH
.Height = STD_HEIGHT
End With
End Sub
:)
cdvries
Nov 26th, 2002, 07:29 AM
Yes, but how can you do that in Visual C++?
cargobay69
Dec 5th, 2002, 02:31 PM
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?
Hawk
Dec 15th, 2002, 01:48 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.