WAF 中的抖动面板和图片框 (VB.Net)

发布于 2025-01-08 00:45:55 字数 634 浏览 5 评论 0原文

我正在努力开发一个应用程序,该应用程序将在一些性能不太好的 PC 上运行。该应用程序是在 VB.NET 中完成的,我在工作过程中遇到了一些障碍。

该应用程序的想法是允许用户在单击鼠标并向右(用于浏览到上一页)和向左(用于浏览到下一页)拖动(同时按下左键)时滑动某些页面。页)。每页包含 4/6/9 个面板,带有 4/6/9 个图片框,其中有一些 gif 作为图像。

问题是,当用户用鼠标拖动浏览页面时,面板和图片框在移动时会抖动。

有什么办法可以解决这个问题吗?

这是处理幻灯片部分的代码

    If i + speed < 1024 Then
        For j As Integer = 0 To nrOfGamesInTotal - 1
            totemGame.gamePanel(j).Left = totemGame.gamePanel(j).Left + direction * speed
            totemGame.gamePic(j).Left = totemGame.gamePic(j).Left + direction * speed
        Next
        i = i + speed
        Return True
    Else

Im working to develop an application thats going to run on some not-so-good as performance PC's. The application is done in VB.NET and i encountered some obstacles during my work.

The idea of the application is to allow the users to slide through some pages when they click with the mouse and drag (while the left click is pressed) to right (for browsing to the previous page) and to left (for browsing to the next page). Every page contains 4/6/9 panels with 4/6/9 pictureboxes with some gifs as images.

The issue is that when the user drag with the mouse to browse to a page, the panels and the pictureboxes jerks around when they are moved.

Is there any way that this can be fixed?

Here is the code that handles the slide part

    If i + speed < 1024 Then
        For j As Integer = 0 To nrOfGamesInTotal - 1
            totemGame.gamePanel(j).Left = totemGame.gamePanel(j).Left + direction * speed
            totemGame.gamePic(j).Left = totemGame.gamePic(j).Left + direction * speed
        Next
        i = i + speed
        Return True
    Else

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文