|
how can i load and play multiple videos using the "axWindowsMediaPlayer" tool ????
plz help -----
|
|
|
|
|
By building a playlist, either in the control ( I believe that's possible ), or by handling the event when a video ends and loading the next one.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
when the first video gets over the next one should be loaded automatically and should start playing....
I tried a lot bt, I am nt able to do it...
plz help -----
---mist----
|
|
|
|
|
Hi,
I am a .NET developer using VB.NET but not haven't had a chance to
learn and fell the OO priniciples to the fullest in a way they are
supposed to be learn. I want to switch to C# as the whole world slowly
moving towards it and at the same time learn all the OO priniciples in
a right way. In this process I am trying to find a book which explains
all fundamentals of OOP and illustrate how to develop a small
application implementing all these OO priniciplese would help me
understand the whole thing in one shot.
Are there any great books or videos that would help me accomplish my
goals? I am desperate to find an excellent book that mainly illustrate
an sample project/case study implementing all OOP with comments for
better understanding of the OOP techniques and scope of the project as
well.
Please advice.
Thanks,
-L
|
|
|
|
|
"Head First C#"[^], from O'Reilly was a good read. It assumes no prior programming knowledge and is being used in the classroom. It's loaded with examples, and fun to read.
For video's, I'd like to recommend the MSDN library "How Do I"[^] section. It's filled with short tutorials, not limited to C#.
Enjoy
I are troll
|
|
|
|
|
Thanks for the quick reply. I will sure look into this book.
Thanks,
L
|
|
|
|
|
Stick this in your favourites, very useful[^] in the early stages of the change
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hey, Thank you for the great link. I hooked it up to my favorites. Thanks again.
|
|
|
|
|
Hi
i want to get list of all Forms in my current app by this code and display it's Name property to ListBox :
Assembly assembly = Assembly.GetEntryAssembly();
Type[] types = assembly.GetTypes();
FormsCollection forms = new FormsCollection();
foreach(Type t in types)
{
if (t.BaseType == typeof(Form))
{
Form frm = (Form)Activator.CreateInstance(t);
frm.Name = t.Name;
forms.Add(frm);
}
}
this.listBox1.DataSource = forms;
this.listBox1.DisplayMember = "Name";
Here is my FormsCollection class :
public class FormsCollection : CollectionBase
{
public Form Add(Form frm)
{
base.List.Add(frm);
return (frm);
}
public void Remove(Form frm)
{
base.List.Remove(frm);
}
public Form this[int index]
{
get
{
return (Form)base.List[index];
}
set
{
base.List[index] = value;
}
}
}
as u can see in above code (this.listBox1.DisplayMember = "Name";), i set displayMember of forms object to 'Name', but at runTime it does not display anything, whereas when i use this.listBox1.DisplayMember = "Text"; it display Text correctly. how to display 'Name' field ?
Thanks
|
|
|
|
|
Hi,
AFAIK CollectionBase is non-generic, it behaves like an ArrayList, i.e. it holds typeless Objects,
for which Name does not exist. Probably that is why your binding isn't working well.
I suggest you simply write public class FormsCollection : List<Form> {}
FYI: Application.OpenForms "Gets a collection of open forms owned by the application".
|
|
|
|
|
You beat me to it.
I was just away checking the OpenForms part when you posted.
I think you have nailed it!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks Luc
but it does not solve my problem. it does not still display Name.
Note : i want to get a list of all forms of my application, not OpenForms.
|
|
|
|
|
Hi,
I have been looking into this, and strange things are going on.
I tried Text, Name and Tag properties. Text and Tag work fine, Name does not, i.e. it shows the same thing ToString() does, which is the type name followed by ", Text: " and the Text value.
The following remarks apply, but are insufficient to explain it all:
- Form derives from Control
- Control has Text, Name and Tag properties amongst others.
- Form overrides Text property
- basically I see no different characteristics between Name and Tag, yet they act differently.
I suggest you use Tag for your purpose, assuming it was not in use so far.
|
|
|
|
|
You know this is really weird!
if you use:
this.listBox1.DisplayMember = "BackColor";
instead of "Name", it displays the BackColor, no problem.
I realise that this doesn't solve your problem, but it is very interesting.
I'm going to play with this for a while, but if you find a solution in the mean-time please post it here.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Weirder, and weirder.
If you try doing the DataBinding in the designer, select the FormsCollection as the DataSource . When you try to select the DisplayMember , all of the public properties of Form are there, except for Name .
Maybe the only way to do it is, as Luc suggested, put the Name into the Tag property if you aren't using it, and use that as the DisplayMember .
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Googled a bit, found some similar complaints, no solutions.
Also found this article dated 27 Sep 2004 Best Practice for Binding WinForms ListControls[^] which seems not to have had problems with DisplayMember="Name" on ListBox controls !?!?!?
It does feel like a .NET bug that maybe did not exist at first.
|
|
|
|
|
OK, this one is really, really, wacked. I've never come acrossed a problem like this before, but then again, I try to avoid using just "Name" as a property of anything. I usually use a more descriptive identifier, like "FormName", but that's just me.
I don't know what his "FormsCollection" class looks like, but I got around the problem by using the above technique in a custom collection that holds an instance of each form and it's name as a seperate property, called, what else, FormName.
His code in his original post looked like it was just scanning the assembly for Form classes and creating an instance of each one, adding it to a collection for later use. That looks like a Dictionary to me.
|
|
|
|
|
Hi Dave,
I agree the OP could have done things differently and never encounter the problem; OTOH the binding behavior is strange.
IMO the Name property should behave like any other property, however I did notice one peculiarity using Reflector, not sure it is relevant though: the getter, when no name is present, returns Site.Name instead.
I have no idea what all the Site stuff is about, could this be the cause of it all?
|
|
|
|
|
Luc Pattyn wrote: the getter, when no name is present, returns Site.Name instead.
Which class/property did you find this in??
Luc Pattyn wrote: I have no idea what all the Site stuff is about, could this be the cause of it all?
Don't know, but it sounds like it might be. The problem I have is that "if no name is present", then why does it appear like that should read "if no name is present, or name is 'Name'"...??
Damn! I wish I could step into the .NET Framework source to see where it goes with this. I can't use it where I work.
modified on Friday, April 17, 2009 11:07 AM
|
|
|
|
|
This is what .NET Relector 5.1.5.0 shows for System.Windows.Forms.Control.Name:
public string get_Name()
{
string name = (string) this.Properties.GetObject(PropName);
if (string.IsNullOrEmpty(name))
{
if (this.Site != null)
{
name = this.Site.Name;
}
if (name == null)
{
name = "";
}
}
return name;
}
|
|
|
|
|
No wonder I couldnt' find it. I never looked at the Control.Name property! Duh!
But, his forms must have a Name, right?? So this getter should never get to the IsNullOrEmpty = true code. It should always return the correct name. ....Unless GetObject() is returning something it shouldn't be.
Damn, to be able to step through this code would be great...
I was looking at the BindingContext, BindingBase, DisplayMember, and everything else along those lines. I can see where BindingBase goes through properties of an object, but there's nothing that would cause it to ignore the "Name" property.
|
|
|
|
|
Hi everyone..
I have a problem creating a AxMsComm list. This is my code:
<br />
public static List<axmscommlib.axmscomm> lstModem = new List<axmscommlib.axmscomm>();<br />
lstModem.Add(new AxMSCommLib.AxMSComm);<br />
lstModem[0].Enable = True;<br />
lstModem[0].Tag = -1;<br />
lstModem[0].CommPort = 1; <br />
.<br />
.<br />
While I am running my aplication I get the following exception:
<br />
InvalidActiveXStateException<br />
I searched for this in google and I found that this is because .NET doesn't allow to create new COM objects dinamically.
Is this true? Does anyone know a workaround of this?
Any help would be apreciated! Excuse my English if I made a mistake.
Ivan.
|
|
|
|
|
If it is a serial port you need, why don't you use the SerialPort class?
|
|
|
|
|
I was wondering that too !
Its not my fault! This aplication is implemented in this way
|
|
|
|
|
Is it possible to run an embedded WSF script?
I know I can run the script if it is external to the program with the System.Diagnostics.Process class but I would like to make this a standalone exe so it is portable.
any code examples would be great or the class I should research more.
thanks
|
|
|
|