|
|
|
Mika Wendelius wrote: Perhaps you could use Process.GetProcessesByName method[^].
Thanx Mika!!
GetProcessesByName was EXACTLY what I needed
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
You're welcome
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi Muammar©,
When the first process creates the second process, it could obtain the new Process ID and return that
as its exit status, so you can use it in a batch file or any other process.
|
|
|
|
|
Hey Luc,
Luc Pattyn wrote: When the first process creates the second process, it could obtain the new Process ID and return that
as its exit status, so you can use it in a batch file or any other process.
Hmmm.. And how do you do that??
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi Muammar©,
some C# code:
Process p=Process.Start(...);
int id=p.Id;
Environment.ExitCode=id;
Application.Exit();
and some batch code:
C:\process.exe
set PID=%ErrorLevel%
|
|
|
|
|
Thanx Luc! I did it, I just needed to use the GetProcessByName
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hello,
i am new in this forum and it seems to, that here are a lot of very wellknown people, who maybe could help me.
I would like to program a ActiveX-Control in C# to visualize the data of an acceleration sensor, which works with x- and y-axis. The program, which provides the sensor data, has the possibility to include ActiveX-Controls. There´s also a Solution file, which can be used.
My problem is, i can program in C or C++, but i have never programmed in C# or .NET. Could somebody help me or has an idea, where i can get syntax or algorithm, to understand, how c# works? I use Visual Studio 2005 ! Thank you very much...
|
|
|
|
|
enginesan wrote: My problem is, i can program in C or C++, but i have never programmed in C# or .NET
That should not be hard since C# is quite similar to C/C++ in terms of most of the syntax.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi Paul,
first, thanks for answering!
That´s right. The syntax is quite similar. But my knowledge in programing OOP is very small. So i have no idea,
how to start. It would be perfect, when i could send the solution file to somebody here and he/she could give me
a description with some examples which i could study.
|
|
|
|
|
Google search on introduction to oop in c#[^] turns up quite a bit of what looks like good results to check out.
Sending a solution file may not be the best idea.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Just the other day I reread an earlier (1996) C++ programming book. I was quite shocked to see how similar C# is to C++. If you are familiar with C++ you shouldn't have any troubles. Work through a few simpler program ideas to get the jist of the syntax and the .net classes then break your goal application down into seperate sections and code away! If you can do C++ then C# will be no problem - a pretty shallow learning curve.
If you have any issues with particular parts of your code, feel free to post back explaining what you've tried and the issues you're facing and you'll find many people glad to help
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Environment: Visual Studio 2005 with .Net 2.0
OS: Windows XP
I have a round shape image file that I want to associate with my button control on a WinForm application. How do I make the button appear as a round shape image at run-time?
|
|
|
|
|
Look at the Region property of the button.
There are also articles on CP regarding this. Search for non-rectangular form.
|
|
|
|
|
Hello,
I'm adding a custom action to my deployment project I want to know how to get the application folder in the target machine to associate an icon to my project files.
How can I get the path of the application on the target machine?
Thanks.
Dad
|
|
|
|
|
Hi hadad ...
Environment.CurrentDirectory
....
if(Human.live)
{
Human.peaceful = false;
while(true)
{
Human.love(Human girl, Human Boy);
}
}
|
|
|
|
|
hi guys!! here is the thing: i want to change the visual setting of my win app. i don't mean by changing the fonts or by doing bold the letters. i mean different visual object. is there any plug in that it could help?
thanks you in advance!!
P.S.: sorry for my English :P
|
|
|
|
|
dianikol wrote: different visual object
More explaination equired I'm afraid. A form is a form is a form. You set the properties and it's displayed using those. What more do you want to see?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
for example i have two buttons next and previous, i want them round shape and not square shape.i think that studio doesn't has options like these.
|
|
|
|
|
It has nothing to do with Visual Studio. You just have to find and use the control set you want. Microsoft doesn't provide any themselves. THere are strictly third party, or, if you're confident enough, you can make your own.
You could also rewrite the UI of your app and use WPF to do this. There, you've got a multitude more options for creating your own controls.
|
|
|
|
|
The controls that are presented within the Visual Studio IDE are the general ones that are part of the .net framework. Most (if not all) controls can be drawn however you want, but if you don't want the default - you'll need to draw it yourself or create your own control from scratch (or download/buy one that someone else has already done).
Round buttons, aren't very difficult to do. Google, and you'll find some ready made solutions.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
hi,
look at following code:
Hashtable objHash = new Hashtable();
ArrayList objList = new ArrayList();
foreach (DataRowView obj in listBox1.Items)
{
objHash = new Hashtable();
objHash.Add("FirstName",obj[1]);
objHash.Add("EmployeeID", obj[0]);
objList.Add(obj[0]);
}
comboBox1.DisplayMember = "FirstName";
comboBox1.ValueMember = "EmployeeID";
comboBox1.DataSource = objList;
-------
objList has 10 items ,although combobox filled with 10 items but display these items as "[Collection]"...........then how can get the display member from these "[Collection]"
|
|
|
|
|
Try this :
Hashtable objHash = new Hashtable();
ArrayList objList = new ArrayList();
foreach (var obj in listBox1.Items)
{
objHash = new Hashtable();
objHash.Add("FirstName", obj);
objHash.Add("EmployeeID", obj);
objList.Add(obj);
}
comboBox1.DisplayMember = "FirstName";
comboBox1.ValueMember = "EmployeeID";
comboBox1.DataSource = objList;
|
|
|
|
|
Hi all,
I have been trying to change the backcolor of specific rows depending on a condition,but when the condition is met the entire grid color changes.
I already tried this and many more like this but none of them work,
DataGridViewCellStyle style2 = new dataGridViewCellStyle()
style2.BackColor = Color.Red;
dataGridView1.RowsDefaultCellStyle.BackColor = Color.Red;
There is something which I am doing wrong. Please help me to fix this.
|
|
|
|