WAF 中的抖动面板和图片框 (VB.Net)
我正在努力开发一个应用程序,该应用程序将在一些性能不太好的 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您追求流畅的 2D 图形功能,您可能需要使用 DirectX 或 XNA。
http://msdn.microsoft .com/en-us/library/windows/desktop/dd370990%28v=vs.85%29.aspx
http://code.msdn.microsoft.com/windowsdesktop/Visual-Basic-XNA -29cd4963
If you're after smooth 2D graphics capability you will probably need to use either DirectX or XNA.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370990%28v=vs.85%29.aspx
http://code.msdn.microsoft.com/windowsdesktop/Visual-Basic-XNA-29cd4963