使用缩略图

为了提高网页打开速度,我们可以在Uploader中显示低分辨率的缩略图,在图片浏览器中显示高分辨率的原图。

一个例子

HttpRequest事件代码:

Select Case e.Path
    Case "test.htm"
        Dim wb As New weui
        wb.AddForm("","form1","test.htm")
        With wb.AddInputGroup("form1","ipg1",
"
客户资料")
            .AddInput(
"
姓名","姓名","text").value = "舒淇"
            .AddInput(
"
地点","地点","text").Value = "蒙古草原"
            .AddInput(
"
日期","日期","date").value = #10/12/2012#
            With .AddUploader("up1","",True)
                .AllowAdd = False
'
关闭文件上传功能
               
 'AddImage的第一个参数为缩略图,第二个参数为原图
                .AddImage("./images/001s.jpg","./images/001.jpg")
                .AddImage("./images/002s.jpg","./images/002.jpg")
                .AddImage("./images/003s.jpg","./images/003.jpg")
                .AddImage("./images/004s.jpg","./images/004.jpg")
                .AddImage("./images/005s.jpg","./images/005.jpg")
                .AddImage("./images/006s.jpg","./images/006.jpg")
                .AddImage("./images/007s.jpg","./images/007.jpg")
                .AddImage("./images/008s.jpg","./images/008.jpg")
                .AddImage("./images/009s.jpg","./images/009.jpg")
                .AddImage("./images/010s.jpg","./images/010.jpg")
                .AddImage("./images/011s.jpg","./images/011.jpg")
                .AddImage("./images/012s.jpg","./images/012.jpg")
           
End With
        End With
        e.WriteString(wb.Build)
'生成网页
End
Select

这是通过手机访问的显示效果:


本页地址:http://www.foxtable.com/mobilehelp/topics/0093.htm