Foxtable(狐表)用户栏目专家坐堂 → 这段代码如果放在菜单的DialogLauncherClick事件里应该怎么改??


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

主题:这段代码如果放在菜单的DialogLauncherClick事件里应该怎么改??

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2015/2/26 9:15:00 [显示全部帖子]

呃,什么意思?直接改一下窗口名即可啊

 

For Each r As DataRow In DataTables("newtrj").Select("id>1")   '从数据表中提取数据
   
    ' bar.Code = r("qrcord")
   
    Dim fn As String = ""
   
    fn = r("cn_name")
   
    Dim vv As String =  fn & ".jpeg"
   
    If fn <> "" And filesys.FileExists("d:\as\" & vv) = True Then
       
        Dim route As String = "d:\as\" & vv '原始照片存放路径
       
        Dim route2 As String ="d:\qrcord\" & vv
       
        Dim zwidth = getImage(route).width '原始照片宽
       
        Dim zheight = getImage(route).height '原始照片高
       
       
       
       
       
        Dim p As WinForm.Painter = Forms("窗口1").CreateControl("p", ControlTypeEnum.Painter)
       
        p.Width = zwidth '原始照片宽动态赋给画板宽
       
        p.Height = zheight '原始照片高动态赋给画板高
       
        Dim g As Graphics = p.Graphics
       
        g.Clear(Color.White)
       
        g.DrawImage(getImage(route),0,0,zwidth,zheight)
       
        ' g.DrawImage(bar.GetImage,(zwidth-200),(zheight-680),150,150)
       
        Dim rm As New prt.RenderImage '定义一个图片对象
       
        'rm.Image = GetImage("archives.ico") '设置图片
       
        'rm.Style.ImageAlign.StretchHorz = True '水平拉伸
       
        'g.DrawImage(rm.Image,(zwidth-75),(zheight-85),30,30)
       
        Dim fnt As New Font("黑体",30,FontStyle.Bold) '黑体,10号,加粗
       
        g.DrawString(fn,fnt,Brushes.Aqua,(zwidth-280),(zheight-38))
       
        p.Repaint()
       
        ' Dim img As Image = p.Image
       
        '   p.Save(route2)
       
        '   img.save(route2)
       
        Dim img As Image = p.Image
       
        'p.Save(route2)
       
        img.save(route2,System.Drawing.Imaging.ImageFormat.jpeg)
       
       
       
    End If
   
Next

MessageBox.Show("全部添加成功!", "提示")

 


 回到顶部