|
Nader Elshehabi wrote: 3 quick, short, direct, well focused answers in a row in less than 30 mins. WOW!! I think that's a record
You should have been here when Heath Stewart hung around the C# forum. Now there was a guy who could go through 20 questions in 30 minutes all with precise, detailed and accurate answers. He works for Microsoft now and doesn't have so much time. He pops in now and again, but not very often.
|
|
|
|
|
Hello
I read the bio of the man. He is quite a guy! and 9 THOUSAND messages!!! How did he do that?!!
Last message in the C# forum was 7 months ago though.. Too bad!
Regards
|
|
|
|
|
I have removed the contorl title bar from my form. I have put a usercontrol there instead of that. Now when i drag it the form should move accordingly. How can i do that?
regards
hari
aspspider.net/rkharikrishnan
|
|
|
|
|
Use the event OnMouseDown for detecting mouse click, then use OnMouseMove to get the mouse pointer location, from mouse pointer location you can count the x and y for the property Location.
|
|
|
|
|
|
How can get memory status of the system using C#
Memory status means i need to get aviable physical memory, total physical memory etc.
Please help me
Regards
Hari
aspspider.net/rkharikrishnan
|
|
|
|
|
Find all what you want there....
ManagementObjectSearcher m1 = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem");
foreach(ManagementObject mo in m1.Get())
{
foreach(PropertyData pdc in mo.Properties)
{
Console.WriteLine(pdc.Name + " = " + pdc.Value);
}
}
ManagementObjectSearcher m2 = new ManagementObjectSearcher("SELECT * FROM Win32_ComputerSystem");
foreach (ManagementObject mo in m2.Get())
{
foreach (PropertyData pdc in mo.Properties)
{
Console.WriteLine(pdc.Name + " = " + pdc.Value);
}
}
|
|
|
|
|
Thanks for the help... Its worked for me
|
|
|
|
|
Anywho, If i add a node
this.treeview1.Nodes.Add("ParentNode");
How do i add a node to it?
I can do this
this.treeview1.SelectedNode.Nodes.Add("ChildNode");
but it means having to click on the node first, which i cant do.
|
|
|
|
|
Don't use Nodes.Add(string) use Nodes.Add(TreeNode)
led mike
|
|
|
|
|
Actually, i am adding a node, i just used text to help the example. So err, still kinda stuck here.
|
|
|
|
|
Is there any way i can do this:
TreeNode folder = treeView1.SelectedNode.Nodes.Add(oNode);
folder.Nodes.Add(TreeNode);
It comes up with 'can't implicitly convert int into TreeNode'
It doesnt have this problem if i'm adding text as a node, only when i add an object as a node.
|
|
|
|
|
|
oNode is a TreeNode, so all is good, i can add it to the treeview, but i want to give it children <-- that sounds wierd
|
|
|
|
|
The Undefeated wrote: but i want to give it children
how about TreeNode.Nodes so if oNode is a TreeNode then:
oNode.Nodes.Add( anotherNode);
led mike
|
|
|
|
|
Hi,
I have to build a layer of serviced components over a DAL (data access layer). Now this DAL was written using interop in VC++.
I built my component using a snk - which worked fine till i added the code to access DAL. Now it gives me an error sayin that assemly cannot be created as DAL does not have a strong name.
How do I get rid of this problem? How can i reuse the existing component without having to rewrite it in .net environment?
I recently read an article sayin that i would have to generate a strong key for the interop dll using tlbimp... but i somehow am not able to figure the parameters out ... has anybody done this?
Any help will be appreciated!
|
|
|
|
|
Hi,
I'm developing a remote application, which means a windows application that controls an existing windows application by using the Win32 API (SendMessage, FindWindow, etc.). Problem is the following: The other application, which already runs and has to be controlled, has a button, that opens an OpenFileDialog, when being clicked. My remote application does so by sending the appropriate message to the other form. The OpenFileDialog is shown, but my remote application stops processing its code, it doesn't continue working (easy to see in debugger: code is executed till button click command is sent, then everything stops. If I manually cancel the OpenFileDialog, rest of the code is executed)! This is a situation that I want to avoid, I want the application to work on. Any ideas how to circumvent that?
Greetings
working in visual c# express 2005
developing usual windows application
|
|
|
|
|
Found the problem: I used SendMessage instead of SendNotifyMessage.
|
|
|
|
|
How do I write a "Hello World" string stored in a (*.txt) file to the Console output?
using System;
using System.IO;
//Is this the right idea??
//Please-- show me CODE not the "just use use a "-----" answer....
namespace StreamReaderWriter
{
///
/// Summary description for Class1.
///
class Class1
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
// TODO: Add code to start application here
//@"C:\Documents and Settings\Desktop\Text01";
string file_name = (@"C:\Documents and Settings\Desktop\Text01");
StreamReader fReader = File.OpenText(file_name);
StreamWriter fWriter =
File.CreateText(@"C:\Documents and Settings\Desktop\Text01");
//Now, how do I get the "Hello World" in the text file
to the console output??
}
}
}
thanks a lot for your help.....
|
|
|
|
|
Console.Writeline(fReader.readline());
I corrected this mistake in another post 2 down
-- modified at 11:49 Friday 18th August, 2006
|
|
|
|
|
...---... wrote: Please-- show me CODE not the "just use use a "-----" answer....
Have you tried reading the documentation for StreamReader?
From MSN Search[^]you can find the top two links will take you to the StreamReader Class documentation[^]. There you will find a table with lots of handy "How to..." links. One of which takes you to Reading Text From A File[^] which shows you step-by-step exactly what you are trying to do.
Does this help?
|
|
|
|
|
Sorry for my mistake, here is the correct line
Console.WriteLine(fReader.ReadLine());
|
|
|
|
|
...---... wrote: show me CODE not the "just use use a "-----" answer....
Are you really that lazy?
|
|
|
|
|
|
Process.Start("type filename"); :p
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|