|
SelectedItems returns selected items. SelectedIndices gets selected indexes
|
|
|
|
|
So I'm writing an app to help me take care of a wireless network.
There are multiple APs and multiple clients.
I want to create an app that will help me diagnose various user issues.
Right now, the problem I'm having is getting any wireless info from the user. So I want to add a little feature that will give me the following info from the wireless connection:
1. The MAC Address of the AP
2. The IP Address of the AP
3. The MAC Address of all network adapters (wired and wireless) on the client's machine
4. The IP Address of all network adapters (wired and wireless) on the client's machine
And for all the network connections, I would like to grab all the accessible data like the default gateway and DNS servers and if the address is DHCP or static, etc...
I think it should be fairly easy, no?
The problem that I have been experiencing is finding the info I need to get this done. Thus far, my searches have turned up nothing. And any help/pointers would be greatly appreciated.
|
|
|
|
|
I have string that i recieve and if it is over 1000 bytes i need to split it. I checked out the String.Split() but it only splits by a paticular string or char. i also tried going through a for loop and use the substring but i couldn't get it right. could someone please show me a good way of doing this?
Thanks in advance,
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Hi,
I think the best way will be spliting it on the basis of count, the way u have tried in a for loop. The other and better way will be trying to take LEFT most of size say "n" count, and get it split.
so, we want to split a string of 1000 char in 10 strings of size 100 char each.
First take left 100 char, the rest 900 char you can get using "Right". If u repeat this u can split it successfully.
Manoj
Never Give up
|
|
|
|
|
teejayem wrote: if it is over 1000 bytes
Did you mean over 1000 characters? In .NET, a character is 2 bytes, so you need to account for that when calculating the size.
That aside, what's wrong with
string str = "Your long string ...";
if (str.Length > 1000)
{
string firstPart = str.SubString(0, 1000);
string secondPart = str.SubString(1000, str.Length);
}
|
|
|
|
|
Check out String's Substring() method.
Cheers,
Vıkram.
Déjà moo - The feeling that you've seen this bull before.
Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
Hello My name is Guy .
I want to ask something maybe you can help me in C#.
I want to pass some Controllers & Buttons I build in Windows.Form , in to a method that can made them Enable & change there Background perhaps.
.
Any way what I Tryed all night is how to pass a Control / Button / Object to a method without ( Object Sender... , Event...) ,in to other function.
I want to take the Control object for example and send his name property trough string to a function and then to cast him into Object type or Basetype.
Something like :
this.TurnControlActive( UrlFile.Name ); // * UrlFile =// System.Windows.Forms.Control *//
and then pass in to ....
private void TurnControlActive( ....... )
{
// Here the Control / Object need to become Enabled //
}
Who to pass an Object / Control / Or how to retrieve a Control by his string name ..?
Thank a lot.
Guy D.
By the way how do I get all my controls in my form into Array ?
|
|
|
|
|
Form parent = Form1.ActiveForm;
foreach (Control c in parent.Controls)
{
c.Enabled = true;
c.BackColor = System.Drawing.Color.Blue;
c.Show();
}
I've try this eiter but it's give me only one control and I've got alot of Button and ComboBox in my Form .
Any suggestions ?
|
|
|
|
|
If the controls are contained in another control (e.g. a panel) then you must also iterate that control's Controls list:
foreach (Control c in parent.Controls)
{
DoControls(c);
}
void DoControls (Control c)
{
c.Enabled = true;
c.BackColor = Color.Blue;
c.Show()
if(c.Controls.Count > 0)
{
foreach( Control cc in c.Controls)
{
DoControls(cc);
}
}
}
|
|
|
|
|
Wow Rob it was brilliant;
Can I get your email ?
|
|
|
|
|
hi friends..
How to fire text changed event for combobox.
|
|
|
|
|
Have you tried changing the text in the ComboBox??
Seriously, why are you trying to fire this event? Why not just call it's method with a couple of faked parameters?
|
|
|
|
|
When i try to find a regular expression in a string, if the expression isn't in the string the program just gets stuck =\
how can i fix it?
example:
<br />
Match find = Regex.Match(downloadPageSource, @"(\w?\d?)+\.site\.com/access(\d+)\.jpg");<br />
if the expression isn't there the program just freezes =\
|
|
|
|
|
I have some images. I want to construct an avi file using these images. Is it possible to do it using C#.
Anyone please help me. I am badly in need of a quick solution.
Thanks in advance
Enamul Hoque
|
|
|
|
|
Hi All, i has a solution with many projects inside, on of the projects is windows application and the other is windows class lib.
i want from the windows application project create an object of the class lib. and from the class lib. call methods in the windows application, i add the class lib. project as ref. to the windows application to make the object but how to call methods in the windows application from the class lib.??
|
|
|
|
|
We can do this with the help of delegates.
Regards,
Arun Kumar.A
|
|
|
|
|
Try this:
<code>
class lib
{
public delegate void myDel();
public myDel objDel;
public void Execute()
{
if (objDel != null)
objDel();
}
}
From the Window Application:
lib objLib = new lib();
objLib.objDel = new lib.myDel(sample);
objLib.Execute();
</code>
<pre>
<div class="ForumSig">Regards,
Arun Kumar.A</div>
|
|
|
|
|
That's me ..
public partial class Form1 : Form
{
RegistryKey key;
public Form1()
{
InitializeComponent();
key = Registry.CurrentUser.OpenSubKey(@"HKEY_CURRENT_USER\Software\NanoSoft\Preferences",true);
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked)
{
key.SetValue("Assistant", "1", RegistryValueKind.String);
}
else
key.SetValue("Assistant", "0", RegistryValueKind.String);
Nothing happens
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Muammar© wrote: key = Registry.CurrentUser.OpenSubKey(@"HKEY_CURRENT_USER\Software\NanoSoft\Preferences",true);
Thats current_user twice.
|
|
|
|
|
As the subject says, I screwed up
Thanks Luc, I've been blind to see it for the previous half an hour
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Sorry, I wanted to vote 5 but accidentally I hit 4!
Thanks Luc!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi! Can anyone tell me how to set the Visual Studion 2005 to display all the windows auto-generated code like in Visual Studio 2003? In 2003 I can see all the codes of what has been created for me, and I can modify it to whatever I want. But in 2005 I can't see those codes. If anyone has done it before, please give me a hand. Thank you in advance for your time.
Best regard,
Jack
From Hell With Love
|
|
|
|
|
In VS2005, the auto generated code is in a seperate file, due to the existence of partial classes. It's called yourfile.designer.cs.
You can't change it back.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
That's very sad... After all I'll have to reinstall my VS 2003. Thanks for your help Mr. Graus.
Best regards,
Jack Toke
From Hell With Love
|
|
|
|
|
What on earth for ? Why is having the IDE hide it's autogenerated code in another file ( which you can open and read all you like ) a problem ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|