Click here to Skip to main content
15,888,124 members
Home / Discussions / C#
   

C#

 
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 
I can see several problems:
- are the timers started when the button is pressed? What is the interval?
- It's possible that you need to send a redraw command on each tick (like update or invalidate or something)
- I'm confused the compiler doesn't complain about the flag variable. It's accessed across threads.
- why two timers? I believe 1 timer should be able to do the trick ?

the simplest way to go on about this IMHO is:
- 1 timer.
- 1 static boolean (true when button pressed, false when movement was done)
- 1 static counter that counts each passing of the the timer_tick handler.
- 1 static (final) stopvalue for when the work should stop.
in timer_tick you then check counter vs stopvalue (= amount of time), set the flag on false and reset the form, in an if(flag==true) block you can then move the form.

this is quick thinking, you can go into the details from there.

hope this helps...

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 
GeneralRe: showing form from bottom wth timer Pin
eng.iris18-Sep-13 7:13
eng.iris18-Sep-13 7:13 
Questionwpf backgroundworker, execution of processes one after another Pin
Member 974759714-Sep-13 19:55
Member 974759714-Sep-13 19:55 
AnswerRe: wpf backgroundworker, execution of processes one after another Pin
Abhinav S14-Sep-13 22:18
Abhinav S14-Sep-13 22:18 
QuestionSave Images in SQl Server Pin
sigridslima14-Sep-13 17:13
sigridslima14-Sep-13 17:13 
GeneralRe: Save Images in SQl Server Pin
PIEBALDconsult14-Sep-13 18:12
mvePIEBALDconsult14-Sep-13 18:12 
GeneralRe: Save Images in SQl Server Pin
sigridslima15-Sep-13 14:57
sigridslima15-Sep-13 14:57 
GeneralRe: Save Images in SQl Server Pin
PIEBALDconsult15-Sep-13 16:26
mvePIEBALDconsult15-Sep-13 16:26 
GeneralRe: Save Images in SQl Server Pin
sigridslima16-Sep-13 2:55
sigridslima16-Sep-13 2:55 
GeneralRe: Save Images in SQl Server Pin
PIEBALDconsult16-Sep-13 3:47
mvePIEBALDconsult16-Sep-13 3:47 

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.