动画面板宽度取决于提供的秒数

时间:2019-01-11 09:09:28

标签: vb.net animation width panel seconds

是否可以为面板宽度设置三秒钟的动画或取决于我传递方法/功能的秒数?

我目前正在使用计时器来更改宽度,但是没有特定的秒数来完成动画。

这是我当前的代码:

Private Sub Button1_Click()
    Timer1.Enabled = True
End Sub

Private Sub Timer1_Tick()
    If Panel1.Width < 50 Then
        Panel1.Width += 10
    Else
        Me.Dispose()
        Timer1.Enabled = Flase
    End If
End Sub

我想要的是具有这样的功能

Private Sub AnimateWidth(ByRef pnl As Panel, ByVal MaxWidth As Integer, ByVal NumberOfSeconds as Double)
    'This is where I'm Lost. I dont have any idea what to do
End Sub

1 个答案:

答案 0 :(得分:0)

sarah@ConvergentRefuge:/media/sarah/SENTINEL/Master$ shopt -s globstar; for v1 in **/*.vob; do v2=$(awk -F'/' '{print "/media/sarah/SENTINEL/Videos/NewMaster" $(NF-1) " - " $NF ".mp4"}' <<< "$v1"); ffmpeg -i "$v1" "$v2"; done
  ffmpeg version N-91290-g6129b13 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
    configuration: --prefix=/home/sarah/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/sarah/ffmpeg_build/include --extra-ldflags=-L/home/sarah/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/sarah/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
    libavutil      56. 18.102 / 56. 18.102
    libavcodec     58. 20.102 / 58. 20.102
    libavformat    58. 17.100 / 58. 17.100
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 25.100 / 7. 25.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100 libpostproc 55. 2.100 / 55. 2.100 **/*.vob: No such file or directory