Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > UserControl as a .OCX or a .DLL


Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2007, 05:20 PM
Robert Collins Robert Collins is offline
Contributor
 
Join Date: May 2004
Posts: 695
Default UserControl as a .OCX or a .DLL


What's the difference?

If I make a UC using VB6 does it restrict me to saving the UC as a .OCX or can I save it as a .DLL?

How would I go about making a .DLL UC?
Reply With Quote
  #2  
Old 10-05-2007, 06:27 PM
LaVolpe's Avatar
LaVolpe LaVolpe is offline
Ultimate Contributor

* Expert *
 
Join Date: Apr 2004
Location: Illinois
Posts: 2,499
Default

In simple terms, they are very similar. Though a UC is graphical in nature. UCs allow users to set design time properties and DLLs don't. UC settings can be persisted (from VB instance to VB instance), DLLs cannot ... unless it writes a "propertybag" like file (.net changes that). DLLs don't have UC properties like ReadProperties, AmbientChanged, Click, etc, etc. So, I would say simply, they are not really interchangeable. Though converting DLL to OCX is much simpler because the main DLL class' code page can almost be pasted whole inside a blank UC's code page and requires very little modifications.
__________________
Insomnia is a simple byproduct of "it can't be done" {Window Shaper}
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->