Click here to Skip to main content
15,897,273 members

How to make FormSlideEffect in VB.NET

amartufo asked:

Open original thread
If you have ever wondered how to make FormSlideEffect in VB.NET, your on the right place.Open your Visual Basic 2008/201, and name your application as FormSlideEffect and hit Enter.Than set the form weight to 383, and width to 362.Nov add a one button from Toolbox and name it plus.Now add one group box and place it on your form.Ok it's code time, double click form 1 and paste the following code:
VB
'FormSlidingEffect
'VB.NET
'cooded by AmarTufo
'23.11.2012, AmarTufo
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Public Class Form1
    'This is for button+s to change the look of pointer;
    'when you go forward the pointer changes to backward, othervise it changes
    'to forward;
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Enabled = True
        Button1.Visible = False
        Button2.Visible = True
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Timer2.Enabled = True
        Button2.Visible = False
        Button1.Visible = True
    End Sub
    'timer is required for sliding effect
    'in our case you will need to add two timers
    'and set their interval of booth to 5
    'remember booth timers are enabled = false
    'the sintax is:> Timer1.Enabled = False
    '::::::::::::::> Timer2.Enabled = False
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Me.Width += 2
        If Me.Width = 595 Then
            Timer1.Enabled = False
        End If
    End Sub

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        Me.Width -= 2
        If Me.Width = 383 Then
            Timer2.Enabled = False
        End If
    End Sub


And this is how you can make your own FormSlideEffect;

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::>

this article is written by Amar Tufo, who wood like to specialy thanks to CodeProject and it's team;
Tags: Visual Basic, Forms

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900