-- 作者:yankunhao
-- 发布时间:2013/3/19 13:53:00
-- 打开窗口时窗口绘制的问题
现在发现一问题,就是打开窗口时正常来说是会立即显示的,但在加入了下面代码时,窗口会先是灰色,然后才正常色显示,请问这是为什么呢?
e.Form.BaseForm.WindowState = System.Windows.Forms.FormWindowState.Maximized\'将打开的窗口最大化显示.
打开窗口后执行的完整代码如下:
e.Form.BaseForm.WindowState = System.Windows.Forms.FormWindowState.Maximized Dim cmb As WinForm.ComboBox cmb =e.Form.Controls("ComboBox5") cmb.ComboList = DataTables("料品资料查询表").GetComboListString("type_name") Dim f As WinForm.Form = Forms("产品规格表")
If Forms("产品规格表").Opened=True Then If Tables("obas_part_spec").Current IsNot Nothing Then
Try Dim s As String = Tables("obas_part_spec").Current("part_no") Dim s1 As String ="0" Dim t As WinForm.Table = Forms("产品规格表").Controls("Table1") If Forms("产品规格表").Controls("TextBox1").text <> "" Then t.Table.Fill("SELECT parent_part as 内部编码,child_part,Left(unit_qty,4) As 数量,bom_sort As 排序,ov_part.item_no As 物料编码,ov_part.part_name As 名称,ov_part.part_spec As 规格,obas_part1.bom_draw_no As 图号,obas_part1.bom_draw_no_wf as 明细图号 from obom_stru2 INNER JOIN ov_part on obom_stru2.child_part = ov_part.part_no INNER JOIN obas_part1 on obom_stru2.child_part = obas_part1.part_no where parent_part=\'" & s & "\'ORDER BY 排序","erp",True) t.Table.SetColVisibleWidth("物料编码|77|名称|75|规格|157|数量|19|图号|60|明细图号|50") Else t.Table.Fill("SELECT parent_part as 内部编码,child_part,Left(unit_qty,4) As 数量,bom_sort As 排序,ov_part.item_no As 物料编码,ov_part.part_name As 名称,ov_part.part_spec As 规格,obas_part1.bom_draw_no As 图号,obas_part1.bom_draw_no_wf as 明细图号 from obom_stru2 INNER JOIN ov_part on obom_stru2.child_part = ov_part.part_no INNER JOIN obas_part1 on obom_stru2.child_part = obas_part1.part_no where parent_part=\'" & s1 & "\'ORDER BY 排序","erp",True) t.Table.SetColVisibleWidth("物料编码|77|名称|75|规格|157|数量|19|图号|60|明细图|50") End If
Catch ex As Exception End Try
Dim zt As String If Tables("obas_part_spec").Current("sheet_sta")="0" Then zt="未审核" ElseIf Tables("obas_part_spec").Current("sheet_sta")="1" Then zt="已审核" End If f.Text="产品规格表 (" & zt & ")" Else f.Text="产品规格表" End If End If
[此贴子已经被作者于2013-3-19 13:59:57编辑过]
|