|
Take a look at the Process.StandardOutput property.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Do anybody knows how to display a parent-child relation in a winforms datagrid from a collectionbase-based custom object datasource.
the custom object looks like this:
public class ColeccionOT : System.Collections.CollectionBase
{
public ColeccionOT(){
}
public void Add(OT ot){
List.Add(ot);
}
public void Remove(OT ot){
List.Remove(ot);
}
public OT this[int index]{
get{return (OT)List[index];}
}
public object[] Items{
get{return InnerList.ToArray();}
}
}
--------
public class OT
{
private long _id;
private Proyecto _proyecto;
private System.DateTime _fechainicio;
private System.DateTime _fechafin;
private AdministradorOTBase _adminOT;
private ColeccionActividades _clcnActiv;
public OT() {
_clcnActiv = new ColeccionActividades();
}
public OT(AdministradorOTBase usuario, Proyecto proy) {
_clcnActiv = new ColeccionActividades();
adminOT = usuario;
proyecto = proy;
}
public ColeccionActividades Actividades {
get{return _clcnActiv;}
set{_clcnActiv = value;}
}
public long id{
get{return _id;}
set{_id = value;}
}
public Proyecto proyecto{
get{return _proyecto;}
set{_proyecto = value;}
}
}
parent object: ColeccionOT
child object: <<property>>OT.Actividades (another CollectioBase-Base object)
Thanks in advance.
PD. Sorry my bad english (I'm from germany)
|
|
|
|
|
Hello Guys:
how i can make color to active line in richtextBox ?
==============================================
see this image and u will know what i need
http://www.4zz.net/up/uploads/d69700664b.gif
==============================================
.:::thanks in Advance::.
|
|
|
|
|
RichTextBox richTextBox1 = new RichTextBox();
richTextBox1.BackColor = Color.Yellow;
richTextBox1.SelectionStart = 0;(starting point of text selected )
richTextBox1.SelectionLength = 4;( the number of characters selected )
richTextBox1.SelectionFont.Bold = true;
richTextBox1.SelectionStart = 9;(starting point of text selected )
richTextBox1.SelectionLength = 5;( the number of characters selected )
richTextBox1.SelectionFont.Bold = true;
|
|
|
|
|
hi,
richTextBox1.BackColor = Color.Yellow;
will make the entire richtextbox backcolor to yellow.
Instead of making perticular line or active cursor position.
with regards
prasad
|
|
|
|
|
Not work , i want make color to one line in richtextbox1(active line)
as this
http://www.4zz.net/up/uploads/d69700664b.gif[^]
i have idea but not work with me
1)test the cursor position
2)for the line where cursror is active make color to it
plz help me to do it
|
|
|
|
|
I have a byte array that contains all kinds of info.
Like
Bits Purpose
7-4 Color
...
15-9 Length
...
If this was my class
<br />
class BasePacket{<br />
private byte[] data;
....<br />
....<br />
}<br />
I like to be able do
<br />
<br />
BasePacket x = .....;<br />
x.color = 5;<br />
x.length = 3;<br />
int y = x.color;<br />
...<br />
...<br />
I know how to write this with &,|,<<, sets and gets but
I was wondering if there was a slicker solution.
I'd like to define each property on one line.
//Available bits
color , 4 , 4
length, 9, 7
<property name=""> , <bits start=""> , <bit length="">
Is this possible? I just looking for ideas not necessarily actual code.
Thanks for this great forum and its members.
|
|
|
|
|
I think BitVector32 [^] structure is along your way.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
string lowerCaseString = "converting case";
string upperCaseString = lowerCaseString.ToUpper();
string newLowerCaseString = upperCaseString.ToLower();
|
|
|
|
|
Hello Edmundisme,
Thanx mate. You have been a great help.
Hope you have a great day.
Khoramdin
|
|
|
|
|
Please don't remove the original post. It messes up the forum.
---
single minded; short sighted; long gone;
|
|
|
|
|
|
Weird. I'm not sure what happened there. My subject line indicates that I replied to the correct post (which I can't even find now)...
|
|
|
|
|
let's say i have an image that says "Hey" on it, how can i recognize it? i looked through some articles but haven't found anything useful.
|
|
|
|
|
|
The key word here is OCR (optical character recognition).
Try searching for it and you should come up with some ideas on how to start...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I am writing an app in this app it runs the same process over and over. but I want to wait in between it running the process. what i have is. I can not get this to wait for osql.exe to quit. if i run it like this it sends an out of bounds error. how can i easily make it wait for osql.exe to quit before it starts the next instance???? BTW i need to put that i did not start this process in the program it is being started by a script. the script does not show up as a process.
if(checkbox1 == true)
{
//it will run this process in this case it is osql.exe
}
Process p = Process.GetProcessByName("osql.exe")[0];
p.waitForExit();
if(checkbox2 == true)
{
//it runs osql.exe again but with different parameters
}
|
|
|
|
|
If get process by name returns an array you should check for null and the length of the array before assuming that an element exists. I call them row zero assumptions and lately they have become the bane of my existence.
File Not Found
|
|
|
|
|
i dont want it to go into an array though it was just the only thing i can find
i want to assign the process and wait for it to close then complete the rest of the program. I would think it would be easy enough but i cant find out how to do it.
if osql.exe is running wait for it to stop before continuing. thats all i want to do.
|
|
|
|
|
Hello,
The proplem is that you have to set the Process property "EnableRaisingEvents" to true, if you whant to use "waitforExit". It's somewhere written in the documentation on msdn.
You really should make a checkup on the length of the process array to prevent Exceptions.
All the best,
Martin
|
|
|
|
|
how do i use EnableRaisingEvents if I didnt start the process?
|
|
|
|
|
Hello,
Process[] processes = Process.GetProcessByName("osql.exe");
if(processes.Length>0)
{
processes[0].EnableRaisingEvents = true;
processes[0].WaitForExit();
}
foreach(Process p in processes)
{
p.Dispose();
}
All the best,
Martin
|
|
|
|
|
I'm trying to measure TimeSpans < 15ms on Windows XP. I recall hearing somewhere that windows won't return anything accurate under 15ms. Is that correct? Is there a way to measure down to the ms level?
Thx
|
|
|
|
|
|
Hi, may I suggest you read my timer article ?
|
|
|
|