|
this may help.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag01/html/buildapps.asp
|
|
|
|
|
It sounds like the target machine doesn't have the .NET runtime installed.
You can get the redistributable from this MSDN download page.
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
Hi,
I have been writing my own C# Documentation tool after noticing a large number of omissions from the XML documenter provided by Microsoft. It's still in a very alpha phase of development but I still believe it better than the Microsoft one. It is available for free from http://www.softsteel.co.uk/tutorials/cSharp/lesson19.html. The source code has also been released under the GNU GPL.
I will happily accept comments, suggestions, bug reports and patches at bugs@softsteel.co.uk.
Andy
Andrew Sampson
Director
Softsteel Solutions Limited.
Registered in England No.4092969
Registered Office: 81 Freedom Road, Sheffield S6 2XA.
Telephone 0114 233 8136
http://www.softsteel.co.uk/
|
|
|
|
|
Hi
How do you get the memory usage of a computer in C#, i know about the Process Class in System.Diagnostic, but i DO NOT want memory usage about a process
Cheers
Ollie
|
|
|
|
|
The answer is:-
SelectQuery query = new SelectQuery("Win32_OperatingSystem");
ManagementObjectSearcher searcher = new ManagementObjectSearcher( query);
foreach (ManagementObject mo in searcher.Get())
{
System.Management.PropertyDataCollection moCollection;
moCollection = mo.Properties;
foreach (System.Management.PropertyData moValue in moCollection)
{
}
}
|
|
|
|
|
So what namespaces are these in? Still haven't gotten my mind around which namespaces apply to which type of info.
|
|
|
|
|
Hello,
I'm playing around with Shripad Kulkarni's C# TELNET Client - mostly refactoring what he had done and expanding it out to support ANSI (and maybe VT-100 emulation). I've just finished implementing the rest of the telnet protocol.
However, I'm having problems with the font selection.
I'm trying to select a font that will display the original 8-bit OEM/IBM-PC8 font (with all the line characters, etc).
Here is the font I'm using:
System.Drawing.Font( "Lucinda Console",
10.2F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point,
( ( System.Byte )( 255 ) ) );
I've tried both 0 (ANSI) and 255 (OEM) for the last argument.
The text buffers go through a few Encoding.ASCII.GetString() calls too.
Thanks for your help.
Dale Thompson
|
|
|
|
|
Dale Thompson wrote:
I'm trying to select a font that will display the original 8-bit OEM/IBM-PC8 font (with all the line characters, etc).
Here is the font I'm using:
System.Drawing.Font( "Lucinda Console",
10.2F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point,
( ( System.Byte )( 255 ) ) );
I've tried both 0 (ANSI) and 255 (OEM) for the last argument.
The text buffers go through a few Encoding.ASCII.GetString() calls too.
If anyone is interested, I found (guessed) the answer to this question.
Unrelated to the problem - my code snippet had an error, it is "Lucida Console" (not Lucinda).
But the key to the problem has to do with the "Encoding.ASCII.GetString()" calls
The provided ASCII encoding only support 7 bit ASCII. This is where the translation from 16 bit Unicode to what is displayed happens - anything that is 128 or above isn't supported by the supplied ASCII encoding.
The trick is to use the right codepage for the encoding. In this case, after a little research, I found that I needed to use the old IBM Codepage 437!
So - using "Encoding.GetEncoding( 437 ).GetString()" corrects the problem and displays
PC graphics characters!
Hope this info is of use to someone out there!
Dale Thompson
|
|
|
|
|
Hi!
There is two schema here, one refer another's attribute definition.
test.xsd
===========================================
<schema targetnamespace="http://www.nope.org/nope" xmlns:xlink="http://www.nope.org/nope" xmlns="http://www.w3.org/2001/XMLSchema" elementformdefault="qualified">
<attribute name="role" type="string">
=============================================
user.xsd
=============================================
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:test="http://www.nope.org/nope" elementformdefault="qualified" attributeformdefault="unqualified">
<xs:import namespace="http://www.nope.org/nope" schemalocation="D:\vcnet_proj\test.xsd">
<xs:element name="Root">
<xs:complextype>
<xs:attribute ref="test:role">
==============================================
.Net provided a fairly good tool call xsd, which can transfer xml schema definition into C#'s class definition. By this tool we can easily couple with data's serialization.
but this time xsd can't do it.
I typed:
xsd user.xsd /c
xsd tell me that http://www.nope.org/nope:role doesn't declared. But when i examine it in the famouse xml editor xmlspy 4.2 it validates it without any complain.
Where is the fault i made?
|
|
|
|
|
sorry, i dont know why the code between "=" is missing. I repaste it here.
test.xsd
<schema targetnamespace="http://www.nope.org/nope" xmlns:xlink="http://www.nope.org/nope" xmlns="http://www.w3.org/2001/XMLSchema" elementformdefault="qualified">
<attribute name="role" type="string">
user.xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:test="http://www.nope.org/nope" elementformdefault="qualified" attributeformdefault="unqualified">
<xs:import namespace="http://www.nope.org/nope" schemalocation="D:\vcnet_proj\test.xsd">
<xs:element name="Root">
<xs:complextype>
<xs:attribute ref="test:role">
|
|
|
|
|
test.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.nope.org/nope" xmlns:xlink="http://www.nope.org/nope" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<attribute name="role" type="string"/>
</schema>
user.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:test="http://www.nope.org/nope" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.nope.org/nope" schemaLocation="D:\vcnet_proj\test.xsd"/>
<xs:element name="Root">
<xs:complexType>
<xs:attribute ref="test:role"/>
</xs:complexType>
</xs:element>
</xs:schema>
|
|
|
|
|
Ive used tlbimp.exe to generate an assembly .DLL from a COM object's .TLB file, which seems to work fine. I've added a reference to it into a C# project, now I'm running into a simple interop problem that I just can't seem to get thru my head.
I've got a method on the COM object that did take a OLECHAR* pointer as a parameter, but the wrapper class lists this as a "ref ushort" parameter. I've been looking at what should be done here for marshalling the data, seems like it should be easy - but it's not clear. Can someone hit me on the head & make me understand?
Thanks,
JC
|
|
|
|
|
Dan I was wondering how long it would take you to find this?
|
|
|
|
|
We're pleased to announce that we at C# Corner have launched a .Net book
store. Now buy recommended books and products almost half off (at least 40%
off) the cover price. Source code updated to the final .NET release.
http://www.c-sharpcorner.com/store.asp
Thanks
C# Corner
|
|
|
|
|
I just would like to know if this is possible and is there any example to do it.
I have multiple form (MDI) which have a method that i would like to call from the parent MDI.
So I would like to click on a button in the parent MDI and the code will call the a specific method that is in the activeChild.
Does anyone have any ideal?
|
|
|
|
|
Hi all,
I am having problems with web services. I've read tons of articles and im still stuck!
I have Visual Studio.NET (VS) installed and Personal Web Server (PWS) and have created a c# web service and built it. However when I attempt to look at the .asmx file I do not get the *user friendly* description of the web service and option to invoke it - Instead I get the raw text from the .asmx file!
I'm sure this is something simple but what?
Thanks in advance!
Dave
|
|
|
|
|
Hi Dave,
I think your problem is that you want to be running IIS on your web server with your .asmx web service file. As stated in VS.NET help if you bypass IIS and ASP.NET "you will just see the plain text in the .asmx file" when viewing a .asmx file in a browser/VS.NET.
Hope this helps,
Paul
Paul Hutchinson
IT Consultant/Analyst Programmer
|
|
|
|
|
Hi all,
I'm writing a notepad-like program using C#
I want to use the Popup event of the Edit menu to disable the paste menu command when the clipboard does not contain any text.
can any one help?
also how to get the Ascii code for a character and vise-vesa?
|
|
|
|
|
You would need to add this code to disable a menu item:
MenuItem.Enabled = false;
And check out the Clipboard subtopics in the index of the .NET Framework SDK Documentation for clipboard info.
hspc wrote:
also how to get the Ascii code for a character and vise-vesa?
I also would like to know this
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
if your text is stored in single-byte strings you can convert a character to a byte and the value will be the ASCII code. By default strings are stored as Unicode and the char type is two bytes instead of one to reflect this.
You can convert a string to ASCII bytes by using byte [] bytes = System.Text.ASCIIEncoding.ASCII.GetBytes(myString);
HTH,
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
Thank you!
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
thanx all for assisstance
|
|
|
|
|
Hi,
I've been looking over the Collection classes available through the .NET framework and it seems that LinkedList hasn't been provided (Unless it is in some other namespace which I haven't checked - If so could you point it out - Thanks!).
Any ideas as to why they haven't included it in the Framework? It is a very useful data structure and has many uses just as ArrayList does.
Actually... it would be a good article to compare the Collections framework that .NET and Java provide. Cause I know that the Java Collections framework is heavily based on inheritance and abstract classes. It would be an interesting article to see the differences between them.
As a side question - Are the .NET Enumerators the same as the Java Iterators?
Thanks very much.
Mohnish
|
|
|
|
|
mohn3310 wrote:
Any ideas as to why they haven't included it in the Framework?
Good question, it does seem odd that it isn't there. You could easily create your own version of it though. If you don't know how to create a linked list there are many places on the web that will give you code for doing it
mohn3310 wrote:
Are the .NET Enumerators the same as the Java Iterators?
Enumerators in .NET are used to go through a collection an element at a time.
IEnumerator ie = myCollection.GetEnumerator();
while(ie.MoveNext) {
System.Console.WriteLine("object: " + ie.Current.ToString());
} or if you are using C# you can use foreach
foreach(object foo in myCollection) {
System.Console.WriteLine("object: " + foo.ToString();
} Simple, eh?
HTH,
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
Thanks James!
Yes, LinkedLists are relatively simple to create and there are lots of examples on the web, but I was just wondering why they didn't include it since it's such a generic data structure.
Normally we would create wrappers to ArrayLists or LinkedLists to make them typesafe (using our own classes) rather than using Objects.
Yeah, enumerators do seem to act like iterators in java.
Cool... thnx again
Mohnish
|
|
|
|