473,804 Members | 3,126 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MDI Children and DLLs

Hi All,

I have a VB.NET MDI application with several MDI Child forms. Each of the
MDI Child forms has a significant amount of code. What I think I would like
to do is create a DLL for each child form, so that if I need to make changes
to a particular form, I can just update the DLL for that form and have the
user download just the new DLL.

From the main menu of the MDI parent, a user selects a particular task,
which generally involves processing information from a particular type of
file. The user selects the file using an OpenFileDialog. then I do a bit of
checking to make sure the file is the right type of file for the particular
task selected. If it is, I open the MDI Child form and pass the filename and
some other information to the form.

From this point, all processing is done from the Child form.

So, is it possible to take the entire form and put it in a DLL? Or can I
only take the form functionality (various subs and functions) and move them
to a DLL?

TIA
Lee
Nov 21 '05 #1
12 2518
Hi,

Billy Hollis did a talk about this at a orlando dot net user group
meeting. Here is a link to the sample code he wrote.

http://www.dotnetmasters.com/Downloa...msOnTheFly.zip

Ken
--------------
"lgbjr" <lg***@nospam.c om> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi All,

I have a VB.NET MDI application with several MDI Child forms. Each of the
MDI Child forms has a significant amount of code. What I think I would
like to do is create a DLL for each child form, so that if I need to make
changes to a particular form, I can just update the DLL for that form and
have the user download just the new DLL.

From the main menu of the MDI parent, a user selects a particular task,
which generally involves processing information from a particular type of
file. The user selects the file using an OpenFileDialog. then I do a bit
of checking to make sure the file is the right type of file for the
particular task selected. If it is, I open the MDI Child form and pass the
filename and some other information to the form.

From this point, all processing is done from the Child form.

So, is it possible to take the entire form and put it in a DLL? Or can I
only take the form functionality (various subs and functions) and move
them to a DLL?

TIA
Lee

Nov 21 '05 #2
Hi Ken,

thanks for the reply. And thanks for the link. I see what he's doing and it
looks fairly easy to implement.

One question though. I don't see a way to pass information from the MDI
parent to the dynamically loaded form. I have a feeling this is a trivial
matter, but I'm not sure how to do it.

Regards,
Lee

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

Billy Hollis did a talk about this at a orlando dot net user group
meeting. Here is a link to the sample code he wrote.

http://www.dotnetmasters.com/Downloa...msOnTheFly.zip

Ken
--------------
"lgbjr" <lg***@nospam.c om> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi All,

I have a VB.NET MDI application with several MDI Child forms. Each of the
MDI Child forms has a significant amount of code. What I think I would
like to do is create a DLL for each child form, so that if I need to make
changes to a particular form, I can just update the DLL for that form and
have the user download just the new DLL.

From the main menu of the MDI parent, a user selects a particular task,
which generally involves processing information from a particular type of
file. The user selects the file using an OpenFileDialog. then I do a bit
of checking to make sure the file is the right type of file for the
particular task selected. If it is, I open the MDI Child form and pass
the filename and some other information to the form.

From this point, all processing is done from the Child form.

So, is it possible to take the entire form and put it in a DLL? Or can I
only take the form functionality (various subs and functions) and move
them to a DLL?

TIA
Lee


Nov 21 '05 #3
Hi All,

To be more specific about my previous post:

Currently, in my MDI Parent Form, I have a public class with public shared
variables that are passed to the MDI child forms.

changing the Child forms to be dynamically loaded (ChildForm.dll) , I can't
figure out how to pass the public shared variables to the form when it's
loaded.

Can I expose the public class with my public shared variables in the MDI
parent form to the childform.dll? Or, how do I pass the public shared
variables to the dll?

TIA
Lee

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

Billy Hollis did a talk about this at a orlando dot net user group
meeting. Here is a link to the sample code he wrote.

http://www.dotnetmasters.com/Downloa...msOnTheFly.zip

Ken
--------------
"lgbjr" <lg***@nospam.c om> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi All,

I have a VB.NET MDI application with several MDI Child forms. Each of the
MDI Child forms has a significant amount of code. What I think I would
like to do is create a DLL for each child form, so that if I need to make
changes to a particular form, I can just update the DLL for that form and
have the user download just the new DLL.

From the main menu of the MDI parent, a user selects a particular task,
which generally involves processing information from a particular type of
file. The user selects the file using an OpenFileDialog. then I do a bit
of checking to make sure the file is the right type of file for the
particular task selected. If it is, I open the MDI Child form and pass
the filename and some other information to the form.

From this point, all processing is done from the Child form.

So, is it possible to take the entire form and put it in a DLL? Or can I
only take the form functionality (various subs and functions) and move
them to a DLL?

TIA
Lee


Nov 21 '05 #4
Lee,

