在窗体设计模式下在自定义容器控件上拖动并找到控件? [英] Drag and locate control on custom container control on Form design mode?

查看:52
本文介绍了在窗体设计模式下在自定义容器控件上拖动并找到控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个自定义容器控件(A),将其构建并将其拖到Form,我想将MenuStrip(B)从工具箱拖到A,然后B始终位于给定位置.我该如何用A编码?谢谢.

I create a custom container control (A), build it and drag it to Form, i want to drag a MenuStrip (B) from Toolbox to A then B is always located at given position. How do i have to code in A? Thanks.

推荐答案

由于自定义控件已经构建,您将拥有主要形式的代码.

如果要在自定义控件上显示菜单,则需要在自定义控件中添加菜单..而不是在主窗体上.

如果您想知道在哪里为菜单编写代码.只需双击它们即可..您将进入代码视图.
You will have code in main form as the custom control is already built.

If you want to have menu on custom control, then you need to add menus in custom control.. not on main form.

If you want to know where to write code for Menus. Just double-click on them.. you will go to code view.


这篇关于在窗体设计模式下在自定义容器控件上拖动并找到控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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