Ⅰ 我的VISUAL BASIC工具箱如何添加控制項
VB的工具箱中的控制項是標准控制項,添加其它高級控制項需要通過工程菜單下的部件項來添加.在選定的控制項前打鉤確定即可.
Ⅱ 如何在VS工具箱中添加DevExpress控制項
現在的選項應該是:「全部顯示」。其實那麼多項目,是因為VS是個大雜燴,每個語言和模板只支持一部分控制項,你不能拿office的控制項簡單的放到MFC程序中。
在工具箱中右鍵,去掉「顯示全部」,才是MFC對話框可用控制項。
如果希望使用MFC支持的非標准控制項,在對話框上空白處右鍵,選擇「插入ActiveX控制項」即可。
Ⅲ 在VS2008或VS2010中怎麼使用工具箱中的控制項
這里,你現在的選項應該是:「全部顯示」。其實那麼多項目,是因為VS是個大雜燴專,每個語言和模板只支持一部分屬控制項,你不能拿office的控制項簡單的放到MFC程序中。
在工具箱中右鍵,去掉「顯示全部」,才是MFC對話框可用控制項。
如果希望使用MFC支持的非標准控制項,在對話框上空白處右鍵,選擇「插入ActiveX控制項」即可。
Ⅳ vs2010 工具箱中怎麼添加自定義控制項
vs2010中展示的知識我們常見的控制項,但是一些特殊的、不常用的我們可以通過單擊內右鍵添容加一些控制項給自己用,你可以根據自己的需要添加上去,定製一個比較個性的工具箱,當然你自己製作的用戶控制項也可以添加到工具箱上面。
Ⅳ vs2008 工具箱怎麼添加控制項
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4>Oh snap! You got an error!</h4>
<p>Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.</p>
<p>
<button type="button" class="btn btn-danger">Take this action</button>
<button type="button" class="btn btn-success">Or do this</button>
</p>
</div>
Ⅵ 我想在軟體中加一個類似於VS工具箱的窗口,c#中有這種控制項嗎
1.可以直接分組的控制項有,treeView
2.像qq一樣的分組:自己用BUTTON或者PANEL寫一個,可以用location貨dock來改變
3.自己寫控制項,其實很簡單的,DOWNLOAD點資料就ok了
4.第三方調用,比如DevComponents
記得給我點分哦!http://www.dotnetmagic.com/downloads/Magic174AndKrypton.zip
還有用NavBarControl這個,下載地址自己找
或者重寫treeview
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace SiteView.Ecc.MMC.UserContorls
{
/// <summary>
/// 繼承TreeView控制項,實現VS工具箱風格
/// </summary>
class ToolBox :TreeView
{
public ToolBox()
{
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
this.SetStyle(ControlStyles.EnableNotifyMessage, true);
this.ShowLines = false;
this.HotTracking = true;
this.FullRowSelect = true;
this.DrawMode = TreeViewDrawMode.OwnerDrawAll;
this.Nodes.Add("test");
}
/// <summary>
/// 重新DrawNode方法
/// </summary>
/// <param name="e"></param>
protected override void OnDrawNode(DrawTreeNodeEventArgs e)
{
//base.OnDrawNode(e);
if(e.Node.Level == 0)
{
DrawRoot(e);
}
else
{
DrawItem(e);
}
}
/// <summary>
/// 繪制根節點
/// </summary>
/// <param name="e"></param>
private void DrawRoot(DrawTreeNodeEventArgs e)
{
try
{
Rectangle rect = e.Bounds;
rect.Y += 1;
rect.Width -= 1;
rect.Height -= 3;
if(e.Node.IsSelected)
//if (e.State == TreeNodeStates.Marked || e.State == TreeNodeStates.Selected)
{
using (System.Drawing.Brush selBrush = new System.Drawing.SolidBrush(Color.FromArgb(225, 230, 232)))
using (System.Drawing.Pen outerPen = new System.Drawing.Pen(Color.FromArgb(49, 106, 197)))
{
e.Graphics.FillRectangle(selBrush, rect);
e.Graphics.DrawRectangle(outerPen, rect);
}
}
else
{
using (System.Drawing.Drawing2D.LinearGradientBrush lgBrush = new System.Drawing.Drawing2D.LinearGradientBrush(e.Bounds, Color.FromArgb(221, 220, 203), Color.FromArgb(196, 193, 176), LinearGradientMode.Vertical))
using (System.Drawing.Pen linePen = new System.Drawing.Pen(this.BackColor))
{
e.Graphics.FillRectangle(lgBrush, rect);
e.Graphics.DrawLine(linePen, 0, rect.Bottom - 2, rect.Width, rect.Bottom - 2);
}
}
if (e.Node.IsExpanded == true)
{
//e.Graphics.DrawImage(this.imageList3.Images[0], new Point(rect.Left + 3, rect.Top + 4));
e.Graphics.DrawImage(IconResource.expanded, new Rectangle(rect.Left + 3, rect.Top + 4, 10, 10));
}
else
{
e.Graphics.DrawImage(IconResource.collapsed, new Rectangle(rect.Left + 3, rect.Top + 4, 10, 10));
}
rect.Offset(16, 2);
e.Graphics.DrawString(e.Node.Text, new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0))), SystemBrushes.ControlText, rect.Location);
}
catch (Exception ex)
{
//隱藏錯誤
//log.Error("繪制根節點", ex);
}
}
private System.Drawing.Brush selBrush = new System.Drawing.SolidBrush(Color.FromArgb(175, Color.Gold));
private System.Drawing.Pen pen = SystemPens.HotTrack;
/// <summary>
/// 繪制子結點
/// </summary>
/// <param name="e"></param>
private void DrawItem(DrawTreeNodeEventArgs e)
{
try
{
Rectangle nodeTextRect = e.Bounds;
nodeTextRect.Width -= 1;
nodeTextRect.Height -= 1;
Rectangle rect = e.Bounds;
rect.Inflate(-1, -1);
if (e.Node.IsSelected)
{
e.Graphics.FillRectangle(selBrush, rect);
e.Graphics.DrawRectangle(pen, rect);
}
else
{
e.Graphics.FillRectangle(new System.Drawing.SolidBrush(e.Node.BackColor), e.Bounds);
e.Graphics.DrawRectangle(new System.Drawing.Pen(e.Node.BackColor), e.Bounds);
}
if (this.ImageList != null && e.Node.ImageIndex < this.ImageList.Images.Count)
{
e.Graphics.DrawImage(this.ImageList.Images[e.Node.ImageIndex], new Point(e.Bounds.Left + 3, e.Bounds.Top + 2));
}
nodeTextRect.Offset(20, 3);
e.Graphics.DrawString(e.Node.Text, this.Font, SystemBrushes.ControlText, nodeTextRect.Location);
}
catch (Exception ex)
{
//隱藏錯誤
//log.Error("繪制子節點", ex);
}
}
}
}
還有兩個資源文件,一個加號圖片(IconResource.expanded),一個減號圖片(IconResource.collapsed)。你自己做兩張圖片加進去
Ⅶ visual studio怎麼手動添加工具箱控制項
在你已有的項目的基礎上,點擊「視圖」會出現下面圖片的內容,然後點擊「工具箱」,跳到第2步驟。
出現下圖的內容,但什麼都沒有,跳到第3步驟。
在空白處點擊右鍵,會出現下圖內容,然後點擊「選擇項」,跳到第4步驟。
然後點擊「Silverlight組件」,如果下面方框沒有內容,就跳到第5步驟;如果有內容,就跳到第10步驟
打開電腦的「控制面板」,找到「程序和功能」,點進去,然後跳到第6步驟。
找到安裝好的visual studio,點擊然後再選擇圖中的「更改「,跳到第7步驟。
的一會兒會得到下面界面,選擇」Modify「,跳到第8步驟。
選擇」Windows and Web Developer Tools「下的」Silverlight Developer Kit「然後點擊" Next ",接下來就是等待(關鍵還是看網速),安裝完成之後,跳到第9步驟。
再在工具箱空白處點擊右鍵,選擇」顯示全部「,跳到第10步驟。
下圖看到的就是你想要的」控制項「了。
Ⅷ visual studio 打開工具箱沒有可用的控制項,提示說「將某項拖至此文本可將其添加到工具箱」,應該怎麼辦
1、在你已有的項目的基礎上點擊「工具欄」。
Ⅸ 為什麼我在VS2010的工具箱里的選擇項裡面添加控制項後,在工具箱里找不到
用窗口寫
Ⅹ 在vs 2008中如何添加工具箱中沒有的控制項
從「項目」菜抄單找到「添加引用」。
「添加引用」應該那個菜單的下面吧?
http://hiphotos..com/111010000000/pic/item/f01389391367a4e53b87ce5b.jpg
如果沒有,按「管理員」模式啟動程序。
然後找到需要的控制項,添加即可。