A
Alan Gillott
I am having difficulty believing this but it appears that setting a form
Invisible drives the formclosing event. Actually, i am intercepting the user
close (the nasty x box top right that causes more trouble thay other button
in windows) and setting the form invisible and cancelling the close. so well
and good, but all that happens is the form closing event gets driven again
and the cancel close is ignored.
This is the second app doing this to me, and I have a whole raft more to
convert from VB6 that do the same; essentially waiting for a double click on
a taskbar icon to redisplay the form. The work around is to minimise and
remove it from the task bar. That makes the form vanish but is is somewhat
inelegant when that's what Visible is for - there's no point to the visible
attribute if it closes the form.
Im sure VB is working as designed but it really is inconsistent behavior and
in my view a design error that needs to be fixed.
Can anyone confirm this behavior and more to the point, convince me that it
is correct behavior.
Thanks
Invisible drives the formclosing event. Actually, i am intercepting the user
close (the nasty x box top right that causes more trouble thay other button
in windows) and setting the form invisible and cancelling the close. so well
and good, but all that happens is the form closing event gets driven again
and the cancel close is ignored.
This is the second app doing this to me, and I have a whole raft more to
convert from VB6 that do the same; essentially waiting for a double click on
a taskbar icon to redisplay the form. The work around is to minimise and
remove it from the task bar. That makes the form vanish but is is somewhat
inelegant when that's what Visible is for - there's no point to the visible
attribute if it closes the form.
Im sure VB is working as designed but it really is inconsistent behavior and
in my view a design error that needs to be fixed.
Can anyone confirm this behavior and more to the point, convince me that it
is correct behavior.
Thanks