以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 关于activeX控件的使用 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=93641) |
-- 作者:jiangxun -- 发布时间:2016/12/3 0:19:00 -- 关于activeX控件的使用 如何使用第三方activeX控件? |
-- 作者:有点蓝 -- 发布时间:2016/12/3 8:57:00 -- 参考:http://foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=74849 |
-- 作者:jiangxun -- 发布时间:2016/12/3 11:00:00 -- 谢谢 |
-- 作者:jiangxun -- 发布时间:2016/12/4 10:14:00 -- Dim TblCtl As New Windows.Forms.TableLayoutPanel e.Form.BaseForm.MinimumSize = New Size(570, 350) e.Form.StopRedraw With TblCtl .Name = "TblCtl" .RowCount = 7 .ColumnCount = 4 .Anchor = Windows.Forms.AnchorStyles.Left Or _ Windows.Forms.AnchorStyles.Top _ Or Windows.Forms.AnchorStyles.Right _ Or Windows.Forms.AnchorStyles.Bottom .Location = New Point(30, 30) .Size = New Size(510, 240) .BackColor = System.Drawing.Color.Transparent .CellBorderStyle = Windows.Forms.TableLayoutPanelCellBorderStyle.Single .Gettype.GetProperty("DoubleBuffered", Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic).SetValue(TblCtl, True, Nothing) .ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Absolute, 80)) .ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Percent, 50)) .ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Absolute, 80)) .ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Percent, 50)) .RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28)) .RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28)) .RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28)) .RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28)) .RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28)) .RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Percent, 100)) .RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28)) For i As Integer = 0 To 6 .Controls.Add(e.Form.Controls("Label0" & i).BaseControl , 0 , i) .Controls.Add(e.Form.Controls("Txt0" & i).BaseControl , 1 , i) Next For i As Integer = 0 To 3 .Controls.Add(e.Form.Controls("Label2" & i).BaseControl , 2 , i) .Controls.Add(e.Form.Controls("Txt2" & i).BaseControl , 3 , i) Next .Controls.Add(e.Form.Controls("Label26").BaseControl , 2 , 6) .Controls.Add(e.Form.Controls("Txt26").BaseControl , 3 , 6) End With e.Form.Panel.Controls.Add(TblCtl) TblCtl.SetColumnSpan(e.Form.Controls("Txt05").BaseControl,3) e.Form.ResumeRedraw
|
-- 作者:jiangxun -- 发布时间:2016/12/4 10:15:00 -- Dim TblCtl As Windows.Forms.TableLayoutPanel = e.Form.Panel.Controls("TblCtl") e.Form.Panel.Controls.Remove(TblCtl) TblCtl.Dispose
|