Foxtable(狐表)用户栏目专家坐堂 → 左侧导航和列表导航结合改进救助


  共有3593人关注过本帖树形打印复制链接

主题:左侧导航和列表导航结合改进救助

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107813 积分:548416 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/12/24 20:35:00 [显示全部帖子]

就加个图片而已,用得着使用Painter么?加个图片框不就行了!或者直接作为顶部停靠窗口背景

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107813 积分:548416 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/12/24 22:01:00 [显示全部帖子]

Dim clr As Color = SystemColors.GradientActiveCaption
e.Form.BackColor = Clr
Dim p As WinForm.Painter = e.Form.Controls("Painter1")
Dim g As Graphics = p.Graphics
g.Clear(Color.White)
Dim Rectangle As New Rectangle(0,0,p.Width,p.Height)
Dim Mybrush As New LinearGradientBrush(Rectangle,clr,Color.white,LinearGradientMode.Vertical)  '窗口渐变色
g.FillRectangle(Mybrush,Rectangle)   '窗口渐变色
Dim img As image = getImage(ProjectPath & "\abc2.jpg")
Dim bmp As bitmap = new bitmap(img, p.Width, p.Height)
g.DrawImage(bmp,Rectangle ,Rectangle ,GraphicsUnit.Pixel)  '--------------
p.Repaint()

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107813 积分:548416 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/12/24 22:18:00 [显示全部帖子]

我测试没有问题,请上传实例说明

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107813 积分:548416 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/12/24 22:34:00 [显示全部帖子]

代码放到窗口计时器,延迟绘制

 回到顶部