hi.
i am developing MIS application in c#, i managed my forms in separte folders e.g (Hostel,students,transport ) these are all folder names in which the corresponding forms are present. but when i want to access the forms by code they are not accessible(visible) TO CODE. so how to access them???
regards.
Loading

Satish BhatRank #2,496 · 563 reputationPosted Aug 18, 2011, 11:05 PM EDT
Usually when you create a folder and add a form inside that folder in Visual Studio, it adds the form in the AppName.FolderName namespace.
e.g. If you add a form Form1 in Hostel folder then it will be in the namespace [YourApplicationName].Hostel
Now when the second form Form2 which is in Students folder then it is in the namespace [YourApplicationName].Students
So if you want to access Form1 from Form2, you have to access either by calling [YourApplicationName].Hostel.Form1 or importing the [YourApplicationName].Hostel namespace (by using directive in C#).
Basically VS intellisense will not show the form directly when they are in different namespaces and you have not imported the namespace.
Sam HobbsRank #107 · 20.5K reputationPosted Aug 17, 2011, 3:52 PM EDT
mansoor altaf67 reputationPosted Aug 18, 2011, 10:30 PM EDT
mansoor altaf67 reputationPosted Aug 18, 2011, 11:30 PM EDT
Satish BhatRank #2,496 · 563 reputationPosted Aug 18, 2011, 11:32 PM EDT
sufy azeem2 reputationPosted Dec 16, 2013, 7:02 AM EST
SADAM HUSSAIN49 reputationPosted Jan 6, 2017, 1:13 AM EST
Satish Bhat
Thank you very much Satish.