Clicking on Form's Capiton Bar Event (how to ignore it)

  • Thread starter Thread starter Max
  • Start date Start date
M

Max

Hi,
I have written a small vb.net program that downloads a file through
ftp and displays the progress of download on a form (kind of the one
you see when you save file from the internet). The problem I am having
is when clicking (and holding mouse button) on the form's
caption/title bar the download just stops until I let go of the mouse
button. I've tried to do Application.DoEvents on several form events
but that doesn't work. I would appreciate solutions to my problem.
Thank you!
 
Hi Max,

Change formborderstyle to 'none' and there won't be a caption to click on.

HTH,

Bernie Yaeger
 
Bernie, thanks for a quick reply.
Yeah, I know how to remove the title bar from the windows form but I
wanted to leave it there.
I basically want the same functionality that you get from the form you
see when downloading a file from the internet. When you click or drag on
its caption bar it has no effect on download.
Thanks,
Max
 
You could always try some weird things like calling the form's mouseup event
when the mousedown event occurs. Never tried it. Might be worth it.

-Jason
 
you see when you save file from the internet). The problem I am having
is when clicking (and holding mouse button) on the form's
caption/title bar the download just stops until I let go of the mouse

Does the download actually stop, or does the form displaying the progress
stop updating?
button. I've tried to do Application.DoEvents on several form events
but that doesn't work. I would appreciate solutions to my problem.

This may be a situation where spawning a thread to perform the download
will help.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
Chris,
Yes, the download actually stops but the timer continues to tick.
So my bytes transferred stays the same, transfer rate begins to
decrease, remaining time starts to grow. This only happens when I
click on the caption bar, clicking inside the form doesn't produce
this result.
I'll see what I can do with threads but there has to be some event of
clicking on the caption bar that I can override.
 
Back
Top