惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Security Latest
Security Latest
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
V
V2EX
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tenable Blog
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
Lohrmann on Cybersecurity
F
Full Disclosure
H
Help Net Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
O
OpenAI News
S
Securelist

博客园 - 堕落的卖猪贩

GridView,IE浏览器去掉行右边竖的黑线 用ThoughtWorks.QRCode生成二维码时出现“索引超出了数组界限”的错误 ViewState提交后丢失,竟然是OnInit搞的鬼 经典情景剧,我爱我家 ASP.NET生成WORD文档,服务器部署注意事项 position:absolute; div居中 WIN2003 IIS6 FastCGI php5.33配置重点 安装程序检测到计算机重新启动操作可能处于挂起状态 的解决方法[转] Windows 2008非服务器使用系统设置 SQL2008安装常见问题 windows 2008安装KB971513,API3.0提示更新不会应用到系统 将远程桌面mstsc放到桌面 ul li做标题列表中间出现多的一个空行,重复。 windows2008配置来 winform笔记 Eval()、XPath() 和 Bind() 这类数据绑定方法只能在数据绑定控件的上下文中使用 - 堕落的卖猪贩 Server Application Unavailable - 堕落的卖猪贩 深度GHOST安装,GHOST完毕后不能启动继续 CSS+JS;JS+CSS换肤总结
C#控件访问调用它的父级页面
堕落的卖猪贩 · 2017-11-23 · via 博客园 - 堕落的卖猪贩

你建立一个winform程序,出来一个默认窗体Form1,再添加一个UserControl,默认名字为UserControl1;
在Form1的窗口里写如下的代码:
   public partial class Form1 : Form
    {
         //寂义一个UserControl1对象
        UserControl1 obj = new UserControl1();
        public Form1()
        {
            InitializeComponent();
            //把obj的父窗体指定为Form1
            obj.Parent = this;
        }
         //在UserControl1要调用的函数
        public void ShowMess()
        {
            MessageBox.Show("sssss");
        }
    }
在UserControl1 里面添加一个Button1,在Button1的Click事件里写上
        private void button1_Click(object sender, EventArgs e)
        {
            //调用父窗口里的函数ShowMess()
            ((Form1)this.ParentForm).ShowMess();
        }'

摘自http://bbs.csdn.net/topics/320181298,存记。