473,809 Members | 2,699 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form Opacity Property

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.
Jul 21 '05 #1
5 1626
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***@discussi ons.microsoft.c om> wrote in message
news:82******** *************** ***********@mic rosoft.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.

Jul 21 '05 #2
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***@discussi ons.microsoft.c om> wrote in message
news:82******** *************** ***********@mic rosoft.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.


Jul 21 '05 #3
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***@discussi ons.microsoft.c om> wrote in message
news:82******** *************** ***********@mic rosoft.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.


Jul 21 '05 #4
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
Jul 21 '05 #5
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**********@p lanet.nl> wrote in message
news:OR******** *********@TK2MS FTNGP11.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

Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
5784
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) property. Make entire blocks and inlines transparent without resorting to transparent PNGs." http://weblogs.mozillazine.org/hyatt/archives/2003_10.html#004249 Now, I have a demo page which works for MSIE 6 for Windows and Mozilla-based browsers but...
3
10235
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 in practical real life situations. The soon forthcoming CSS3 recommendation does not serve the public interests in this area not at all. The problem relies in the definition what opacity is, how it is to applied to page elements. In past 5...
6
2465
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, without showing the user a form building (kinda scary to a non technical user ;-) I've tried: Dim f As New Form1 f.Visible = False
5
323
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 (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
2
1716
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 Then
14
2020
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; i-=.1) { currentForm.Opacity = i; while(z<10000)
2
2349
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 have tried with Dim p As Integer Dim Vent As Integer For p = 100 To 0 Step -1 Me.Opacity = p For Vent = 1 To 100000
3
5014
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 a traslucent background, for example text messages on TV. Or look at the title bar text of Aero. Background is translucent but the text is opaque. Is it possible to use 100% opaque text on a traslucent form?
15
3731
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 element in Firefox.
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7662
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.