|
|
hi,
does anybody know how to edit users or insert a new user to the active directory using the LDAP connection string.
Thanks in advance
jamil abou khalil
|
|
|
|
|
The place to start would be looking at the System.DirectoryServices namespace. Possibly the DirectoryEntry class would be of help to you.
only two letters away from being an asset
|
|
|
|
|
How i can rename File form code ?
|
|
|
|
|
FileInfo.MoveTo should do the trick
|
|
|
|
|
How i can rename File from code ?
|
|
|
|
|
System.IO.File.Move("c:\\source.txt", "c:\\destination.txt");
- - - --[ i love it when a plan comes together ]-- - - -
|
|
|
|
|
Hi ,
I need to redirect the contents of the command to a file. I tried doing this using follwing peice of code but it doesnt seem to be working.
System.Diagnostics.Process QueryProcess = new System.Diagnostics.Process();
String command = @"ipconfig/all";
QueryProcess.StartInfo.FileName = command;
QueryProcess.StartInfo.Arguments = " >c:\\a.txt";
QueryProcess.Start();
QueryProcess.Close();
Kindly look into the problemand tell me the solution ASAP.
Thanks and Regards,
Sankalp Verma
Sankalp Verma
|
|
|
|
|
You could always stream the StandardOutput to a file - See the docs on MDSN for the System.Diagnostics.Process class
|
|
|
|
|
|
Hi,
I was wondering if there is a way to get all data from the serialport before processing it.
I got an event handler for the serialport and this is how i receive the data:
string buffer += serialport.ReadExisting();
These are my delegate and event to read the data:
public delegate void GetData(string getDataFromBuffer);
public event GetData getTheData;
After that this event handler is fired:
if (this.getTheData != null)
this.getTheData(buffer);
All data i get will be appended to a richtextbox. Problem is, it keeps appending even the data already exists.
It kinda looks like this:
123.
123.455
123.455.5677
But i want to append it all at once.
Any suggestions how to fix this?
Thanks in advance!
|
|
|
|
|
Hi,
If you only want to keep the latest text only, then dont concatenate the original text with the new one.
I think you might be doing something like this -
RichTextBox1.Text = RichTextBox1.Text + this.getTheData(buffer);
Change it to
RichTextBox1.Text = this.getTheData(buffer);
Hope i got what you want, but i am not sure about it.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Hi,
I got it exactly like how you suggest it to do.
But the buffer still has its data from the previous serialPort.ReadExisting(); execution.
|
|
|
|
|
serialport.DiscardInBuffer();
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
hi..
How i can select single item in a CheckListBox...
I want to eneble it or disble it or i want to check it or uncheck it...
Thanks in adavance,
Vinay
|
|
|
|
|
And the Enabled and Checked properties aren't working for some reason? We need more information.
"Quality Software since 1983!" http://www.smoothjazzy.com/ - see the "Programming" section for (freeware) JazzySiteMaps, a simple application to generate .Net and Google-style sitemaps!
|
|
|
|
|
chkListBox.SelectedIndex = index;
chkListBox.SetItemCheckState(index, CheckState. ...);
|
|
|
|
|
Dear All,
I am developing a desktop application in C#. My client right now is using
Excel to create their data sheet. In excel we can use drag and drop functionlity
(Entering data in one row and pasting it by dragging to multiple rows). I want
to implement same functionality in DataGridView. Any clue to do this.
Any help will be appreciated.
Regards,
Lalit Ahuja
|
|
|
|
|
hi
it is my Code :
DataTable dt = new DataTable();foreach (DataGridViewRow _gridViewRow in dataGridView1.Rows)
{
if (_gridViewRow.Cells[0].Value != null && _gridViewRow.Cells[0].Value.ToString() == "True")
dt.ImportRow(ds_zamin1.Khaneh_1.Rows[_gridViewRow.Index]);
}
this.dataGridView1.DataSource = dt; // dt is global viriable
but when i execute this method,nothing occured,only myDatagridView show some blank row(s).
how to solve problem ?
|
|
|
|
|
Someone recently asked exactly the same question... I think on the next page...
Read the forum and search for your item before posting a new question...
- - - --[ i love it when a plan comes together ]-- - - -
|
|
|
|
|
Hi,
I need to pass additional info about created component from Addin to form designer. I have written custom service MyService which implements IMyService interface. I add this service by AddService method of active window's DesignerHost object. When i try to retrive it from form's desigher class,
IMyService ms = (IMyService)GetService(typeof(IMyService))) ,
it makes an error like "Cannot cast objet of type MyService to IMyService"
Thanks for help
|
|
|
|
|
hi,
in my application i have a listview with populated data. when i select a row i get my results but as soon as i want to select any other row i get the following error:
InvalidArgument=Value of '0' is not valid for 'index'.
Parameter name: index
here is my code:
<br />
private void listviewAcc_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
_DataValues.AccountName = listviewAcc.SelectedItems[0].Text.ToString();<br />
}<br />
no matter what i change the index to it will give me the same error. this only works the first time i selected a record but as soon as i make a second selection i get this error
pls help
thanks
regards
|
|
|
|
|
I had this problem too. When I debugged it, I noticed that it was calling my event handler twice if I changed from one selected item to another, but only once if I had nothing selected and I clicked one. This makes sense because when the selection changes from one item to another, it has to deselect the current item, which fires the 'Changed' event, and then it selects the new item, firing the event again.
The first time the event gets called, there is no selection (SelectedItems has a size of 0), so you will get an InvalidArgument or possibly the "Object reference not set to an instance of an object" error. All you need to do is add a check to see if any items are selected. You can do that by examining the Count property of SelectedItems.
"Quality Software since 1983!" http://www.smoothjazzy.com/ - see the "Programming" section for (freeware) JazzySiteMaps, a simple application to generate .Net and Google-style sitemaps!
|
|
|
|
|
Hello,
I'd like to run an application in a remote computer, but without client/server structure, for example using the class Process in the remote computer.
Thanks
|
|
|
|
|
You and every virus writer on the planet.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|