Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2007

Tip: Looking for answers? Try searching our database.

Invoke Assembly Interface from Another Assembly.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ibrahim. - 23 Oct 2007 16:33 GMT
Hello,

I have a DLL Project with some user-controls which implements a Interface
(Exit), this is used to warn the user if any changes done when trying to
close the user-control.

the interface is defined in the DLL project it self, but

the when the 'Cancel' buton is pressed from the user-controls of DLL, I
raise a event to mother project which handles the closing of the user
control,

How can type cast the Interface here?

// MDI FORM.
// tempcontrol is a user control of DLL project.
//iFormExit is defined in DLL project

Internal void OnCancelUserControl(object sender,
CancelDevicePropertyPageEventArgs e)
{
UserControl tempControl = (UserControl)sender;
bool result = (iFormExit)tempControl).IsExitSave();
}

how can I make this work?

Thanks,
Roman Wagner - 24 Oct 2007 13:55 GMT
Hello,

looks like the interface is in the wrong project.

Make a new project for your interface and add a reference to from both
your main project and your control project.
After that you can implement the interface from your controls project
and use it from your main project.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.