home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,503 of 10,840   
   mickey    
   Re: ocx question   
   16 May 05 17:43:02   
   
   On Mon, 16 May 2005 07:52:40 -0700, "Steve Gerrard"   
    you typed some letters in random order:   
      
   Thank you Steve for your insight.   
      
   >> My question is:   
   >> How can I resize the OCX I draw on a project   
   >> within the ocx-code.   
   >>   
   >>   
   >> My next questions is, is it usefull to create this activex-control?   
   >>   
   >>   
   >   
   >1. You can resize the control within its own code, but you might want to check   
   >for the scalemode of the container it is in. See the Ambient.ScaleUnits   
   >property. Normally the size and placement of a control is managed by the   
   >container, not the control itself.   
   >This will work in the usual Twips situation:   
   >   
   >Private Sub UserControl_Click()   
   >    UserControl.Width = 1000   
   >    UserControl.Height = 1000   
   >End Sub   
   >   
      
   I'm not sure what the ' Ambient.ScaleUnits property' is. But perhaps   
   I'm not very clear on what I need.   
      
   Lets say you draw a listbox on a form. When you change the fontsize   
   for the listbox, the list box 'snaps' in a certain height depending on   
   the fontsize.   
      
   This is 'sort of' what i'm looking for. When my 'stile' is set to 0   
   I would like the object to snaps in a certain width   
      
   >2. User controls are very useful. I would not bother with actually building it   
   >as an OCX; this gets into annoying problems with registration, binary   
   >compatibility, and other such noise. Just add the user control source code   
   >file(s) to any project where you need it.   
      
   oke. Knowing this probably saves me time figuring it out   
      
   thank you   
   Groetjenz,   
      
   Mickey   
   --   
   #### gewoan skrieve su ast ut seist ####   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca