|
Use ListViewItem.BeginEdit . This only works if ListView.LabelEdit is true . The default value is false , so you'll need to set it. Using the ListView control defined in the BCL (base class library) you cannot edit other columns. If you search for "List View" on this site for the .NET and C# categories you should find several articles that describe how you can accomplish that.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi,
I'm laying out the ideas for my complete revamp of the Quake 3 AI system, and to get there i need to test out pathfinding algorithms... and to get there i need to improve my programming.
Since i'm pretty new to all this, can someone please point me in the right direction?
This is want i want to be able to do:
Draw a basic 2d "map" that i can chuck all the results from the pathfinding simulation on.
The map includes:
--> Starting and ending point
--> waypoints
--> numbers, colors etc
--> basic lines, pictures
I take it those are just diffrent objects? i'm not quite sure how the objects work either...
Thanks in advance...
Serrix
The Multidisoctinal Metalobilist...
... Those are random words... don't google em
|
|
|
|
|
You can start by reading the documentation[^] for the Graphics class, as well as Drawing and Editing Images[^] in the .NET Framework SDK. There are also many, many articles about owner-drawn controls (like drawing charts on a control).
A good design would be object-oriented, where your objects draw themselves (using the PaintEventArgs.Graphics object passed to their container's OnPaint override), contain connection points, etc.
The best place to start for such a task is to search this site using the text box at the top of every page below the logo, and click "Search comments" directly above this message board to search this forum. We've discussed many times a good OO design for drawing.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Cool, thanks alot i'll do that...
hehe, it was kinda a newb question.
Serrix
The Multidisoctinal Metalobilist...
|
|
|
|
|
I have the name of a form in a string variable.
I want to load the form my making use of this variable.
kevin
|
|
|
|
|
I have a similar problem in the sense that i have a menu which i have created
Once i click a menu item i want to open another windows form.
suggest a way to do that plss!!
Sukanya
|
|
|
|
|
Try to create an EventHandler by doubleclick the menuItem.
private void miFile_Click(object sender, System.EventArgs e)
{
Form1 frm = new Form1();
frm.Show();
}
|
|
|
|
|
thnx a lot
Sukanya
|
|
|
|
|
Hi
Does anyone knows how to send a hot key to a Computer on the network?
I think I have to approach the keyboard. But how?
I've read something about keyboard Hooks.. But I don't know wether it's what I'm searching for..
Regards from Germany
|
|
|
|
|
You can't hook a remote keyboard. You can send commands to a remote service on that machine to send keyboard events (you don't want to hook them to send keyboard events, only to handle them - and you cannot handle Ctrl+Alt+Delete).
For managed apps you can use the SendKeys class, but it's rather limited. For cases that you can't solve with SendKeys P/Invoke SendInput and create what native structs and constants you need.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi all, I am a c# programmer, have a problem nagging me... i was working with my vs.net fine till last day .. but all of a sudden when i try to open a new project in visual c#, i am getting a message "operation could not be completed".. i think im experiencing this only when i try opening new c# projects and project is creating for vd.net applications...i am trying to solve it out.. if anyone familiar with this could you help me out of this nightmare...
Regds
Robins
thomasrobins
|
|
|
|
|
Maybe you're lacking some necessary file system rights.
Once I've got a similar message whenever I tried to create a new code file. It even happens when I tried to create the file on my data partition where all users have write rights. It turned up that Visual Studio wanted to create the file on my c: partition first (my user had no write or change rights there) and then move it to the specified location.
To find out, if you maybe have a similar problem, you can use the freeware tool FileMon[^].
www.troschuetz.de
|
|
|
|
|
I figured it out, i was actually being really silly. Thought I would post here in case somebody else was having the same problem and looks in the archives.
Anyways, when you receive the object from the MSG it is not said in the XML what type of class it is. You need to specify this explicitly before you cast the object back to whatever type you want. ^^
Hope this helps some person in the days of yore,
Jim
|
|
|
|
|
Hallo,
I create objects of the same! class in two ways:
1) by .Net Remoting
2) in the usual way (without .Net Remoting)
I want to find out (in the class itself), if the object was created remotely by a foreign host?
Does anybody have an idea?
Thanks,
Björn
|
|
|
|
|
Will
if(obj is RealProxy) do the trick?
(Not tested, just a theory.)
|
|
|
|
|
I am using the lastAccess property of this class to compare two files to determine which one is the latest copy. It works on my computer just fine but once it is installed and run on another pc it always returns todays date and time is equal to 12:00 am. I have checked the two seperate files and there accessed date is definetely not what it is displaying. Anybody got any ideas or thoughts on this issue ??
|
|
|
|
|
LastAccessTime indicates when the file was last read, not when last written. You probably want LastWriteTime.
To stop the file system constantly writing the last access time, by default it updates once an hour. See Optimizing NTFS Performance[^] (from the XP Resource Kit) for more details. You can apply a registry setting[^] to disable the Last Access Time updates completely. It sounds as if this has been done on the PCs you're testing with.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi
how i can call a webmethod from outLook
i want to place a link on taksItem when clicked
download a file form webserver.
thanks
|
|
|
|
|
Im not quite sure if by webmethod you meant webservice, but if you did then you might be missing a reference. What you must do is add a web reference to your project and include it at the top of your file (by the keyword "using"). Then you simply call the method like you normally would.
What part exactly is hanging you up?
Jim
|
|
|
|
|
I dunno why I can't draw a curve as I want it.
Graphics g = new Graphics();
Pen p = new Pen(Color.Black,1);
PointF[] list = new PointF[2]{new Point(1,2),new Point(2,3),new Point(3,4)}
then.. g.DrawCurve(p,list,?,?);
What I should do ? do you can guide me to one good example ?
Why the start point always is (0,0), always the curve starts by the left high corner of my win application !!
Thanks..
.............................
|
|
|
|
|
ElJerry wrote:
PointF[] list = new PointF[2]{new Point(1,2),new Point(2,3),new Point(3,4)}
That statement is wrong. You have 3 elements, not 2. Don't declare an array size when you specify the array elements when you instantiate the array. The following is common and better:
PointF[] list = new PointF[]
{
new PointF(1f, 2f),
new PointF(2f, 3f),
new PointF(3f, 4f)
}; You're also using the wrong type. If you're declaring an array of PointF , the elements must be PointF . Frankly I'm surprised it even compiled. Declare and instantiate list correctly and you should see the results you want.
Have you read the documentation[^] for the Graphics.DrawCurve method? There's an overload that doesn't even require a 3rd or 4th parameter, and which can take either a Point[] or PointF[] . It's important to understand what the documentation says. There's also several examples for the method.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hello there,
With this code:
<br />
...<br />
<br />
cmd = new SqlCommand( "insertData", conn );<br />
cmd.CommandType = CommandType.StoredProcedure;<br />
cmd.Parameters.Add( "@Name", strName );<br />
cmd.Parameters.Add( "@Data", stream.GetBuffer() );
<br />
int nResult = cmd.ExecuteNonQuery();<br />
<br />
return nResult;<br />
What will the value of nResult be if the insert operation is successful? It should be at greater '>' than 0 right?
This is weird because I'm getting a value that is not > 0, but as I checked the LastUpdate field in my database, the value is correct (which I assume it means that the data was inserted successfully). And yet, as I looked up MSDN, it should return a value of > 0.
What could be the problem?
Thanks,
~Rafferty
|
|
|
|
|
|
Hi
I have done a program , here The program reads any xml schema file and automatically writes 200 data's to a xml file(name as result.xml)according to their data types.
say for string-john1, john2,john3...etc..
say for decimal-101.20, 102.20, 103.20 ..etc.. so on.
And the program also reads a xml file with single field named address(for ex . so the program what it does is checks the schema file whether there is any element named "address" and it stores the fieldnumber(position of the field) and the field name in an array.
then the program reads a another input xml file(which has address values ). then it stores the values from the input xml file into the resultxml
I have done it and I am coming across some errors.I will paste the part of the program what I did.. Please help me to sort out the error.
private void button2_Click(object sender, System.EventArgs e)
{
ArrayList FiledNames = new ArrayList();
ArrayList MatchList = new ArrayList();
XmlTextReader xtr = new XmlTextReader(@"C:\CDEV\testdatagenerator\FIELDNAMES.xml");
while (xtr.Read())
{
switch (xtr.NodeType)
{
case XmlNodeType.Element:
FiledNames.Add(xtr.Name);
break;
}
}
xtr.Close();
XmlDocument xdc = new XmlDocument();
xdc.Load(@"C:\CDEV\testdatagenerator\vw_forecast.xml");
dataSet1.ReadXmlSchema(txtSchema.Text);
foreach (DataTable dTbl in dataSet1.Tables)
{
int i = 0;
object[] oValues = new object[dTbl.Columns.Count];
xdc.Load(@"C:\CDEV\testdatagenerator\FIELDNAMES.xml");
foreach (DataColumn dColmn in dTbl.Columns)
{
for (int y=0; y
|
|
|
|
|
At a quick glance I noticed that your first "for" loop is incorrect.....
What is the exception you're getting?
|
|
|
|