|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Form ShakeI have a splash screen that boots with music in the background. I want
the splash screen to look like it is shaking, or is being shaked. What is the best way to do this? Hi put a button on a form
and then paste this code, I hope this is enough shaking for you, probably there are some nicer solutions but this should give you an idea Hope this helps Greetz Peter Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click shakeMe() End Sub Private Sub shakeMe() Dim myLoc As Point, myLocDef As Point myLocDef = Me.Location myLoc = Me.Location For i As Integer = 0 To 100 For x As Integer = 0 To 4 Select Case x Case 0 myLoc.X = myLocDef.X + 10 Case 1 myLoc.X = myLocDef.X - 10 Case 2 myLoc.Y = myLocDef.Y - 10 Case 3 myLoc.Y = myLocDef.Y + 10 Case 4 myLoc = myLocDef End Select Me.Location = myLoc Me.Refresh() Next Next Me.Location = myLocDef Me.Refresh() End Sub -- Show quoteHide quoteProgramming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook) "pmclinn" <pmcl***@gmail.com> schreef in bericht news:1140185182.354806.286310@g14g2000cwa.googlegroups.com... > I have a splash screen that boots with music in the background. I want > the splash screen to look like it is shaking, or is being shaked. What > is the best way to do this? > "pmclinn" <pmcl***@gmail.com> schrieb: Place a timer on the form and move the form within its 'Tick' event handler >I have a splash screen that boots with music in the background. I want > the splash screen to look like it is shaking, or is being shaked. What > is the best way to do this? ('Form.{Location, Left, Top}'). -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
running application using vb.net
Replace Selected Text printing problem with dotmatrix printer using vb.net Different Approaches to Saving settings: Which is better? Treeview drives me crazy! Data Types and structure Memory Usage? Deleting configurations Windows XP Style How to load hierarchical Db data in treeview?? Implicit Conversion from Bitmap to Image? |
|||||||||||||||||||||||