Type of paper:Â | Essay |
Categories:Â | Computer science Software |
Pages: | 2 |
Wordcount: | 343 words |
This Visual Basic project was created in Visual Studio 2012. It is compatible with newer versions of Visual Studio but not with older versions.
How It Works:
Fig 1
On the first form, the button "Show"(fig 1) closes the current form (window) and opens the form that shows the greetings message form (window) when clicked.
The Coding Placed To It Is:
Form2.Show()
Me.Hide()
On the second form, I have placed eight VB Timer controls. The first two are responsible for moving the greetings text left and right. The first two timer controls have the following properties:
The First Timer Executes The Following Code:
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Label1.Location = New Point(Label1.Location.X + 5)
If label1.Location.X >= 521 Then
Timer2.Start()
Timer1.Stop()
End If
End Sub
This code changes the position of the label bearing the greetings message by 5 pixels to the right (Label1.Location.X + 5) after every 5 milliseconds. Then when pixel number 521 is reached, the timer starts the second timer and closes itself.
( Timer2.Start()
Timer1.Stop()
)
The second timer changes the position of the label by 5 pixels to the left. When the label reaches its initial starting position, it starts the first timer and closes itself, which repeats the entire process.
The other six timers are responsible for changing text color. All set to trigger after an interval of 3000milliseconds (3secs). The first timer calls the second one and closes itself, second one calls third one, and so on, and the last one calls the first. They loop among each other in order and each executes the codes that change color and text. An example of the code that changes text and color is:
Label1.Text = "BONJOUR"
Label1.ForeColor = Color.Magenta
For color and movement, only one timer is running for each, the rest are stopped when the form is loading:
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer2.Stop()
Timer4.Stop()
Timer5.Stop()
Timer6.Stop()
Timer7.Stop()
Timer8.Stop()
End Sub
Cite this page
Free Essay That Includes Visual Basic Project Documentation. (2019, Sep 13). Retrieved from https://speedypaper.com/essays/project-documentation
Request Removal
If you are the original author of this essay and no longer wish to have it published on the SpeedyPaper website, please click below to request its removal:
- Essay Sample on the Vitality of Surfactant to the Infants
- Essay Sample on Walmart: Innovative Capabilities
- Black Tuesday - Personal Experience Essay Sample
- The Working Poor Interviews Introduction - Free Essay
- Fibroblasts/Dermis - Medicine Essay Example
- Organizational Structure - Paper Example
- Themes in the Cold War Era - Paper Example
Popular categories