Add slide effect to your form
Post your C# code snippets in here.
1 post
Page 1 of 1
So first start off by adding a timer
First Button:
-Interval: 10
-Enabled: False
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Then go into your code view and on the control where you want the sliding to happen put:
`````````````````````````````````````````````````````````````````````````````````````
And that should be it
if you have any questions or comments feel free to leave them down below
First Button:
-Interval: 10
-Enabled: False
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Then go into your code view and on the control where you want the sliding to happen put:
Code: Select all
Then in the timer code put: timer1.Enabled = true; //This turns on the timer so it starts to tick.
Code: Select all
{
try
{
Form1.ActiveForm.Width += 2;
progressBar1.Value += 1;
}
catch
{
}
//The code above will add 2 pixels and 1 percentage to the form width and progressbar value.
{
if (Form1.ActiveForm.Width == 500 == true)
timer1.Enabled = false;
your control.Enabled = false;
}
//This code (when the form's width is = to 500) will shutdown the timer and make the button unavailable.
}
`````````````````````````````````````````````````````````````````````````````````````
And that should be it
if you have any questions or comments feel free to leave them down below
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023