This overlay approach was very nice in MS Dos computers. Your mdi forms are
seperated classes. If you use them right, than they will be consequently be
released by the GC. (With right I mean not creating everything in a shared
way)

The DLL's that you want to create are libarys as is by instance as well the
Net DLL and the MicrosoftVB DLL. The code taken from that will be included
in your exe.

For MDI is that not such a nice approach to create those librarys because
the change that you reuse them is very low. It can of course be a good
approach to create such a library for your own standard usercontrols,
templateforms or whatever.

I hope that this gives an idea

Cor

Nov 21 '05 #5
Hi Cor,

I agree with what you say. The only form that has anything declared as
shared is the MDI parent, and it is nice that once the child form (its own
class) is closed, GC takes out the trash.

I also understand that the purpose of a DLL is really for code that is
reused in many different locations, and that putting a form in a DLL is
contrary to this purpose, since the code for the form is only used by the
form.

My purpose for putting the forms in seperate DLLs is two-fold:
1 - Licensing and distribution - The application is really a compilation of
quite a few tools and depending on what the client purchases, I could reduce
the size of the install package by only including the DLLs for what they
purchased
2 - Upgrades - The MDI parent is not likely to change nearly as often as the
child forms. So, as I make changes to the functionality of a particular
child form, the client can download just a new DLL, rather than a much
larger executable that would include all of the code for all of the child
forms.

Make Sense?

Assuming yes, do you have some idea how I can pass variables from the MDI
parent to one of these dynamically loaded forms?

Thanks!!

Lee

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:OR******** ********@TK2MSF TNGP12.phx.gbl. ..
Lee,

This overlay approach was very nice in MS Dos computers. Your mdi forms
are seperated classes. If you use them right, than they will be
consequently be released by the GC. (With right I mean not creating
everything in a shared way)

The DLL's that you want to create are libarys as is by instance as well
the Net DLL and the MicrosoftVB DLL. The code taken from that will be
included in your exe.

For MDI is that not such a nice approach to create those librarys because
the change that you reuse them is very low. It can of course be a good
approach to create such a library for your own standard usercontrols,
templateforms or whatever.

I hope that this gives an idea

Cor

Nov 21 '05 #6
Lee,

In my opinon describes this page your problem (Net is at the bottom)

I hope it helps something,

Cor
Nov 21 '05 #7
Exactly at the bottom of the message is it not.

http://support.microsoft.com/default...b;en-us;815065

:-)))

Cor
Nov 21 '05 #8
Hi,

I would add a property to the forms stored in the dll to passed the
shared data.

Ken
---------------------
"lgbjr" <lg***@nospam.c om> wrote in message
news:%2******** **********@tk2m sftngp13.phx.gb l...
Hi All,

To be more specific about my previous post:

Currently, in my MDI Parent Form, I have a public class with public shared
variables that are passed to the MDI child forms.

changing the Child forms to be dynamically loaded (ChildForm.dll) , I can't
figure out how to pass the public shared variables to the form when it's
loaded.

Can I expose the public class with my public shared variables in the MDI
parent form to the childform.dll? Or, how do I pass the public shared
variables to the dll?

TIA
Lee

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

Billy Hollis did a talk about this at a orlando dot net user group
meeting. Here is a link to the sample code he wrote.

http://www.dotnetmasters.com/Downloa...msOnTheFly.zip

Ken
--------------
"lgbjr" <lg***@nospam.c om> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi All,

I have a VB.NET MDI application with several MDI Child forms. Each of
the MDI Child forms has a significant amount of code. What I think I
would like to do is create a DLL for each child form, so that if I need
to make changes to a particular form, I can just update the DLL for that
form and have the user download just the new DLL.

From the main menu of the MDI parent, a user selects a particular task,
which generally involves processing information from a particular type
of file. The user selects the file using an OpenFileDialog. then I do a
bit of checking to make sure the file is the right type of file for the
particular task selected. If it is, I open the MDI Child form and pass
the filename and some other information to the form.

From this point, all processing is done from the Child form.

So, is it possible to take the entire form and put it in a DLL? Or can I
only take the form functionality (various subs and functions) and move
them to a DLL?

TIA
Lee



Nov 21 '05 #9
Since a form which is an MDIChild has a property "MDIParent" , if you
make the variables public properties of your MDIParent, and set a
reference in the mdichild project to the mdiparent, your mdichild would
be able to access the variables directly from the parent:

[mdiparentprojec t]
[mdiparentform]
public SomeVariable as string
public OtherVariable as integer
sub createchild
'do whatever
end sub
[end form]
[end project]

[mdichild project]
{reference to mdiparent project}
[mdichild form]
sub Form_Load(sende r as object, e as eventargs)
dim MyParent as mdiparent.mdipa rentform
MyParent=ctype( me.mdiparent,md iparentproject. mdiparentform)
me.text=myparen t.SomeVariable
end sub
[end form]
[end project]
In message <eB************ **@TK2MSFTNGP14 .phx.gbl>, lgbjr
<lg***@nospam.c om> writes
Hi Cor,

