hi every one

i need to use animation bar(label) in the vb.net and desplay information

connecting with sqlserver 2000

please advice and tell me how

thank you

VS.NET does not provide the facilities to create an animation bar..or animated lables..
If you want to create animation buttons or lables you gotta use an external software like Adobe Photoshop,Image Viewer,etc..
The animation image is usually in .GIF format..

Workaround:
1.What I do for my application for simple color change for buttons or lables..I kinda use two images and Swap the image when the user points his mouse at the buttons..

2.You gotta do that in Javascript and each webcontrol has it own properties .. Onmouse over help you to get a different image when the user points the Mouse over the button or the lable..

3.Other way of doing this is by using a timer and swap the images after particular time intervals..(I generally dont advise this)

thank you Letscode you always help me

i find a code for java script for animation label and i can use it ... but the problem is HOW to connect the information that i want to display with sql server .... i dont know if java script can provide this .

please advice me if you have an idea .... i have to make it quicly b-cuse my boss need it and i dont know how to make it

thank you again

Can you be specific?
The values that you get from the Database..You want to animate those values..Is this what you are asking..

Can you be specific?
The values that you get from the Database..You want to animate those values..Is this what you are asking..

yes this way i mean

if i can use this animation pure vb.net beter than use by javascript

what can i do ????

If you want an animated STATUS BAR, or PROGRESS BAR, something that dynamically informs the user that the database query or update is 50% done, you simply cannot.

The web, even ASP.NET, is challenge-response. The user only sees something new when the server-side code is complete.

One workaround is to spawn a new process, which periodically updates a table to indiciate it's progress. You set the browser to refresh every so often, each time it does, the server-side code checks the progress by reading the "update" table value.

When it's complete, the user gets the results.

Sorry if this didn't answer your question; I didn't quite understand the question.

thank you for your answers but i can explain what i should do in my project :

1- the project for student in the school .
2- every one has ana private account and can use it for many things
3- every account has a table of student that contain username , password and some information .
3- the idea of animation bar is to display the student name and when i click to the name you can git information about the sudent as a profile .
i know that this way not suitable or good but the manager tald me to do this.

iam thinking to do it by timer but i dont know how it can work

please if you have idea tell me ..

finaly i would like to tell you that iam new programmer in VB.NET and i should do the best for my manager
thank you for intersting

I think I understand. You want to

1) query the database for a recordset
2) retrieve the student's name from a field in the recordset
3) display that name on the web page
4) the name should somehow "move", perhaps scrolling across the screen?

You do the first 3 steps in ASP.NET. Someone here can help you with that. I code ASP.NET, but only in C#.

You'd have to do step 4 with client-side code. JavaScript. Post a separate question in the JavaScript/DHTML forum.

last question please if i want to use a timer what event of page loader i choose i mean that i want to refresh the page every one second

I got something here...


This Javascript works for animating the lable(DIV)...It works perfectly in Internet Explorer 5.5 and above..

<HTML>
	<HEAD>
		<title>WebForm1</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<SCRIPT language="JavaScript" type="text/javascript">
        var ie4 = false;
        if(document.all) {
                ie4 = true; 
        }       
        
        function setContent(name, value) {
                var d;  
                if (ie4) { 
                        d = document.all[name];
                } else {
                        d = document.getElementById(name);
                }
                d.innerHTML = value;    
			}       

		function getContent(name) {
				var d;
                if (ie4) {
                        d = document.all[name];
				} else {
                        d = document.getElementById(name);
                }
                return d.innerHTML;
			}

        function setColor(name, value) {
                var d;  
                if (ie4) { 
                        d = document.all[name];
                } else {
                        d = document.getElementById(name);
                }
                d.style.color = value;  
			}

			function getColor(name) {
                var d;
                if (ie4) {
                        d = document.all[name];
                } else {
                        d = document.getElementById(name);
                }
                return d.style.color;
        }
        

        function animate(name, col) {
		var value = getContent(name);
		if (value.indexOf('<span') >= 0) { return; }
		var length = 0;
                var str = '';
		var ch;
		var token = '';
		var htmltag = false;	
                for (i = 0; i < value.length; i++) {
			ch = value.substring(i, i+1);
			if (i < value.length - 1) { nextch = value.substring(i+1, i+2); } else { nextch = ' '; }
			token += ch;
			if (ch == '<' && '/aAbBpPhHiIoOuUlLtT'.indexOf(nextch) >= 0) { htmltag = true; }
			if (ch == '>' && htmltag) { htmltag = false; }
			if (!htmltag && ch.charCodeAt(0) > 30 && ch != ' ' && ch != '\n') {		
                        	str += '<span id="' + name + '_' + length + '">' + token + '</span>';
				token = '';
				length++;
			}
                }
                setContent(name, str);
                command = 'animateloop(\'' + name + '\', ' + length + ', 0, 1, \'' + col + '\')';
                setTimeout(command , 100);
        }

        function animateloop(name, length, ind, delta, col) {
		var next = ind + delta;
		if (next >= length) { delta = delta * -1; next = ind + delta; }
		if (next < 0) { delta = delta * -1; next = ind + delta; }
                setColor(name + '_' + ind, getColor(name + '_' + next));
                setColor(name + '_' + next, col);
                command = 'animateloop(\'' + name + '\', ' + length + ', ' + next + ', ' + delta + ', \'' + col + '\')';
                setTimeout(command , 100);
        }
		</SCRIPT>
	</HEAD>
	<Body bgColor="#333300">
		<DIV style="COLOR: white" id = "animate"></DIV>
		<SCRIPT language="JavaScript">
			document.getElementById('animate').innerHTML = "Hello world"
			animate('animate', '#ff8000');
		</SCRIPT>
	</Body>
</HTML>

Things to do
1.You just have to change your prefered color in the animate function.
2.When you collect the values from the database,put them inside a textbox or lable(newdivid) and then refer them to this <DIV> by using something like

document.getElementById('animate').innerHTML = document.getElementById('newdivid').innerHTML

INSTEAD OF document.getElementById('animate').innerHTML = "Hello world" in the above code

NOTE: The innerHTML does not work with Netscape or Opera or IE lower then 5.5

Hi Friends .....
This is uday.
I want an animated STATUS BAR, or PROGRESS BAR, something that dynamically informs the user that the database query or update is 50% done. using vb.net

Is it Possible n if possible how to do it ??????

Plz Help me i am searching it from last 3 days.

Plz Help Me???????????????

Uday

This article has been dead for over six months. Start a new discussion instead.