Werid problem
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Well basically i would like to make a panel bounce up and down when a user clicks a button that they shouldnt i want the form to move up and down a few times say 6 and then stop back at it original place now i thought to do this with simple
panel.height += 5
panel.height -= 5
but that just make the image inside the panel flicker to such an exctent that you are unable to see the actually bounce its self soo does anyone have any ideas thank you
panel.height += 5
panel.height -= 5
but that just make the image inside the panel flicker to such an exctent that you are unable to see the actually bounce its self soo does anyone have any ideas thank you
Try to set Form Probertie "Double Buffered" to "true".
Can also be done with this in Me.Load Event:
Can also be done with this in Me.Load Event:
Code: Select all
Greetz PayneStudiosMe.DoubleBuffered = True
i did forget to mention i do that on all program auto now soo it is on just checked as well it still flickers but do you have any ideas about a diffrent way to code it rather then the one posted above
flickers is always a pain in the b.tt
you can always try to create a antiflicker panel with custom
class.
or maybe use the paint event.
to be honest there are not much solutions to fix this bug.
but you can make it less.
tell me about your panels
do they have a image into it? are they set as background or just image with picturebox.
you can always try to create a antiflicker panel with custom
class.
or maybe use the paint event.
to be honest there are not much solutions to fix this bug.
but you can make it less.
tell me about your panels
do they have a image into it? are they set as background or just image with picturebox.
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
it has a background image and inside the panel it has one more panel docked to the bottom of it with some information labels in that.
i did try adding anouther panel but with its visbility to false and then make it true when it was bouncing but same problem it just a white blur :(
i did try adding anouther panel but with its visbility to false and then make it true when it was bouncing but same problem it just a white blur :(
hello,
can you send me a little of your code
so i can test this.
i have made a sample
but i need your code to test.
thanks
can you send me a little of your code
so i can test this.
i have made a sample
but i need your code to test.
thanks
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Code: Select all
This is the code i have put the bit at the top is just a resize the panel with a little less lag it does work if you are moving it with the mouse but when you do it with that code it does lag alot like amazingly alot Dim CursX As Integer = 0
Dim CursY As Integer = 0
Private WithEvents Resize_Form_B As New Timer
Dim AppHeight As Integer = 0
#Region "Definitions"
Private Sub Definitions()
CursX = Cursor.Position.X
CursY = Cursor.Position.Y
AppHeight = Panel1.Height
End Sub
#End Region
Private Sub Resize_Form_B_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Resize_Form_B.Tick
Panel1.Height = AppHeight - CursY + Cursor.Position.Y
End Sub
Private Sub Panel3_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel3.MouseDown
Resize_Form_B.Enabled = True
Resize_Form_B.Start()
Definitions()
End Sub
Private Sub Panel3_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel3.MouseUp
Resize_Form_B.Stop()
Definitions()
End Sub
Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Panel1.Height + = 5
Panel1.Height - = 5
Panel1.Height + = 5
Panel1.Height - = 5
Panel1.Height + = 5
Panel1.Height - = 5
timer1.enabled = false
End If
End Sub
thanks for the help people i reached the low point and asked my dad for help to wich he looked and said i was a retard and put in
Code: Select all
and fair play works a treat and just put in about 5 timers to doo it soo simple and lag free
If Panel1.Height = Me.Height - 10 Then
bounce2.Enabled = False
bounce3.Enabled = True
Else
System.Threading.Thread.Sleep(100)
Panel1.Height -= 10
End If
great to hear
i don't have to ask my dad or mom
because they don't known anything about programing :lol:
whats bounce stand for?
you still need the non flicker panel?
i don't have to ask my dad or mom
because they don't known anything about programing :lol:
whats bounce stand for?
you still need the non flicker panel?
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
no but thanks for all the help mate really great and i kinda lucky my dad is a computer expert but thanks anyways man +rep yh :P
Copyright Information
Copyright © Codenstuff.com 2020 - 2023