I agree with what you say. The only form that has anything declared as
shared is the MDI parent, and it is nice that once the child form (its own
class) is closed, GC takes out the trash.

I also understand that the purpose of a DLL is really for code that is
reused in many different locations, and that putting a form in a DLL is
contrary to this purpose, since the code for the form is only used by the
form.

My purpose for putting the forms in seperate DLLs is two-fold:
1 - Licensing and distribution - The application is really a compilation of
quite a few tools and depending on what the client purchases, I could reduce
the size of the install package by only including the DLLs for what they
purchased
2 - Upgrades - The MDI parent is not likely to change nearly as often as the
child forms. So, as I make changes to the functionality of a particular
child form, the client can download just a new DLL, rather than a much
larger executable that would include all of the code for all of the child
forms.

Make Sense?

Assuming yes, do you have some idea how I can pass variables from the MDI
parent to one of these dynamically loaded forms?

Thanks!!

Lee

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:OR******* *********@TK2MS FTNGP12.phx.gbl ...
Lee,

This overlay approach was very nice in MS Dos computers. Your mdi forms
are seperated classes. If you use them right, than they will be
consequently be released by the GC. (With right I mean not creating
everything in a shared way)

The DLL's that you want to create are libarys as is by instance as well
the Net DLL and the MicrosoftVB DLL. The code taken from that will be
included in your exe.

For MDI is that not such a nice approach to create those librarys because
the change that you reuse them is very low. It can of course be a good
approach to create such a library for your own standard usercontrols,
templateforms or whatever.

I hope that this gives an idea

Cor



--
Chris Petchey
Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
2995
by: Laura Conrad | last post by:
I'm writing an application that has to spawn some processes and then kill them later. It doesn't need to talk or listen to them while they're running, but there are stop and start buttons and the stop button should stop everything that gets started by the start button. There are lots of ways to do this on Linux, but this project has to run under cygwin. So far, the only thing I've gotten to work at all under cygwin is doing an...
6
13380
by: Luke Dalessandro | last post by:
I'm not sure if this is the correct forum for platform specific (Mozilla/Firefox) javascript problems, so just shout and point me to the correct newsgroup if I'm being bad. Here's the deal... html file (generated using .NET 2.0 beta2): <form method="post" action="Test2.aspx" id="form1">
2
2865
by: Johann Blake | last post by:
I can hardly believe I'm the first one to report this, but having gone through the newsgroup, it appears that way. I would like to open a solution in the VS.NET IDE that consists of multiple DLLs and a test application (an .EXE). The .EXE is my startup application. All the DLLs are shared components. This means that they contain a key and are stored in the GAC. When I go to run the test application in the IDE, it will not execute...
2
4239
by: Shiraz | last post by:
Hi I just made an installer for an application that uses two external COM dlls. On the surface, everything seems to be running smoothly and the the application runs without any errors. However, I am not completely satisfied by my implementation. I basically used a software that generates an msi file quite easily and included the two dlls in my package. I then edited the msi file using orca, and forced the dlls to self register by...
11
2300
by: Devender Khari | last post by:
Hi Friends, I'm facing a situation as follows, need help on identifying possible issues. There is an MFC application developed in VC6.0, say ABCVC6.exe and another developed in VC.NET, say DEFVCNET.exe. There are a few DLLs that are to be used by these applications. All these DLLs are originally developed in VC6.0 but some of them are now migrated to VC.NET. So, let's say we have PQRVC6.dll and XYZVCNET.dll.
0
3232
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
7
3110
by: Oenone | last post by:
I'm sure there's an obvious way to do this, but I'm missing it so far. I have an ASP.NET application that relies on several DLLs to work. Currently in order to get my site working I have to put them all in the bin/ folder within my web site's directory. As I have numerous web sites, I want to be able to place all of these DLLs just once into a single location elsewhere on the disk (e.g., "D:\DLLs"). I don't want to put them into the...
97
4076
by: Master Programmer | last post by:
Thinking of learning VB.NET? New programmer? Thinking of Moving over from VB 6.0? Read on friend, let me help you make a more informed decision......... Microsoft are a pathetic company, but they have got worse over the last 5 years. Here are just a few reasons (there are many more), not to sacrifice
10
1933
by: =?Utf-8?B?UmljaGFyZA==?= | last post by:
Hi, I usually deploy my ASP .NET application to the server by publishing, using Visual Studio 2005 publish feature. This creates the Bin folder on the server, with the compiled DLLs. I've been asked to publish by copying the files manually instead. I stopped IIS for the application, deleted the application files and subfolders from the server, copied the files and folders from my local PC's project,
0
10564
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10073
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9134
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7609
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6846
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5513
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5645
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4288
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2981
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.