|
That would look something like this
System.Diagnostics.Process procIe = System.Diagnostics.Process.GetProcessesByName("iexplorer");<br />
procIe.Kill();
I suggest using the System.Diagnostics namespace in stead of typing them all over the place, and maybe the process name does not match IE, but I think i'm pretty close
Cheers, have a good weekend!
- - - --[ i love it when a plan comes together ]-- - - -
|
|
|
|
|
Hi,
I need help about how to know the logged in user on another machine on the network.
Thanks
|
|
|
|
|
hi,
I think you have to query the active directory to get the logged in user.
try searching on the active directory.
best regards,
note: I am lebanese too
jamil abou khalil
|
|
|
|
|
|
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
|
|
|
|