|
I just answered your question before: you don't need to serialize the media player control at all. You're not sending it across context boundaries (separate AppDomains, separate processes, separate machines, etc.), so there's no reason to serialize it in order to marshal it. Either re-parent the control or use the existing methods from the PlayerApplication class I mentioned before.
You won't be able to recieve single- and double-click events from the AxMediaPlayer control as you would with other Windows Forms control because the AxMediaPlayer control is an ActiveX control with it's own thread queue (message dispatch). If the control exposes appropriate events, you can handle those, but the Click and DoubleClick events you find on other controls will not work.
See my previous post for details about re-parenting the control or using the supplied methods exposed by its typelib that you use to create an interop assembly, which I also gave you instructions on. If you don't understand them, continue the thread - don't start a new one.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
thanks for your help
i want a form with some controls for example textbox,picturebox,shape,Axmediaplayer,and Axshockwaveflash
and i want to save as that form with total controls,with xml format, and load that form too.
|
|
|
|
|
That's a different request than from before. In the future, please be as descriptive as you can when describing a problem - in anything you do (not just development; like to doctors, lawyers, etc.).
Images can't be serialized using XML Serialization, unless you were to attribute your non-supported properties with your own implementation of TypeConverter s that could effectively convert to and from strings (like for an image, you could serialize as a base64-encoded string using the ToBase64Transform class, for example). That's really about the only thing you can do; either that, or go to a lot more trouble of using Runtime Serialization with a SOAP (an XML dialect) formatter since all your control classes are themselves serializable (which means you have to extend every control you use and implement ISerializable .
I recommend you take a look at Marc Clifton's articles here on CodeProject about his project (recognized by Microsoft), http://www.myxaml.com[^]. It already does a lot of this, and you can either learn from his code (which requires pretty in-depth knowledge of the .NET Framework) or simply use it for your UIs.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
hi,
is there any command in ADO.NET to list all tables from a given database name?
(in C#)
|
|
|
|
|
ADO.NET is ADO.NET whether you're using C#, VB.NET, MC++, etc. In fact, all assemblies work the same in any managed language. It's important to understand that.
That being said, ADO.NET is an abstract interface to any database driver that uses either an OLE DB driver, ODBC driver, or has implemented a specific driver client implementing the ADO.NET interfaces. That does not mean, however, that every feature in a particular database is supported, since abstraction leads to simplification (which is why SQL Server, Oracle, and others have implemented their own clients for ADO.NET).
Enumerating databases in a DBMS is different; so, what type of DBMS do you want to enumerate?
In SQL Server, you can use the "sp_helpdb" stored procedure. For Access, there is no way other than searching your hard drive for *.mdb, since Access uses Jet Databases, which is a file-based database. It's different for MySQL, Oracle, and others, too.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
in mysql, i can use 'show tables' command to list down all the tables in particular database.
i wanna know how to do this in sql server 2000.
so that i can use C# to perform such operation using data adapter
|
|
|
|
|
There's several ways you can show tables in SQL Server, the easiest being the INFORMATION_SCHEMA metadata table:
SELECT table_name
FROM INFORMATION_SCHEMA.TABLES You can also query the sysobjects table:
SELECT name
FROM sysobjects
WHERE xtype = 'U' or xtype = 'S' -- U for user tables, S for system tables
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thank you
|
|
|
|
|
Hi
please tell me what exactly the
System.Drawing.Drawing2D.Matrix class and it's operations like
Clone(),Invert(),TransformPoints(points) performs?
Thanks
Roya
|
|
|
|
|
Royaeh kohestan wrote:
System.Drawing.Drawing2D.Matrix
Encapsulates a 3-by-3 affine matrix that represents a geometric transform. This class cannot be inherited.
Royaeh kohestan wrote:
Clone()
Creates an exact copy of this Matrix object.
Royaeh kohestan wrote:
Invert()
Inverts this Matrix object, if it is invertible.
Royaeh kohestan wrote:
TransformPoints(points)
Overloaded. Applies the geometric transform this Matrix object represents to an array of points.
That is how it is stated in MSDN. You can find more information here[^]. Hope this helps you out.
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
thanks Dear bneacetp,
i read this explanations before,but i can't have a good conception of them,
can your self give more explanation with one example of its structure and elements?
|
|
|
|
|
thanks Dear bneacetp,
i read this explanations before,but i can't have a good conception of them,
can your self give more explanation with one example of its structure and elements?
|
|
|
|
|
|
it seems your asking not on the class itself, but about matrix manipulations. this is usualy referred to in basic linear algebra courses. you can easily find links such as:
http://www.isr.umd.edu/~austin/aladdin.html#sec3[^]
anyway, the basic idea is that you can do arithmetics with matrices (and vectors), in a way that somewhat resembles number (scalar) arithmetics. These arithmetics can have functional and gerometrical meanings.
|
|
|
|
|
Oh come on - it's all in the .NET Framework SDK which you should already have installed! Look it up in the documentation. how do you expect to learn anything?!
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
thanks Heath,
i installed sdk and use it but i want more explanation.
Roya
|
|
|
|
|
Then you really should be a little more specific in your question. Asking what they do when the .NET Framework SDK class documentation for the Matrix clearly states what they is asking for trouble.
If you don't understand matrix calculations - because, frankly, the method names are self-explanitory even without reading the documentatin - I suggest you do a google search on matrix operations[^], or something similar.
This forum is for programming questions, and while a basic understand of matrix operations may lead to questions asking how to use it, your questions really seem along the lines of basic matrix operation questions. This is a class all by itself.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
You are right ,Thanks for Your frank manner and help.
Roya
|
|
|
|
|
I would like to change the background of a TabControl control, but it doesn't seem to have a BackColor property. As far as I know, there isn't a way to change its color from the default "Control" color. Any way around this?
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
Besides painting it yourself, no. The Tab Control common control - which is encapsulated by the TabControl class - doesn't even support custom drawing messages. This is why BackColor was overridden and attributed with BrowsableAttribute(false) and EditorBrowsableAttribute(EditorBrowsableState.Never) .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
That's not the response that I was hoping for , but thanks just the same.
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
When I send data from server,How can I send it?Now I'm trying to use DataSet,But I don't know how to transport byte into dataset in client.
Any other way>?
From China
|
|
|
|
|
For one, you could eliminate the need to define your own protocol if you use XML Web Services or .NET Remoting. A DataSet will be serialized to XML automatically by the Web Services and .NET Remoting serialization (XML Serialization and Runtime Serialization, respectively).
If you want to transfer something immediately, then do so. I guess I don't see what the problem is. If your client/server communication is two way (like you're own socket programming), then just send the data to the client.
For a DataSet , it's really quite easy. Create a new MemoryStream and call DataSet.WriteXml passing the MemoryStream . Now you can read the contents of the MemoryStream into a byte[] array. You could also use a StringWriter then encode the resulting string using the Encoding of your choice to get the bytes and send them down the wire.
If you're using XML Web Services or .NET Remoting via an HTTP channel, then communications is - by design - client-request/server-response only. A server cannot send the client something unless the client requests it, since the client establishes the connection. If you use .NET Remoting using an TCP channel (or a custom transport sink, which then it depends on the implementation), you can send data from the server to the client if the client has registered a sponsor with the server (or used some proprietary means of the server keeping a reference to the client).
If you need more help, please be more specific.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I've been putting the ArrayList to store instances of forms to good use. However the limitation of not being able to change the collection means its not really the ideal thing I'm looking for.
Specifically, I'm looking for a way to access instances of a form / class, and be able to change the underlying collection.
Thanks!
|
|
|
|
|
You can add, remove, and re-reference items in the ArrayList , which, BTW, is used extensively behind the scenes of all your favorite list and collection classes. Where do you get the idea it can't be changed?
If you're having a specific problem, please respond and be specific about what the problem is.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|