以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  并列窗口如何定义图标  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=78564)

--  作者:blackzhu
--  发布时间:2015/12/11 16:52:00
--  并列窗口如何定义图标
Dim mystr As String
Dim dr As DataRow = DataTables("功能导航").Find("模块名称=\'" & e.Form.Name & "\'")
If dr IsNot Nothing Then
    mystr = ProjectPath & "Images\\" & dr("模块名称") & ".ico"
End If


If FileSys.FileExists(mystr) Then
e.form.Baseform.Icon = New System.Drawing.icon(mystr)
Else
    msgbox("bucunazai")
End If

为啥出错

--  作者:blackzhu
--  发布时间:2015/12/11 16:57:00
--  
Dim mystr As String
Dim dr As DataRow = DataTables("功能导航").Find("模块名称=\'" & e.Form.Name & "\'")
If dr IsNot Nothing Then
    mystr = ProjectPath & "Images\\" & dr("模块名称") & ".ico"
End If

If FileSys.FileExists(mystr) Then
    e.form.ImageFile = mystr
End If

 这样也不行

--  作者:大红袍
--  发布时间:2015/12/11 17:29:00
--  
Dim tabpage = forms("窗口1").panel.parent
tabpage.image = getimage("d:\\test.ico")