在VB6程序中插入Gif
Inserting Gif in VB6 Program
我创建了一个新的 VB6 程序,我想放入一个 gif,以便它可以在加载屏幕上播放。我在网上搜索了如何操作,它显示您必须使用网络浏览器和图片框才能查看它。我知道如何插入网络浏览器和图片框。我不知道如何用 gif 编码。
您可以通过多种方式执行此操作,但最简单的方式是使用图片框和网络浏览器。使用的代码是这样的:
Private Sub Form_Load()
Dim loc As String
loc = App.Path & "where the gif is located\somegif.gif"
Animation.Navigate "about:" & "<html>" & "<body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0 scroll=no>" _
& "<img src=""" & loc & """></img></body></html>"
End Sub
我创建了一个新的 VB6 程序,我想放入一个 gif,以便它可以在加载屏幕上播放。我在网上搜索了如何操作,它显示您必须使用网络浏览器和图片框才能查看它。我知道如何插入网络浏览器和图片框。我不知道如何用 gif 编码。
您可以通过多种方式执行此操作,但最简单的方式是使用图片框和网络浏览器。使用的代码是这样的:
Private Sub Form_Load()
Dim loc As String
loc = App.Path & "where the gif is located\somegif.gif"
Animation.Navigate "about:" & "<html>" & "<body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0 scroll=no>" _
& "<img src=""" & loc & """></img></body></html>"
End Sub