Click here to Skip to main content
15,900,461 members
Home / Discussions / C#
   

C#

 
AnswerRe: Shake Logic. Pin
Christian Graus3-Aug-09 16:30
protectorChristian Graus3-Aug-09 16:30 
GeneralRe: Shake Logic. Pin
Baeltazor3-Aug-09 17:13
Baeltazor3-Aug-09 17:13 
AnswerRe: Shake Logic. Pin
codemunkeh3-Aug-09 17:47
codemunkeh3-Aug-09 17:47 
GeneralRe: Shake Logic. Pin
Baeltazor3-Aug-09 17:51
Baeltazor3-Aug-09 17:51 
GeneralRe: Shake Logic. Pin
codemunkeh3-Aug-09 18:11
codemunkeh3-Aug-09 18:11 
GeneralRe: Shake Logic. Pin
Baeltazor3-Aug-09 18:15
Baeltazor3-Aug-09 18:15 
AnswerRe: Shake Logic. Pin
codemunkeh3-Aug-09 18:22
codemunkeh3-Aug-09 18:22 
GeneralRe: Shake Logic. Pin
Baeltazor3-Aug-09 18:53
Baeltazor3-Aug-09 18:53 
That's okay Smile | :) Thanks for the quick replys too Smile | :)

I got a little confused with the mouseup parts since i have a bordered form so i changed it around a little and it actually works. the only problem is that you need to ensure that must stop dragging the form before you release the mouse button Frown | :( lol. Here's the code:

private int shake = 100;

private void Form1_LocationChanged(object sender, EventArgs e)
{
    progressBar1.Enabled = true;
    shake = 0;
    timer1.Enabled = true;
    timer1.Start();
}

private void timer1_Tick(object sender, EventArgs e)
{
    if (shake <= 10 && progressBar1.Value >= 5)
    {
        timer1.Stop();
        progressBar1.Enabled = false;

        if (Tc.TabPages.Count != 0)
        {
            while (Tc.TabPages.Count != 0)
            {
                Tc.SelectedTab.Dispose();
            }
        }
        else
        {
            AddTab();
        }
    }
    else
    {
        progressBar1.PerformStep();
        shake++;
    }
}



Edit.
The logic in this code is a little conveluded, so message me if it requires explaining :P

Regards,
Jason Pezzimenti.


GeneralRe: Shake Logic. Pin
codemunkeh3-Aug-09 19:17
codemunkeh3-Aug-09 19:17 
GeneralRe: Shake Logic. Pin
Baeltazor3-Aug-09 19:26
Baeltazor3-Aug-09 19:26 
QuestionBest way to know which property changed Pin
Xmen Real 3-Aug-09 14:52
professional Xmen Real 3-Aug-09 14:52 
AnswerRe: Best way to know which property changed Pin
N a v a n e e t h3-Aug-09 16:24
N a v a n e e t h3-Aug-09 16:24 
GeneralRe: Best way to know which property changed Pin
Xmen Real 3-Aug-09 16:41
professional Xmen Real 3-Aug-09 16:41 
AnswerRe: Best way to know which property changed Pin
dan!sh 3-Aug-09 17:58
professional dan!sh 3-Aug-09 17:58 
GeneralRe: Best way to know which property changed Pin
Xmen Real 3-Aug-09 20:54
professional Xmen Real 3-Aug-09 20:54 
Questionbyte array Pin
peishen883-Aug-09 10:18
peishen883-Aug-09 10:18 
AnswerRe: byte array Pin
stancrm3-Aug-09 10:30
stancrm3-Aug-09 10:30 
GeneralRe: byte array Pin
Luc Pattyn3-Aug-09 10:37
sitebuilderLuc Pattyn3-Aug-09 10:37 
GeneralRe: byte array Pin
peishen883-Aug-09 10:54
peishen883-Aug-09 10:54 
GeneralRe: byte array Pin
Luc Pattyn3-Aug-09 10:57
sitebuilderLuc Pattyn3-Aug-09 10:57 
AnswerRe: byte array Pin
Fired.Fish.Gmail3-Aug-09 15:35
Fired.Fish.Gmail3-Aug-09 15:35 
Questionhow could I make double (key events) In C# ? Pin
Abdulkader Rai3-Aug-09 8:29
Abdulkader Rai3-Aug-09 8:29 
AnswerRe: how could I make double (key events) In C# ? Pin
Dave Kreskowiak3-Aug-09 8:38
mveDave Kreskowiak3-Aug-09 8:38 
QuestionHow I can create query wizard Pin
mohammad alnoed3-Aug-09 6:42
mohammad alnoed3-Aug-09 6:42 
AnswerRe: How I can create query wizard Pin
Abhijit Jana3-Aug-09 7:39
professionalAbhijit Jana3-Aug-09 7:39 

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.