|
Cheers, I'll have a look at that and let you know if it's got what I need....or if I need some help looking through it to find what I need
|
|
|
|
|
also try using System.Diagnostics.PerformanceCounter ; You can drag one of the desired category (IP/datagrams sent/recieved) from your server explorer.
there are no facts, only interpretations
|
|
|
|
|
So I've had a quick look at what you suggested do I create a windows application and then a form and then just drag and drop the thing I need onto the form and Visual Studio does all the working out for me? If that's the case....then excellent
Cheers for the help so far people. Been nice to find a forum that responds to shouts for help
|
|
|
|
|
yes, letting Visual Studio do most of the work for you is possible and quite easy. If you're not sure exactly what data you need, try playing first with windows "perfmon" program, which basically gives the same parameters, though with quite poor graphics for my taste.
there are no facts, only interpretations
|
|
|
|
|
good day!! is there a way to retrieve values from documentproperties in winspool.drv?? sample values are the number of pages, and orientation.. many thanks!!!
|
|
|
|
|
Hi,
Given a Bitmap that is embedded into a windows metafile (WMF) thereby allowing it to be added to a rich text box.
I have been trying to recreate the bitmap from the WMF.
So assuming I have a windows metafile that is represented in the RichText box as
the control string :
"{\pict\wmetafile8\picw[N]\pich[N]\picwgoal[N]\pichgoal[N] [BYTES]}"
where BYTES are the HEX representation of an image.
How would I convert this back into a bitmap?
My thought was to use the MetaFile class constructing it from a stream derived somehow from the BYTES above, and then as the Metafile class is an Image it can be transformed into a Bitmap which is also an Image.
Any help would be very useful as I keep hitting a brick wall, but as a convert from C++, my C# isnt that good yet.
|
|
|
|
|
The "ExecuteNonQuery" I'm trying to execute a 10000 INSERT statement (which
executes fine in SQL+). The INSERT statement executes properly 30% of the
time( I use progress bar to see), but throws this error sometimes. please help me! I don't know what's happening.
|
|
|
|
|
What is the error?
Charlie
if(!curlies){ return; }
|
|
|
|
|
I think the problem cause .ldb file that create by microsoft access and it don't delete. what can i do?
|
|
|
|
|
You can safely delete an .ldb file that didn't get deleted automatically. .ldb files contain computer and user information, as well as row locking information. The information it contains is about your database, but deleting the file will not change anything in your database.
All that said, however, I don't think that would cause INSERTs to fail. When I asked what the error was, I was referring to the message you get when the INSERT fails. Simply saying that you can't do something is only one part. You need to give some clues to get meaningful help.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Hi, there's one problem with SortedList - that's it doesn't permit duplicate keys - so, it's more like a "sorted Set" - What collection class should I use for this purpose?
Thanks!
Norman Fung
|
|
|
|
|
|
Just found a solution:
class Employee : IComparable
protected int _UIN
protected double _salary
...
...
public int CompareTo(object o) {
if(o is Employee) {
Employee other = (Employee) o
} else {**throw exception**}
...
switch(sortOption) {
...
case SortOption.SORT_SALARY:
ret=this.Salary.CompareTo(_other.Salary)
if(ret==0) {
ret=this.UIN.CompareTo(other.UIN)
}
break;
case else:
...
}
...
return ret;
}
Since UIN is bound to be unique, there'll never be a chance for duplicate keys exception on SortedList inserts.
Norman Fung
|
|
|
|
|
I would like to create an xml file in C# from data where the result looks something like either example below.
Sample1
<Customer>
<Details Id="1" Name="Jo" DateOfBirth="21/11/1945">
<Order Id="1" ProdId="123sd3" Item="C# Help Manuals Volume 1" Qty="1">
<Order Id="2" ProdId="15ere3" Item="VB - Don't go there Volume 31" Qty="9">
<Order Id="3" ProdId="16rfv3" Item="C# - Love it!" Qty="4">
</Customer>
Sample2
<Customer>
<Details Id="1" Name="Jo" DateOfBirth="21/11/1945">
<Order>
<Id="1"/>
<ProdId="123sd3"/>
<Item="C# Help Manuals Volume 1"/>
<Qty="1"/>
</Order>
<Order>
<Id="2"/>
<ProdId="15ere3"/>
<Item="VB - Don't go there Volume 31"/>
<Qty="9"/>
</Order>
<Order>
<Id="3"/>
<ProdId="16rfv3"/>
<Item="C# - Love it!"/>
<Qty="4"/>
</Order>
</Customer>
My XML syntax may not be correct but I wanted to show what I was wanting to produce. The thing is that there can be one order for one customer and a hundred for the next so the order part will change from customer to customer.
Does anyone know how to do this in C#?
Thanks for the help.
|
|
|
|
|
Two ways.
1. A string builder. This is yuck
2. The XmlDocument class - this is the nice way to do things.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Christian,
Thanks. Are you aware of a sample piece of code for this?
Thanks
|
|
|
|
|
If you go to this URL, I wrote a wrapper class for this stuff ages ago. Even if you don't use it, it will demonstrate pretty much every XML operation you could imagine.
http://www.windevnet.com/documents/s=7868/win0304b/[^]
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Christian,
The link did not work. Can you confirm if its a valid URL. I would be interested in looking at the wrapper if it helps to do the core 'order section'.
Thanks
|
|
|
|
|
It was working last night and it works this morning. You may need to create an account. It's free
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Also take a look at the XmlTextWriter class, which provides several methods for fast and easy generation of XML files. The examples of the appropriate MSDN topic should give you a good starting point.
Otherwise you can maybe use the XmlSerializer class, as I'm pretty sure you have your customer and order data in some kind of data structure that can be serialized into a XML document.
www.troschuetz.de
|
|
|
|
|
The best thing for XML transformations is XSL: flexible, easy and fast. All too often people think that XSLT is only for generating HTML, but that's not true...
Yes, even I am blogging now!
|
|
|
|
|
I only didn't suggest that because his original comment left me feeling the 'data' is currently in a database. XSL is really cool, and would be my first port of call if it didn't involve forcing the current data into a different XML schema, just to convert it into the one wanted.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I am trying to create a schedule control.
The biggest issue that I am having is trying to visually rectify conflicting appointments. I would like the visual appearance to be similar to Outlook.
Does someone out there have some ideas or can point me in a direction to see how others do this?
Much appreciated.
Eric
|
|
|
|
|
|
Thanks for the response but that isn't what I am looking for. I am interested in the scheduling/appointment part of outlook; not the overall look of outlook.
Eric
|
|
|
|