Okay so I have a few problems that I need help with. The main one being Multi Form Access.

Multi-Form Access:
How would I go about accessing items in a secondary form. Like with .NET it would be:

'.NET Syntax'

formName.itemName.Enabled = true

'or'

formName.itemName.Enabled = false

However this isn't working with C# and I can't seem to figure it out.


DLLs:
I'm making multiple DLLs for the various applications that are included inside of my main application. I believe these are technically called "plug-ins". The idea is for the user to download the DLL then put it in a folder named "Plugins" in the resource area. I don't want all of them to be available for usage at run time unless they have been activated into the program and the user has the DLL in the folder named "Plugins". My questions are:

1: How do I set this up in such a manner. I would need the program to check and see if the DLL files are in the Plugins folder and if they aren't then just do nothing. If they are then plug them into the application.

2: How to store the fact that they've been activated into the program somehow after run time. (Some sort of encryption activation. For testing purposes I have it using a 16 character encryption not including the hyphens inbetween sets of four. xxxx-xxxx-xxxx-xxxx)


Much thanks to whoever helps. :D

Create the Form instances in Program.cs File, main one. Then all the Items in every individual form can be accessible in another form.

Create the Form instances in Program.cs File, main one. Then all the Items in every individual form can be accessible in another form.

This is a bad idea.

Anything you need access to on a secondary form should have a property providing you with the appropriate access (get, set). If you need to pass initial data to a form, then create a constructor for the form with the appropriate parameters.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.