|
aha.. i tryed to use property but not method...
ok. i'll it to. thanx!
but why thys code dont work?
public partial class frmLoading : Form
{
private int pointCount = 0;
// private int iterationsCount = 0;
private System.Timers.Timer tmrLoad = new System.Timers.Timer();
public frmLoading()
{
InitializeComponent();
}
private void frmLoading_Shown(object sender, EventArgs e)
{
tmrLoad.Interval = 1000;
ChangeLabelText();
}
private void ChangeLabelText()
{
for (; ; )
{
if (pointCount <= 10)
{
lblLoadingText.Text += ".";
tmrLoad.Start();
pointCount++;
Application.DoEvents();
}
else
{
lblLoadingText.Text = "Loading";
iterationsCount++;
pointCount = 0;
}
}
}
}
main form --------------------
private void frmMain_Load(object sender, EventArgs e)
{
this.Visible = false;
}
private void frmMain_Shown(object sender, EventArgs e)
{
frm.Visible = true;
LoadSettings();
LoadImages();
LoadControlsPositions();
frm.Dispose();
this.Visible = true;
}
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Sorry, I have no idea what you try to do here!
What is the timer doing here? You haven't added a eventhandler forthe timer.
All the best,
Martin
|
|
|
|
|
ok. timer can go to hell
I want that main form is invisible while images are loading. so I do this:
private void frmMain_Load(object sender, EventArgs e)
{
this.Visible = false;
}
right?
and after images are loading - form must be showed. so
private void frmMain_Shown(object sender, EventArgs e)
{
LoadSettings();
LoadImages();
LoadControlsPositions();
this.Visible = true;
}
right?
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Like Christian said at the beginning, you should use "Application.DoEvents();".
private void frmMain_Load(object sender, EventArgs e)
{
this.Visible = false;
Application.DoEvents();
}
tradakad wrote: private void frmMain_Shown(object sender, EventArgs e)
{
LoadSettings();
LoadImages();
LoadControlsPositions();
this.Visible = true;
}
Again, DoEvents. But which event are you connected too?
All the best,
Martin
|
|
|
|
|
Martin# wrote: Again, DoEvents. But which event are you connected too?
while main from is hiding - i show loadingForm
private void frmMain_Shown(object sender, EventArgs e)
{
frm.Visible = true;
Application.DoEvents();
LoadSettings();
LoadImages();
LoadControlsPositions();
frm.Dispose();
this.Visible = true;
}
and if dont write Application.DoEvents(); label ot the loading form is not visible
when LoadControlsPositions(); is complete - i kill frm and show the main form again..
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
I see.. sorry. I had to do this
private void frmMain_Load(object sender, EventArgs e)
{
this.Visible = false;
frm.Visible = true;
Application.DoEvents();
}
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
hello i want edit row in datagrid so after clicking edit button update and cancel linkbuttons is coming what i want is after clicking update linkbutton data is not updating .
iam using vs.net2003 and asp.net 1.1
iam sending code please see and give me idea
<pre>
private void DataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
String connection = "uid=sa; password=sa123; database=usermanagement; server=c113";
SqlConnection con= new SqlConnection (connection);
//SqlCommand cmd=new SqlCommand ("select * from tbl_user_management
SqlDataAdapter da=new SqlDataAdapter ("select * from tbl_user_management",con);
con.Open ();
DataSet ds=new DataSet ();
da .Update(ds);
DataGrid1.EditItemIndex = -1;
DataGrid1.DataBind ();
}
</pre>
srinivas
sri
|
|
|
|
|
The following line of code:
this.lblImportFile.Font = new System.Drawing.Font("Tahoma", 8.25F);
is throwing the following exception:
{"Exception has been thrown by the target of an invocation." }
and I have no idea why. does anybody have any ideas?
|
|
|
|
|
Sorry forgot to mention I am using Visual Studio 2003 with .NET Framework 1.1
|
|
|
|
|
I have narrowed it down to an "Overflow or underflow in the arithmetic operation." but I still don't know why.
|
|
|
|
|
then u can see the inner exception, then u came to know whats the problem.
Ex.InnerException.Message
With regards
Amjath
|
|
|
|
|
this is working fine
this.lblTest.Font = new System.Drawing.Font("Tahoma", 18.25F);
am using c# 2005 expression edition
With regards
Amjath
|
|
|
|
|
if you can catch the exception, show it with ToString() method.
DO NOT USE MESSAGE PROPERTY
ToString() shows everything there is, Message only gives a short one-line summmary.
|
|
|
|
|
Hi to all,
I want some information about the playing the multiple video clips on the web page one by one. Please help me how can i do it.
Pravin
|
|
|
|
|
you might want to take a look at Silverlight. I remember seeing a demo at the Remix convention about several video clips being play simulatenously on a webpage. Go to http://www.silverlight.net
Edit:
Here is a tutorial which explains how to use Silverlight and streaming videos via webpage
http://aspalliance.com/1342_Streaming_a_Silverlight_Media_Application_from_Silverlight_Live#Page5
In particular go to the section titled " Invoke multiple video files from a single web page" which is the answer you are seeking.
Silverlight rocks when it comes to media streaming.
|
|
|
|
|
But i am using shockwave flash player object/component here. It does not shows the properties and events. so how can i use it.
Pravin
|
|
|
|
|
It doesn't expose properties that you can natively hook into through C#. The properties are all controlled through HTML using the PARAMS and EMBED tag on the object. Here's an example:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="550" HEIGHT="400" id="superflashMovie"><PARAM NAME=movie VALUE="superflashMovie.swf"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="/support/flash/ts/documents/superflashMovie.swf" quality=high bgcolor=#FFFFFF WIDTH="500" HEIGHT="350" NAME="superFlashMovie" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
ya i tried that but i want to show the second clip at the end of first clip. I am unable to find out how can I handle it? is there is any event occures at the end of clip or video?
-- modified at 5:08 Tuesday 24th July, 2007
Pravin
|
|
|
|
|
Well, the only way that I can think (off the top of my head) to do this would be to use javascript to play the next movie in a sequence after a period of time. Assume that you've given the Flash object an id of "mySecondMovie", you could do this to trigger the movie:
<SCRIPT LANGUAGE = "JavaScript">
<!--
var secs
var id = null
var isTimerRunning = false
var delay = 1000
function InitializeTimer()
{
secs = 15
StopTimer()
StartTimer()
}
function StopTimer()
{
if(isTimerRunning)
clearTimeout(id)
isTimerRunning = false
}
function StartTimer()
{
if (secs==0)
{
StopTimer()
playMySecondMovie()
}
else
{
self.status = secs
secs = secs - 1
isTimerRunning = true
id = self.setTimeout("StartTimer()", delay)
}
}
function playMySecondMovie()
{
if (document.mySecondMovie)
{
if (document.mySecondMovie.Play)
document.mySecondMovie.Play();
}
}
</SCRIPT> Then, in your body onload, you would call InitializeTimer .
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks for it. but how can i calculate the length of the first movie. Is there any event occures at the end of Video clip? so that I can check it?
Pravin
|
|
|
|
|
Not that I'm aware of. Mind you, if you have the flash itself, you could always call the javascript to play the next movie using an ActionScript command:
getUrl("javascript:playNextPage();") Then, you would implement the playNextPage javascript in your page to play the next movie as outlined above.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Ok Thanks.
I hav one more doubt.
I hav created a object in html tags of my application. Now i want to access that object in my code behind page.
Can u plz tell me how can i access that object and properties of it in code behind page?
Pravin
|
|
|
|
|
Mark the object with runat="server" .
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Sorry but it didn't worked. I'll show u my code.
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="Video.WebForm1" %>
<title>WebForm1
<object id="Player" runat="server" width="425" height="350" viewastext=""><param name="movie" value="http://www.youtube.com/v/5Uahw5BU9N8" /><param name="wmode" value="transparent" /><embed src="http://www.youtube.com/v/5Uahw5BU9N8" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350" />
Now, Player is the object id of object i hav created in Html tags. I want this object to be accessed in Code behind, like Textbox or Label or Button etc objects can be accessed there.
Pravin
|
|
|
|
|
I'm not sure what you are trying to achieve here - the flash is a clientside object. What exactly do you hope to achieve?
Deja View - the feeling that you've seen this post before.
|
|
|
|