473,795 Members | 2,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb.net richtextbox opacity fading

Hi all.

I have some forms that use the opacity property to fade in/out. I'd
like to do the same kind of thing with a richtextbox on one of my
forms. Doesn't look like opacity is exposed on the rtb control, so I
was wondering if anyone had done this before.

I'm looking for the effect of fading in at a specific point in the form
(when a timer ticks actually). I also don't mind some effect like the
size of the control starting smaller and eventually getting to the
original size, but I haven't been able to get that to work properly.

I'd really like a true fade in if possible.

Any ideas !

Many TIA,
Mark

Nov 21 '05 #1
1 4960
Hi put a button and a richtextbox on a form and copy paste this code, you
can ofcourse modify it to work with a timer:

Private Sub Button1_Click_1 (ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles _ Button1.Click
fader()
End Sub

Private Sub fader()
Dim myPoint As Point
Dim mySize As Size
myPoint = RichTextBox1.Lo cation
mySize = RichTextBox1.Si ze
For i As Integer = 0 To 10
myPoint.Y -= 5
myPoint.X -= 5
mySize.Width += 10
mySize.Height += 10
RichTextBox1.Lo cation = myPoint
RichTextBox1.Si ze = mySize
RichTextBox1.Re fresh()
System.Threadin g.Thread.Curren tThread.Sleep(1 00)
Next

End Sub
hth Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.

<ma*****@yahoo. com> schreef in bericht
news:11******** *************@f 14g2000cwb.goog legroups.com...
Hi all.

I have some forms that use the opacity property to fade in/out. I'd
like to do the same kind of thing with a richtextbox on one of my
forms. Doesn't look like opacity is exposed on the rtb control, so I
was wondering if anyone had done this before.

I'm looking for the effect of fading in at a specific point in the form
(when a timer ticks actually). I also don't mind some effect like the
size of the control starting smaller and eventually getting to the
original size, but I haven't been able to get that to work properly.

I'd really like a true fade in if possible.

Any ideas !

Many TIA,
Mark

Nov 21 '05 #2

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

Similar topics

3
10231
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...
2
2454
by: Adam | last post by:
Hi everyone, I have a simple timer which decreases the Opacity from 1.0 to 0.0 and back again. The problem I have is, when it changes from 1.0 to 0.99, the whole form flickers completely before the smooth fading out. It never does it from 0.0 to 0.1, only from 1.0 to 0.99. Anyone seen this before?
5
2910
by: Webmaster | last post by:
The following style sets the opacity or semi-transparency in Mozilla and Explorer browsers for an image: #myImage{ filter: alpha(opacity=50); -moz-opacity:0.50; opacity: 0.50; } <img src="someimage.jpg" name="myImage" id="myImage"> The alpha(opacity=50 does it in IE and the opacity: 0.50 does it Mozilla.
6
2375
by: Jake Barnes | last post by:
Please go look at this page using FireFox: http://www.ralphkrubner.com/Commercial/ Click the "Next" button a few times. The images fade out and then fade in. It's a nice effect. Now do try to do the same in IE (6.0). The images don't fade into each other. Instead, they hesitate, which is annoying, and then jump from one image to the other, suddenly, with no fade.
4
1426
by: haplobaaz | last post by:
I've just had a look at your fading opacity script. As I'm new to programming and I'm amazed by the script could I ask for some hints how to implement it in a site with a mouseover, mouseout events ? Sorry for my complete ignorance in this matter. I'd greatly appreciate any help. Thanks a million !
1
1394
by: tader | last post by:
Hello so i got error with opacity this script works on ff and opera but not on ie6 can any one help me? i tryded this filter:alpha(opacity=50); but it didin't work :( <script language="javascript" type="text/javascript"> var go_time = 10; var opacity = 1; var time = 10; function fadediv() { if(opacity != go_time) { opacity += 1;
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
9673
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10443
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10216
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...
0
10002
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...
0
9044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6783
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
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.