A. 想要用c#编写一个和vs界面类似的软件,工具箱的控件可拖拽到编辑块里
我倒是有个半成品..你要的功能基本都有了..
如果要的话.留个邮箱
B. visual studio2015工具箱哪个是显示时间的控件
首先确认自己不是在如下图所示的代码编写界面,因为在该界面下右边的工具箱窗口内中没有控件,这是由于容不可能直接向代码窗口拖入控件,所以VS不显示控件。
2
即使在代码窗口下,右键点击工具箱窗口空白处选择重置工具箱也看不到控件,或者右键点击工具箱窗口空白处选择全部显示,虽然有控件显示出来但是是灰色的,不能拖动,这些还是由于不能向代码窗口拖入控件造成的。
C. 我把vs的工具箱给关了,怎么调出来到界面
找到菜单-》视图-》工具箱即可
D. VS怎么设置界面和工具使用
VS设置界面和工具使用:
一、如何设置VS字体颜色大小、背景
1、打开VS软件,在导航栏Tool的菜单中选中Option
弹出Option的对话框,选择Environment列表下的Fontsandcolors,在其中对文本的字体大小颜色以及背景色做出自己想要的设置
如下图所示是我们所做的一个例子设置
最终的预览结果
二、如何显示源代码每行编号
同样是在VS工具栏Tool的菜单中点击option:
在弹出的Option对话框中,选择TextEditor列表下的C#,并勾选Linenumber这一选项,点击OK
操作之后的页面
三、如何将消失的工具箱等小窗口重新显示在桌面上
1、选择工具栏中的View菜单中的Toolbox,工具箱即可重新显示在桌面上。同样在View列表中的SolutionExplorer、TeamExplorer、ErrorList、Output等小窗口也可以在View列表下选中展示在窗口上。
四、如何将悬浮的小窗口定位在适合的位置
点击鼠标左键拖动某个小窗口时,窗口会出现成“十”字的九个小块,如下图所示:
可以将小窗口拖动进任意一个小块中,松开鼠标后,小窗口会被镶嵌在窗口的相应位置
E. vs2015工具栏图标不显示
工具-》里面有个环境你重置恢复下。
不行就在控制面板修复下VS吧
覆盖安装也可以。
F. vs2015工具箱在菜单栏怎么找到
菜单栏的“视图”-->“工具箱”
G. 我想在软件中加一个类似于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)。你自己做两张图片加进去
H. C#窗体程序视图里没有工具箱项怎么办
ctrl + w,x启动toolbox
晕,你点菜单栏里View-〉ToolBox也没有吗?
.....
那你这个还真是够奇怪了,我从2003开始用没见过这种情况...
I. VS2015 C# 按钮之类的怎么弄出来之前用的是08版本的,控件都能在左边工具箱按出来,点一下
一样在左边工具箱,如果找不到就点 窗口-重置窗口布局
要添加事件都是双击控件或者右下角的属性窗口点事件,选相应的事件双击也行。
J. vs2012 winform里没有工具箱窗口