|
Hi!
I am working on a Storage Area Network (SAN) performance mesuarement system by simulating Microsoft Word usage.
I've used Filemon to get the fileoperations MS Word are using during open/write/save/close on a document stored on another computer. I'm gonna use this information to create a program that simulates many MS Word users at the same time, accessing a file on the Storage Area Network. What is the best way to do this? Should I create a file filter for these operations?
Thanks for any help.
|
|
|
|
|
i would make shaking a window form as Yahoo messanger chat make if the user click on a button.
How can i do?
Someone speak about DirectX, but where are expleining about?
If the user of my application haven't got directx on its computer can i use other ways to do that?
Thanks.
|
|
|
|
|
Sasuko wrote:
Someone speak about DirectX, but where are expleining about?
No, if you just want the window to move a bit, DirectX is certainly not required. In fact, I'm not sure how it could help.
All you need to do is create a loop and set the window position within it to differing values, and possible call Application.DoEvents() to make sure the app responds to the events for you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Good to See you.
For shaking two windows form in same machine or remote machine you can use Remoting Concept of .NET.In Three steps you can achieve this.
1. Create Server:That handle your request
2. A client: request Sender
3. your From.
For details mail me.
|
|
|
|
|
Please always search on your own before posting.
If you would just have searched for 'shake form' with this little field right beneath the CodeProject logo you would have easily found this.
|
|
|
|
|
Thanks Christian, tnx robert!
|
|
|
|
|
Hey!
I am using System.IO.serialport(Framework 2.0 beta 1) to communicate throw the serial port(com/USB).
I have connected a function to the event DataRecived, and there is a steady incoming dataflow on this serial port. To be able to read the data I had to set DTEnabled = true.
Problem: Now I need to send some data back out on the serial port, but as long as I have a steady dataflow in to my program (that im reading) I cant send?
The data is not received on the other end.
|
|
|
|
|
I need to make some calculations from milimetres to pixels in my programme (for drawing) and I need a Dots-per-inch current value for this. Where can I get it? Supposedly in the WMI but isn't there a class which handles this in standard libraries by any chance? (It would even better if DirectDraw objects could perform drawing operations using milimetres coordinates, but I highly doubt it can be made
|
|
|
|
|
I thought GDI+ allowed you to set drawing units as inches ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You can indeed set drawing units as inches (System.Drawing.GraphicsUnit.Point is 1/72 inch). Plus, you can get the DPI values from the System.Drawing.Graphics.DpiX and DpiY properties.
|
|
|
|
|
you can use the folowing function to make calculations and transformations betwin different coordonating spaces
Graphics.TransformPoints
|
|
|
|
|
I have a web service that has to log a few bits of information when a method is called. One bit of information i need is the external IP of the client...
Context.Request.UserHostAddress.ToString()
and
Context.Request.ServerVariables["REMOTE_ADDR"]
both will return 192.x.x.x addresses for users who have a local address (almost everyone).
there has to be a way to see the actual remote ip that is calling the request, right?
|
|
|
|
|
Hi. I'm adding a bunch of XmlNodes into a ListBox control. Now, when I look at the list box, I see a bunch of System.Xml.XmlElements (which is expected).
I would like to be able to display in the ListBox some specified text, but the problem is, the text is not just a public property in the XmlNode class, so I can't use DisplayMember . In order to get the text, I need to run a XmlNode.SelectSingleNode().InnerText . So far, I haven't had any luck putting anything like that into DisplayMember .
Is it possible to get the inner text of a single node from an object in my ListBox and have it displayed instead of System.Xml.XmlElement? Or am I going to have to wrap it in a class or something?
/\ |_ E X E GG
|
|
|
|
|
For any item added to a ListBox, the text returned by .ToString() is displayed.
The simplest solution is to create a wrapper class that overrides ToString()
public class NodeItem
{
private XmlNode m_node;
public XmlNode Node {...}
public NodeItem(XmlNode node)
{
m_node = node;
}
public override string ToString()
{
return m_node.InnerText;
}
}
myListBox.Items.Add( new NodeItem(myNode) );
|
|
|
|
|
eggie5 wrote:
Is it possible to get the inner text of a single node from an object in my ListBox and have it displayed instead of System.Xml.XmlElement? Or am I going to have to wrap it in a class or something?
Is that text acessible via property? If no, you MUST wrapp it. ( and/or override ToString() ).
Docs say it pretty clearly.
"A String specifying the name of a property of the object specified by the DataSource property. The default is an empty string ("")."
(MSDN[^])
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
dnh wrote:
"A String specifying the name of a property of the object specified by the DataSource property. The default is an empty string ("")."
(MSDN[^])
Yeah, but the code was so clean looking...
/\ |_ E X E GG
|
|
|
|
|
This is not a simple solution like the above, but it is easy to do in Visual Studio: get the schema for your documents, create a typed DataSet from the schema, use a dataset instance in your form, and set the appropriate table/column for the ListBox.DataSource and ListBox.DataMember properties.
Just a thought.
|
|
|
|
|
that went way over my head. thanks for your time.
/\ |_ E X E GG
|
|
|
|
|
There is 2 ways to achive this... one is to write a wrapper around an XmlNode, the other (and slightly preferable IMHO) is to write a little ListItem class.
<br />
class XmlNodeInnerTextListItem<br />
{<br />
private string data;<br />
<br />
public XmlNodeInnerTextListItem(string xpath, XmlNode node)<br />
{<br />
this.data = node.SelectSingleNode(xpath).InnerText;<br />
}<br />
<br />
public override string ToString()<br />
{<br />
return this.data;<br />
}<br />
<br />
}<br />
I tested with this code and it worked fine:
<br />
XmlDocument xmldoc = new XmlDocument();<br />
xmldoc.LoadXml("<root><node><data>foo</data></node><node><data>bar</data></node></root>");<br />
<br />
XmlNode node = xmldoc.DocumentElement.FirstChild;<br />
this.listBox1.Items.Add(new XmlNodeInnerTextListItem("data",node));<br />
this.listBox1.Items.Add(new XmlNodeInnerTextListItem("data",node.NextSibling));<br />
Listbox had "foo" and "bar" in the list!
|
|
|
|
|
Sorry, Xml went wrong. The xml i used in that <code>LoadXml</code> call was
<root><node><data>foo</data></node><node><data>bar</data></node></root>
|
|
|
|
|
Hi,
All computers are connected on LAN
IF i want to access the network its pop up the window and i have to user name and password for accessing network.
This is manually done
I want to implement using C# programmetically
I have three textboxes first text box is used for computer name and second textbox is used for username and third one is used for password
After pressing it should open that network of computer
Any one can give me code or idea how to implement
Thanks in Advance
Regards
sanjeev
|
|
|
|
|
hi,
Thanks for your reply.
In My Application I have three textboxes
First textbox is used for entering tel no
second textbox is used for user name of database server
third textbox is used for password of database server
after submitting it connects with server and display server name and showing message that Connection is ok.It will also displays server name on message box
After that all the databases will be fetched into tree view That code i have already implemented on
using LAN . I only need to implement dial up connectivity
If someone can give me idea or implemnet
I do not know how to make this
regards
sanjeev
|
|
|
|
|
Hi,
I'm quite new to C# especially when using GDI+. I saw the solution for zooming an image, but I didn't manage to zoom.
I couldn't quite understand what the parameters in "new Matrix(scale,0,0,scale, xoffest, yoffset);" mean I think
In order to zoom my image by 25% I implemented your code in the following way:
float scale = 25f/100f;
pictureBox.Image.Save("OriginalImage.png",ImageFormat.Png);
Graphics g = Graphics.FromImage(pictureBox.Image);
g.Transform = new Matrix(scale,0,0,scale, 0, 0);
pictureBox.Image.Save("ResizedImage.png", ImageFormat.Png);
pictureBox.Image = Image.FromFile("ResizedImage.png"); //to load the new image
What am I doing wrong please?
Thanks A Lot!
C.N.
|
|
|
|
|
|
Hi,
can you kindly give me an example of how can I zoom an image in a PictureBox using the Matrix method (as I had shown in the code-snippet) or any other method please?
Thanks
C.N.
|
|
|
|