|
Hi,
I want to write some big text datainto wmv file(>64k). So I need the IWMHeaderInfo3 . I have the WMEncoder object. How to get IWMHeaderInfo3 interface from WMEncoder?
Regards,
Hemant.
|
|
|
|
|
Hi,
By calling Dataset.WriteXml, my code produces XML as listed below.
The user can also load the XML file, and I will use Dataset.ReadXML to do this. Preferably before calling that method, I would like to validate the schema of the XML to ensure that it has the same structure as an XML file produced by WriteXml. How can I do that?
At present, I am loading the XML file and writing code like this:
ValidXml =
(LoadedOk) &
(dsKeysAndValues.Tables[dsnKeysAndValues].Columns[KeyGroup] != null) &
(dsKeysAndValues.Tables[dsnKeysAndValues].Columns[ValueGroup] != null) ;
The code not only doesn’t work, but it also doesn’t seem elegant – if the XML file is large, it will take time just to load the file, before I can validate it.
How can I validate the schema of XML to ensure that it matches what I am expecting?
Thanks for your help, pointers, and time!
Richard
The mystery is out there – in the XML-Files (X-files music follows…)
XML produced using WriteXml:
<?xml version="1.0" standalone="yes"?>
<KeysAndValues>
<xs:schema id="KeysAndValues" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="KeysAndValues" msdata:IsDataSet="true" msdata:Locale="en-CA">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="KeysAndValues">
<xs:complexType>
<xs:sequence>
<xs:element name="Key" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Value" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<KeysAndValues>
<Key> K1</Key>
<Value> V9999</Value>
</KeysAndValues>
|
|
|
|
|
Take a look at the XmlValidatingReader class. It's obsolete in .NET 2.0 but the MSDN topic also provides links to topics that present you what to use instead.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi Stefan,
Thanks for your help.
Richard
|
|
|
|
|
Hi,
I want to convert a char array to System.IntPtr. How can I do this?
I written the following code wich gives error as cannot copy to null value
string metadatapath2 = "C:\\BigMetadata.txt";
StreamReader myStreamReader1 = new StreamReader(metadatapath2);
string bigdata = myStreamReader1.ReadToEnd();
char [] dataarray = bigdata.ToCharArray();
System.IntPtr myDataptr = new System.IntPtr();
Marshal.Copy(dataarray,0,myDataptr,dataarray.Length*2);
Thanks in advance
Regards,
Hemant.
|
|
|
|
|
You can't convert a char array to an IntPtr. An IntPtr is just a pointer in a form that can be handled by managed code.
What your code is currently doing is trying to copy the data from the array to the memory area that the pointer is pointing to. As you haven't allocated any memory area and made the IntPtr point to it, that is impossible.
What you have to do is to get a pinned memory area, either by allocating unmanaged memory and copy the data to it, or by pinning the dataarray, and make the IntPtr point to the memory area.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Thanks for urgent reply.
How can I allocate a memry and get some data copy to that memory ad get its pointer back?
Regards,
Hemant.
|
|
|
|
|
Look at the AllocCoTaskMem and AllocHGlobal methods in the Marshal class. In the documentation you will find some information on when to use which.
---
b { font-weight: normal; }
|
|
|
|
|
in the name of god
hi.
how can i get local mouse in richtextbox?(for get text under mouse)
tankyou
|
|
|
|
|
In the name of Jesus the Messiah (allow me to return the favor)
You can get the local mouse position like this:
Point localMousePosition = myRichTextBox.PointToClient(Control.MousePosition);
Then you can get the text character under the cursor like this:
char character = myRichTextBox.GetCharFromPosition(localMousePosition);
|
|
|
|
|
I have two controls working together, a list of items and a datagrid. What is selected in the list will determine what is displayed in the datagrid. The datagrid is bound to an ArrayList of objects via datatable that will create one to N rows with seven columns. I have the read only property set to true. What I've noticed is if I select a cell and then select a new item in the listbox, the cell item will remain on top. (The new value is underneath.)
On each new selection, I clear the datatable, set the datagrid source to null and then refresh the datagrid. I then rebuild the table and add it to the datagrid table styles.
If the first display has three rows and I click in a cell on the third row and then select an item in the listbox that only will display one row, the selected text from the previous display remains displayed in its position.
Any ideas? Thanks for the help!
Don
-- modified at 0:56 Sunday 5th November, 2006
|
|
|
|
|
CAn any buddy help me in hair styling software. I losd he pictuire of the client and now want to appl some hair styles on him. How can I make the hair styles and apply them. For refrence pleez see the following link I want this kinda software
http://www.salonstyler.com/download/sspdemo.exe[^]
CAN SOMEONE PLEEZ HELP ME. Im a student and this is my final project. THANX
|
|
|
|
|
We don't write software for you. Do you have any C# specific problems?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Actually I want to know whether this project can be made in c# or not.... Thats is actually my poblem I cant figure out whish language or toool to use. Jus wanna know abt it........
|
|
|
|
|
Yes, you can use C# to create an application doing what you want, if that's all you want to know.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Greeeg, can you please write a program for me? It needs to be cool. Who cares that it's my own school assignment that should reflect how much I've learned in class...
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
I'll write it for you.
.
.
.
.
.
.
.
How much do you pay?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
FYI:
Don't link directly to an executable. Who in his right mind would use the link?
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: Who in his right mind would use the link?
Ummm... This guy[^]
|
|
|
|
|
Amar Chaudhary wrote: this forum is for questions and answers
Yes, Guffa asked a question and I answered it.
Amar Chaudhary wrote: hey Colin i read your articles and had a respect level for you and didint expect that from you
Having a sense of humour you mean? C'mon it was a joke.
|
|
|
|
|
i think its pretty simple
*the key behind this kind of software is that you have a fixed size of the picture taken and will have fixed position of head
* the image for the hair with transparent rest area will be drawn over base head image
first take a image with basic frame the head of the person
then draw hair image over it
** customization tips
1 can have multiple head shape frames
2 can have resize option for hair image
3 according to the time you have you can do many things (just imagine )
i am currently downloading the demo so wait for other responces
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
thats exactaly the same
and for changing the photographs brightness / contrast /saturation
you can search code project (here you will find more than enough)
but i think this project is too small to give as a final year project
rest is your wish
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Thanx a lot buddy.... Ya I also thought its sooo simple but my supervisor is happy wid that so I think I dont have 2 bother much. But I am thinking to add some other features in it. Can u give any idea???
|
|
|
|
|
you should increase utils in the program (its for your benefit - practice)
till now this program (just taking two or more images and resizing them accordingly ) is a game of an hour or so
*go through the guide of the software you pointed and you will find a lot more to do like using scissors(eraser) , comb(smudge) , sharpen , blurring etc there is lot of good stuff
*and you should also capture final image and give it as output to the user
*you can do more than just changing hair style (adding funny frames , nice/funny dresses for people and much more)
and it can all be done in c#
but if you want to go in that you need to go deep into image basics
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Once again I have a problem!!!!!!! I m using 2 pictiurebox one 4 the face image and 1 for the hairstyle.... But cannot do brightnessa nd contrast on both picture boxes. I have also tried drawing the image instead of picture box but It isn't working tooo. Wht will u recomment to use picture box or draw them???????
And one thing more plz recomment me any book from where I can get help in this project...........
THANX BYE
|
|
|
|