如何从另一个类库中的表单访问另一个类库中的表单 [英] how to access form which is inside another class library from a form which is in another class library

查看:79
本文介绍了如何从另一个类库中的表单访问另一个类库中的表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在两个不同的类库中有两种不同的形式

我想打开一个具有摄像头功能的表单,正在加载form1

如何执行此类任务,请提供代码帮助

关于bishnu

hi frens,

i have two different forms inside two different class library

i want to open a form which has camera feature is form1 is loading

how to perform such task please help with the code

with regards bishnu

推荐答案

首先构建您的Class Library,然后构建 ^ ]添加到它.
您现在可以在Class Library中使用Form,就像在.NET
中使用任何Class一样
First build your Class Library and then add a reference[^] to it in the Project you want to use it in.
You can now use the Form in your Class Library as you could use any Class in .NET
// Make sure you use the namespace of your Class Library.
MyClassLibrary.CameraForm camForm = new MyClassLibrary.CameraForm();
camForm.Show();


这篇关于如何从另一个类库中的表单访问另一个类库中的表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