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,505 of 10,840   
   Steve Gerrard to All   
   Re: ocx question   
   16 May 05 19:06:13   
   
   From: mynamehere@comcast.net   
      
   "mickey"  wrote in message   
   news:jhrh81hoc96pbuu6iuj1utgb7gaah1k8vf@4ax.com...   
   > On Mon, 16 May 2005 17:43:02 +0200, mickey    
   > you typed some letters in random order:   
   >   
   >   
   >>>   
   >>>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 found it...   
   > UserControl.Width = frm_key.width +200   
   >   
   >   
      
   That will work, as long as you use it only on the form frm_key in this project,   
   and change the name in the code when you use it in another project.   
      
   Ambient.ScaleUnits is a property of the Ambient object, which tells your user   
   control a few things about where it has been placed. It could be inside a   
   picturebox, for instance. ScaleUnits is a text string that lets you know if the   
   container is using vbTwips or vbPixels, etc., so you could in principle write   
   some code that would work in any form or container in any project.   
      
   However, one of the nice things about just using the source code where needed   
   is   
   that you can tweak it for each situation, which is often easier.   
      
   Another possibility you might look at is making your control Alignable (its a   
   property), and then in your code, setting its Align property to say   
   vbAlignBottom. This would make it stretch automatically when the form was   
   resized.   
      
   --- 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