VS2005开发Addin时,如何知道设计器上的控件和属性。 请知道的给个提示,我死活也没找出来 。因为不想去读 代码来识别。想直接使用 接口提供的 对象来操纵。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.cnblogs.com/dudu/archive/2007/02/06/642229.htmlhttp://www.cnblogs.com/dudu/archive/2007/02/01/635746.html http://www.chenjiliang.com/Article/View.aspx?ArticleID=513&TypeID=73 public void AddControlsDelegate(DTE2 dte){ Project prj = (Project)((Array)dte.ActiveSolutionProjects).GetValue(0); ProjectItem item = prj.ProjectItems.Item("Form1.cs") as ProjectItem; Window itemDesigner = item.Open(Constants.vsViewKindDesigner); itemDesigner.Activate(); IDesignerHost host = itemDesigner.Object as IDesignerHost; IContainer ic = host.Container; (ic.Components["textBox1"] as System.Windows.Forms.TextBox).Size = new Size(200, 21); foreach (IComponent cp in ic.Components) { if (cp is System.Windows.Forms.Button) { (cp as System.Windows.Forms.Button).Text = "aa"; } }} 关于LIST<E> LIST<T> ArrayList<E> 的疑问 求代码,谢谢! 关闭窗口来触发服务器控件事件 急!请高手快来帮忙啊. 用C#创建带用户名和密码的ACCESS数据库的字符串该怎么写? 求一个p2p的c/s代码. 急急急 XDE画出一个图出来打印的时候本来一张纸可以打完的,它硬是分两张纸来打,怎么调上边距和左边距? 如何保存在窗体客户区所绘的图形? 设置的Internet中的 打印背景颜色和图象 选项在注册表中的位置在哪? 如何实现字体放大?? c# 下的opengl开发 c#中用什么结束程序
http://www.cnblogs.com/dudu/archive/2007/02/01/635746.html
{
Project prj = (Project)((Array)dte.ActiveSolutionProjects).GetValue(0);
ProjectItem item = prj.ProjectItems.Item("Form1.cs") as ProjectItem;
Window itemDesigner = item.Open(Constants.vsViewKindDesigner);
itemDesigner.Activate();
IDesignerHost host = itemDesigner.Object as IDesignerHost; IContainer ic = host.Container; (ic.Components["textBox1"] as System.Windows.Forms.TextBox).Size = new Size(200, 21); foreach (IComponent cp in ic.Components)
{
if (cp is System.Windows.Forms.Button)
{
(cp as System.Windows.Forms.Button).Text = "aa";
}
}
}