VB.NET用户控制对话框 [英] VB.NET User Control Dialog

查看:120
本文介绍了VB.NET用户控制对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我有表单,就像输入框但它有一个 Keypress Validation 函数(允许带有字符异常的数字,字母或字母数字[例如,允许空格逗号句号等])。几乎所有项目都使用此表单,将其复制并粘贴到我的新解决方案中。我有一个用户控件简单图像查看器并编写了一些有用的功能(PDF到Tiff,合并图像到Tiff,连接到不同的数据库等)。是否可以将表单作为用户控件,就像 Open / SaveFileDialog 一样。如果是,有人可以给我一个提示怎么做



谢谢...

Hello,

I have a Form, it is just like an Input Box but it has a Keypress Validation function (allow numeric, alpha or alphanumeric with character exceptions [eg. allow space comma period etc]). This form is always used in almost all of my projects, copy and pasting it to my new solution. I have a User Control a Simple Image Viewer and coded some useful functions in it (PDF to Tiff, Merge Images to Tiff, Connection to Different Databases, etc). Is it possible to make the Form as a User Control, just like an Open/SaveFileDialog. If it is, can someone give me a hint how to do that

Thanks...

推荐答案

您可以对GUI进行用户控制并使用包含用户控件的通用共享表单,您可以在多个模块中使用它。



这可以完成如下



右键单击项目

添加 - >现有项目 - >添加为链接(选择您的表单并右键单击)





这将在多个模块中共享您的表格




或者另一种方法是将表单用作DLL并将其添加为项目的参考
You can make a user control for GUI and Use a common shared Form which contains your user control with which you can use it in Multiple modules.

This can be done as follows

Right click Project
Add->Existing Item->Add as link(Select your form and right click)


This will share your form in multiple modules


Or another way is to use the form as DLL and Add it as reference for your project


这篇关于VB.NET用户控制对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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