|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
UserControls Blessing and CurseVB6SP6
Trying to work with UserControls What are the secrets? e.g. SHIFT F2 gives me "Can't jump to ... because it is hidden. Huh? it is part of the project in the Project Group. I am sure I will discover more. A tutorial would be nice. Other than having the ability (not used for some UserControls I have seen) to have a visual interface, why use a UserControl and not a class? > Other than having the ability (not used for some UserControls I have seen) I think that's it. A UserControl basically gives you> to have a visual interface, why use a UserControl and not a class? > a blank window with an hWnd and the VB wrapper properties (left, top, setfocus, etc.) That makes it very easy to use at design time for owner-drawn controls, makes it subclass-able, and make it a usable base for positioning other controls if you want to make a compound control. (I don't have the slightest idea what SHIFT F2 is, though.) For more info. see here: http://pntpm3.ulb.ac.be/Info/Activex/ It's Dan Aplpleman's ActiveX book online. There's not much info. around about UserControls, but the pages at that link at least describe many of the unique qualities and events that you should be aware of. "mayayana" <mayaXXyan***@mindXXspring.com> wrote in message Go To Definitionnews:ur$qgc8KIHA.6108@TK2MSFTNGP03.phx.gbl... > (I don't have the slightest idea what SHIFT F2 is, though.)
Show quote
Hide quote
"Lorin" <Lo***@discussions.microsoft.com> wrote in message For your own user controls, don't make them a separate project, and don't news:43372BAD-3BAB-48E2-B4A4-B84312D017A1@microsoft.com... > VB6SP6 > Trying to work with UserControls > What are the secrets? > e.g. > SHIFT F2 gives me "Can't jump to ... because it is hidden. > > Huh? it is part of the project in the Project Group. > I am sure I will discover more. > A tutorial would be nice. > > Other than having the ability (not used for some UserControls I have seen) > to have a visual interface, why use a UserControl and not a class? > compile them to an OCX, there is no need. I use them all the time, and none of them are OCXed. Just put them in your project along with forms and classes. The only reason to make an OCX is if you want to distribute the control to other developers. Besides an actual visual interface, a user control can also receive messages from the OS, producing events in the control. That's why a timer control, for instance, despite not being visible, is a control, not just a class. Other than that, the only benefit is that you can drop them onto a form to use them. Most of mine (maybe all) have visual elements. I think they are a great way to re-use parts of forms, and to combine relevant code with a set of controls.
I used to use VB but...
Log file access DDE Problem Unknown error 50003 problems with packaging and deploying VB6 Some Trouble with SSTAB and ComboBoxes List proceedure names all files Program 'hangs' on password protected screensaver..... Problems creating a recordset with a Command-Object Question in exe size..RESOLVED |
|||||||||||||||||||||||