|
How do you read and write from the resource file?(Form1.resx in my case)
Thanks!
"To teach is to learn twice"
|
|
|
|
|
I wanted to try out using System.Management
but the compiler (I tried sharp-developer and Borland
c# builder) says that System.Management is undeclared.
What do I have to do, to make System.Management known?
Other namespaces, like System.IO, System.Net are available,
and I could compile and run programs using them.
I installed .NET 1.1 completely from the archive that
is about 100MB in size / os is Windows XP.
I found on the web, that XP should have WMI installed already.
Thanks !!
|
|
|
|
|
thank you, add reference did help!
|
|
|
|
|
hi, i overrided a method of the parent class. i want to invoke the overrided method in parent class. any keyword for this?
super? or what?
i am newbie in C#
thanks,
jim
|
|
|
|
|
|
well to call a base class as in java
Form1
super("My first form");
would be in c#
From1
base("my form"); // or whetever arguments are expected
if its a contructor
public Form1 () : base ("")
{}
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
if (!System.IO.Directory.Exists(FolderPath))
System.IO.Directory.CreateDirectory(FolderPath);
FolderPath is a string containing the full path of the folder in question, like @"C:\ThisFolder".
Hope that helps...
|
|
|
|
|
Who're you helping anyway???
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
hi,
are there any tools available that can able to view the method, property of a .net dll?
i don't know but i think it is quite simple tools that should available in VS.NET. i can't find it.
thanks,
jim
|
|
|
|
|
Reflector[^] is the best tool out there for doing this right now.
-Nick Parker
|
|
|
|
|
|
How can I capture all inbound and outbound traffic from a computer? I remember seeing a few projects such as MyDUMeter(http://www.codetools.com/useritems/MyDUMeter.asp), but I would like to block certain packets being sent or received on various ports.
Any help would be greatly appreciatedly thank you.
|
|
|
|
|
I must be going mental or something because I can't for the life of me get one form to center on top of another. It seems to me that this code should work, but it doesn't.
this.Top = (this.Owner.Height / 2) - this.Height;
this.Left = (this.Owner.Width / 2) + this.Width; but it never centers the form. What am I doing wrong here?
- monrobot13
|
|
|
|
|
Your formula is wrong... Try this:
this.Top = (this.Owner.Height - this.Height) / 2;
this.Left = (this.Owner.Width - this.Width) / 2;
|
|
|
|
|
actually you should set the Location property. the top and left are old vb'er ways
plus the form property has a center option property
|
|
|
|
|
Ista wrote:
actually you should set the Location property. the top and left are old vb'er ways
It's really irrelevant, a Location property is simple defined as a Point structure that sets the Top and Left properties of the form.
-Nick Parker
|
|
|
|
|
relavancy has nothing to do with it really.
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Ista wrote:
relavancy has nothing to do with it really
-Nick Parker
|
|
|
|
|
lol
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
A datagrid on a windiws form
I have a class called CSchedule
I created a System.Array to house a collection of CSchedules
when I set it as the data source it makes all columns available but I want to hise them.
Since its an array the TablesStyles collection shows a 0 count. How do I achieve this in the correct way?
nick
|
|
|
|
|
sorry I don't know the specific code off hand, but this might get you in the right direction...
grab the column object from the columns collection on the datagrid and set its Visible property to false...
that is how I do it in asp.net, but it shouldn't be all that different in win forms.
|
|
|
|
|
yeah the problem is since its tied to a class I cant get a tablestyles object
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
okay i want to bind a xml document to a listbox, i have this code:
string fn="TaxiQ.xml";<br />
DataSet ds=new DataSet();<br />
ds.ReadXml(fn);<br />
foreach (DataTable dt in ds.Tables)<br />
{<br />
<br />
<br />
lBox1_t.Items.Add(dt.TableName);<br />
}<br />
<br />
dataSet=ds;<br />
lBox1_t.SelectedIndex=0;<br />
fnSchema=fn;
but i need the information in each individual element of TaxiQ.xml it only gives me the table names , how would i get the contents of the elements
This is my xml doc:
?xml version="1.0" standalone="yes"?>
TaxiQ>
Taxi>
UserId>asfSFAas
Date>fdsafasdfdsa
/Taxi>
Taxi>
UserId>fds
Date>7/30/2003 3:18:59 PM
/Taxi>
/TaxiQ>
Thanks for the help!!
Da Intern
|
|
|
|
|
I haven't tested it but I believe this is what you need
<br />
foreach( DataRow row in ds.Tables[0].Rows )<br />
{<br />
lBox1_t.Items.Add(row["UserId"]);<br />
}<br />
|
|
|
|
|
it worked perfectly thanks alot
Da Intern
|
|
|
|