Click here to Skip to main content
15,898,791 members
Home / Discussions / C#
   

C#

 
AnswerRe: Do we need to schedule threads to diff processors? Pin
Simon_Whale16-Sep-13 3:38
Simon_Whale16-Sep-13 3:38 
AnswerRe: Do we need to schedule threads to diff processors? Pin
OriginalGriff16-Sep-13 4:07
mveOriginalGriff16-Sep-13 4:07 
GeneralRe: Do we need to schedule threads to diff processors? Pin
TnTinMn16-Sep-13 17:15
TnTinMn16-Sep-13 17:15 
GeneralRe: Do we need to schedule threads to diff processors? Pin
Eddy Vluggen18-Sep-13 6:48
professionalEddy Vluggen18-Sep-13 6:48 
QuestionMessage Closed Pin
15-Sep-13 20:44
xuantruongbn15-Sep-13 20:44 
AnswerRe: CreateKey Pin
Midnight Ahri15-Sep-13 21:15
Midnight Ahri15-Sep-13 21:15 
AnswerRe: CreateKey Pin
Dave Kreskowiak16-Sep-13 1:55
mveDave Kreskowiak16-Sep-13 1:55 
Questionshowing form from bottom wth timer Pin
eng.iris15-Sep-13 15:32
eng.iris15-Sep-13 15:32 
hi every body

i wish i could find somebody help

i want my window to be shown slowly from left corner up and then go down when a button clicked and after a atimer interval the form shown again

this the code i tries but the form doesnt shown again Sigh | :sigh: Sigh | :sigh: Sigh | :sigh:


C#
<pre>namespace moving_form
{
    public partial class Form1 : Form
    {
        bool flag = true;
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.Left = 0; // right -->Screen.PrimaryScreen.Bounds.Width - this.Width;
            this.Top = Screen.PrimaryScreen.Bounds.Height + this.Height - 30;
            // to make it in the corner + this.height
             
            timer1.Enabled = true;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {         flag = true;
                if (this.Top >= Screen.PrimaryScreen.Bounds.Height - this.Height - 30)
                    this.Top = this.Top - 10;  
                           }
            
        private void button1_Click(object sender, EventArgs e)
        {
           timer2.Enabled = true;
        }

        private void timer2_Tick(object sender, EventArgs e)
        {
           
            flag = false;
                if (this.Top > Screen.PrimaryScreen.Bounds.Height)
                {
                   
                    return;
                }
          
            else
            {
                this.Top = this.Top + 10; 
                flag = true;
            }
            
        }

       
       
    }
}




thanx again
AnswerRe: showing form from bottom wth timer Pin
Midnight Ahri15-Sep-13 16:58
Midnight Ahri15-Sep-13 16:58 
GeneralRe: showing form from bottom wth timer Pin
eng.iris15-Sep-13 17:12
eng.iris15-Sep-13 17:12 
AnswerRe: showing form from bottom wth timer Pin
Midnight Ahri15-Sep-13 18:11
Midnight Ahri15-Sep-13 18:11 
GeneralRe: showing form from bottom wth timer Pin
eng.iris16-Sep-13 2:26
eng.iris16-Sep-13 2:26 
AnswerRe: showing form from bottom wth timer Pin
Kamran Ayati15-Sep-13 21:04
Kamran Ayati15-Sep-13 21:04 
GeneralRe: showing form from bottom wth timer Pin
eng.iris16-Sep-13 2:20
eng.iris16-Sep-13 2:20 
GeneralRe: showing form from bottom wth timer Pin
Kamran Ayati16-Sep-13 2:44
Kamran Ayati16-Sep-13 2:44 
GeneralRe: showing form from bottom wth timer Pin
eng.iris16-Sep-13 9:43
eng.iris16-Sep-13 9:43 
AnswerRe: showing form from bottom wth timer Pin
V.15-Sep-13 23:36
professionalV.15-Sep-13 23:36 
GeneralRe: showing form from bottom wth timer Pin
eng.iris16-Sep-13 2:30
eng.iris16-Sep-13 2:30 
GeneralRe: showing form from bottom wth timer Pin
V.16-Sep-13 2:35
professionalV.16-Sep-13 2:35 
GeneralRe: showing form from bottom wth timer Pin
eng.iris16-Sep-13 9:43
eng.iris16-Sep-13 9:43 
GeneralRe: showing form from bottom wth timer Pin
V.16-Sep-13 20:44
professionalV.16-Sep-13 20:44 
AnswerRe: showing form from bottom wth timer Pin
Midnight Ahri16-Sep-13 2:35
Midnight Ahri16-Sep-13 2:35 
GeneralRe: showing form from bottom wth timer Pin
eng.iris16-Sep-13 10:02
eng.iris16-Sep-13 10:02 
GeneralRe: showing form from bottom wth timer Pin
eng.iris17-Sep-13 7:54
eng.iris17-Sep-13 7:54 
AnswerRe: showing form from bottom wth timer Pin
Midnight Ahri17-Sep-13 17:26
Midnight Ahri17-Sep-13 17:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.