Hi All,
When the user closes my app I would like the form to disapear slowly, I have
tried using the form opacity property in a loop driven by a timer. The form
disapears but the app does not end (I have to right click the icon in the
task bar and close it). Any idea why?
I have this code in the timer event:
formdim = formdim - 0.01
Me.Opacity = formdim
If formdim = 0.01 Then Timer1.Enabled = False : End
Thanks in advance,
Roger. 5 1602
Hi Roger,
Did you try calling Close() at the end?
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com www.rthand.com
"Roger" <Ro***@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com... Hi All, When the user closes my app I would like the form to disapear slowly, I have tried using the form opacity property in a loop driven by a timer. The form disapears but the app does not end (I have to right click the icon in the task bar and close it). Any idea why?
I have this code in the timer event: formdim = formdim - 0.01 Me.Opacity = formdim If formdim = 0.01 Then Timer1.Enabled = False : End
Thanks in advance, Roger.
I have just tried Close( ) but that behaves the same way - any other idea's??
Roger.
"Miha Markic [MVP C#]" wrote: Hi Roger,
Did you try calling Close() at the end?
-- Miha Markic [MVP C#] - RightHand .NET consulting & development miha at rthand com www.rthand.com
"Roger" <Ro***@discussions.microsoft.com> wrote in message news:82**********************************@microsof t.com... Hi All, When the user closes my app I would like the form to disapear slowly, I have tried using the form opacity property in a loop driven by a timer. The form disapears but the app does not end (I have to right click the icon in the task bar and close it). Any idea why?
I have this code in the timer event: formdim = formdim - 0.01 Me.Opacity = formdim If formdim = 0.01 Then Timer1.Enabled = False : End
Thanks in advance, Roger.
I don't know why but:
If formdim < 0.01 Then Timer1.Enabled = False : End
(I was using: If formdim = 0.01 Then Timer1.Enabled = False : End)
works fine?!?!?
Thanks anyways, Roger.
"Roger" wrote: I have just tried Close( ) but that behaves the same way - any other idea's??
Roger.
"Miha Markic [MVP C#]" wrote:
Hi Roger,
Did you try calling Close() at the end?
-- Miha Markic [MVP C#] - RightHand .NET consulting & development miha at rthand com www.rthand.com
"Roger" <Ro***@discussions.microsoft.com> wrote in message news:82**********************************@microsof t.com... Hi All, When the user closes my app I would like the form to disapear slowly, I have tried using the form opacity property in a loop driven by a timer. The form disapears but the app does not end (I have to right click the icon in the task bar and close it). Any idea why?
I have this code in the timer event: formdim = formdim - 0.01 Me.Opacity = formdim If formdim = 0.01 Then Timer1.Enabled = False : End
Thanks in advance, Roger.
Roger,
You should avoid using "End", it is worser than that you tell the user to
click cntrl alt del.
"End" stops all activities including the cleaning up of your memory.
Use me.close instead as Miha sugested.
I hope this helps?
Cor
Yes, and make sure you call Close on the main form.
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com www.rthand.com
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OR*****************@TK2MSFTNGP11.phx.gbl... Roger,
You should avoid using "End", it is worser than that you tell the user to click cntrl alt del.
"End" stops all activities including the cleaning up of your memory.
Use me.close instead as Miha sugested.
I hope this helps?
Cor
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: DU |
last post by:
According to a recent post, it seems that Konqueror 3.1+ and Safari 1.1
support CSS3 opacity style property under a proprietary name:
"Support for the CSS3 opacity (using -khtml-opacity)...
|
by: Marek Mänd |
last post by:
This posting will express my concern about the future of css3
forthcoming recommendation.
I think for long time now, that the current implementation of CSS
attribute opacity is less than usable...
|
by: Mr. Analogy |
last post by:
I'd like to load a form in the background (invisibly) and then, afer
the controls are all drawn (and resized, in this case), I'd like to
show it. I.e., I want the form to show up nice and crisply,...
|
by: Roger |
last post by:
Hi All,
When the user closes my app I would like the form to disapear slowly, I have
tried using the form opacity property in a loop driven by a timer. The form
disapears but the app does not end...
|
by: john wright |
last post by:
My program requires users to login before use. Using the following code in
the login form:
Me.Opacity = Me.Opacity - 0.2
If Me.Opacity <= 0 Then
Timer1.Enabled = False
If boolExit = False...
|
by: James |
last post by:
I am trying to a add a method to a helper class library I built that will
fade out the current form. My code is this:
public void fade(object currentForm)
{
int z = 0;
for(double i=1.0; i> 0;...
|
by: reidarT |
last post by:
I want a windows form to act like the one in Outlook when you get a new
message
and it is visible for about a couple of seconds and then the opacity
decreases and the form dissapears in the end
I...
|
by: Sin Jeong-hun |
last post by:
As far as I know if I change the form's opacity, every control on the
form also inherits that opacity. But in many real applications (not
application programs), we see opaque text (100% opacity) on...
|
by: Sunny |
last post by:
Hi, I can change the lement opacity in IE using.
abc.style.filter = 'alpha(opacity=' + 10 + ')';
But this dont work in firefox, In firefox it throws error.
How I can change the opacity of an...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |