我无法找到网站在哪里下载ms Powerpacks 10,我在vb.net 2010中使用它.
是否可以更改PowerPacks.LineShapesmoothingMode?
我试图使用这个代码(一个继承的类LineShape):
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
Dim g As Graphics = e.Graphics
' no difference when changing the SmoothingMode '
g.SmoothingMode = SmoothingMode.AntiAlias
Using pen As New Pen(Color.Blue, 3)
g.DrawLine(pen, X1, Y1, X2, Y2)
End Using
' MyBase.OnPaint(e) '
End Sub
Run Code Online (Sandbox Code Playgroud)
我总是有相同的结果,如下所示: alt text http://lh6.ggpht.com/_1TPOP7DzY1E/S3v1IbxlbCI/AAAAAAAADD4/q1Y9kP8wJ0g/s800/Capture2.png
=======
编辑
更新了测试:
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
Dim g As Graphics = e.Graphics
Dim oldmode As SmoothingMode = g.SmoothingMode
Using pen As New Pen(Color.Blue, 3) …Run Code Online (Sandbox Code Playgroud) 我从这里的链接https://msdn.microsoft.com/en-us/library/cc488277.aspx下载了VS Basic Power Packs, 但我不知道为什么它没有出现在我的项目工具箱中.我还添加了两个VB电源包项目参考和VB电源组设计到我的项目,并刷新工具箱中,但它并没有显示在所有.
我想处理 DataRepeater 中的 winform 按钮单击,我该怎么做?所有按钮都放在一个 DataRepeater 中
非常感谢
我目前正在尝试使用Windows Powerpack DataRepeater控件来显示DataTable中的数据.
到目前为止,DataRepeater认识到从数据库调用的结果DataTable有8行,但是我无法获得3个文本框(我已将其放入DataRepeater的ItemTemplate中)以显示实际数据行.
DataTable DT = BL.GetDataTable();
BindingSource bSource = new BindingSource();
bSource.DataSource = DT;
DR.DataSource = bSource;
txtEmail.DataBindings.Add("Text", bSource, "Email");
txtID.DataBindings.Add("Text", bSource, "ID");
txtName.DataBindings.Add("Text", bSource, "Name");
Run Code Online (Sandbox Code Playgroud)
因此,一旦查看DataRepeater(DR),您就可以看到8行.如果文本框留下作为DR的一部分,那么它们将在这8行中的每一行上重复,但没有数据.
如果我删除文本框并将它们直接放在表单上,那么在浏览DR时,文本框会显示相应的数据.这不是我正在寻找的行为.
有谁知道如何让文本框显示数据,并成为DataRepeater的一部分?
powerpacks ×5
vb.net ×3
c# ×2
datarepeater ×2
.net ×1
datatable ×1
graphics ×1
printform ×1
toolbox ×1
winforms ×1