473,473 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

GDI+ Marquee

Hi there,

Can someone give me some pointers on how to build a marquee control?
Basically, I want a something that scrolls both images and text smoothly.

I know I could easily have GDI+ to draw the text and change the coordinates,
but I'm thinking there is a more elegant way?

Arlef
May 4 '07 #1
2 4469
Hi,

James wrote:
I know I could easily have GDI+ to draw the text and change the coordinates,
but I'm thinking there is a more elegant way?
Hm... like what? Drawing a marquee without actually drawing a marquee?
Sounds difficult...

Seriously, of course you could create some controls, like labels and
picture boxes, and move their locations around in some creative ways, but
the most that will get you is really bad performance and possibly some ugly
flickering as well. Or you could create and show an animated GIF, but that
is static - or maybe there's a library somewhere that will allow you to
easily create animated GIFs from .NET, dynamically. Not sure if that would
end up having fewer lines of code though...

Unless you're using WPF, I'm afraid you'll have to draw an animation to
show an animation.
Oliver Sturm
--
http://www.sturmnet.org/blog - MVP C#
May 4 '07 #2
James,

Not really. GDI doesn't have a great deal of support for animations.
You are going to have to set up the timeline (using a timer, pretty much)
and then modify the contents of your control when the timer fires.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"James" <ar****@hotmail.comwrote in message
news:Ox*************@TK2MSFTNGP05.phx.gbl...
Hi there,

Can someone give me some pointers on how to build a marquee control?
Basically, I want a something that scrolls both images and text smoothly.

I know I could easily have GDI+ to draw the text and change the
coordinates, but I'm thinking there is a more elegant way?

Arlef

May 4 '07 #3

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

Similar topics

2
by: Jo_Calico | last post by:
I love the Dynamic Drive cross browser marquee script. I'd like to make the text loop immediately after completion, so the beginning runs right after the end (does that make sense?). Could anyone...
1
by: Sketcher | last post by:
Hi all, I am looking to add the following scrolling marquee to my website (see code below) However instead of using the marquee methods I want to use and as a person rests their mouse on...
15
by: charlie fortune | last post by:
I'm quite new to HTML, and have seen <marquee> get bad press here. What's wrong with using it. I wanted to have the contents of a .txt file scrolling for news items, can I do this with marquee, or...
2
by: P2P | last post by:
Hi I am wondering if someone can help me here with the "perfect" marquee vertical scrolling script I've found. This marquee is great for me as it will call an external html page. This allow...
56
by: Ed Jay | last post by:
I note in an Eric Meyers book that he expresses one goal of using CSS is to eliminate all <brtags. Why? -- Ed Jay (remove 'M' to respond by email)
8
praclarush
by: praclarush | last post by:
Ok, I'm new to JavaScript and I'm taking a class for it the assignment in it I'm supposed to create edit a pre-made page to display a marquee that automatically scrolls for the user, as well as give...
1
by: ced69 | last post by:
having trouble getting marquee to work get object required errors tring t <title>This Month at the Chamberlain Civic Center</title> <link href="styles.css" rel="stylesheet"...
5
by: 000baaa000 | last post by:
The following HTML marquee code works better in Microsoft Internet Explorer, breaks (in more than one way) in Mozzila Firefox <pre>------------------------------------------------- start HTML...
3
by: Rajneesh Chellapilla | last post by:
Hi I made this marquee program however, I am having trouble getting all four marquees to line up correctly. Basically I want the the 4 marquees to line up on the four sides exactly so they intersect....
0
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...
0
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,...
0
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,...
0
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...
0
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...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.