|
Yeah, but you'r is FAR more complicated. You will have to take that color and search around it looking for pixels of the same, or similar color. Then you'll have to feed the coordinate for all those pixels into some form of a curve fitting algorithm. This, you'll probably find in some univerisity research paper somewhere. Don't ask for a code sample, 'cause I don't have one. Let your fingers do the walking through Google...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi!
AFAIK you'd have to create a screenshot of the form (there are articles here on CP dealing with this). Then you can use GetPixel() for the resulting bitmap.
Regards,
mav
|
|
|
|
|
Why dont you add pencolor property while drawing line and retrieve it as and when required!!
Hope it helps.
MaulikCE
|
|
|
|
|
I'm not quite sure what you mean. I know the color i'm looking for.
What I I don't know is, how do i get the color of a pixel on the screen under the cursor.
Or on another way: how do i get the color of any pixel on the screen?
I know, I could use the API. Is there a way to do it from C#?
Thanks,
A
|
|
|
|
|
I am trying to serialize a simple class over the network.
I found the following error at receiver side.
Additional information: Cannot find the assembly BinaryDataSender, Version=1.0.1934.14107, Culture=neutral, PublicKeyToken=null.
What might be the problem? for this also I tried a lot to find the information regarding this, but in vain.
MOhammed Aijaz MOhiuddin.
|
|
|
|
|
what formatter do you use? SOAP, XML, Binary?
how do you serialize and deserialize your instance?
|
|
|
|
|
Dear all,
I tried to include the above namespace in my new project of Visual C#. I could not do so. Later I tried on two other systems, the same problem.
Then I opened a previous project of me, I find that System.Runtime.Serialization.Formatters.Soap namespace is there. Then I tried to include the same namespace by a dummy statement in previous project, I find that I can include the same namespace.
What might be the reason ?, I have wasted lot of time and then consult this Message Boards.
Thank you
|
|
|
|
|
You can't do a using statement successfully until the library is included in the list of references at the top of your project in the Solution Explorer. You can't use it until it's part of your project.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanks for that Mr. Christian.
|
|
|
|
|
Using a Windows Form I have a RichTextBox at the bottom of the form. The form is scrollable. I'm loading a rtf file into the richtextbox. I wan't to be able to have the richtextbox resize itself to fit the contents of the rtf file that was loaded. The rtf document does have some images in it.
Can anyone help me out?
|
|
|
|
|
ok lets see first u must set the the dock property to top then in the paint event do somethink like this
private void RichTextBox1_paint(object sender, PaintEventArgs e)
{
int lines;
int chars;
RichTextBox rchtxb = (RichTextBox) sender;
StringFormat myformat = new StringFormat();
myformat.FormatFlags = StringFormatFlags.DisplayFormatControl;
SizeF layout = new SizeF(this.Width,this.Height);
int newheight = 6 + Convert.ToInt16(e.Graphics.MeasureString(rchtxb.Text,rchtxb.Font,layout,myformat,out chars,out lines).Height);
rchtxb.Height = newheight;
this.heigth = newheigth
}
yo listen if u wantso u can do this in a simple void just like thus
void autoresize(object sender, painteventargs e)
and then ind ther pain event of anny richtextxbox call it;
i hope this help if need any thing else tell me by email alexcuban@inder.co.cu
|
|
|
|
|
Sorry didn't help. The richtextbox is at the bottom of the form so it can't be docked to the top. Couldn't get the code to work. Where exactly do i put the code? And how do i call it?
Thought it would be easy enough to do, oh well..
Where is says:
this.richTextBox2.Size = new System.Drawing.Size(760, 200);
can this line not be changed to call a function that autoresizes the richtextbox??
|
|
|
|
|
How to copy file from a directory to another
Thanks in advance
|
|
|
|
|
see this[^]
<italic>Work hard, Work effectively and a bit of luck is the key to success.
|
|
|
|
|
I have a Sys Tray Application with a NotifyIcon,
But I have a big problem that I have been trying to solve for days now.
If I want the Application to show a window, but if I want to do it from another thread . How do I do that then ?
I know that if I have a normal Window Application I can solve this by using invoke, etc.
But ApplicationContext have no such methods, like invoke.
What do I do ? How can I make my own Synchronizer, that can help me call a method on the Application main gui Thread ?
Can i make somekind of workaround, with a mainform that is not shown at all?
Best regards, Anders Both - Denmark.
|
|
|
|
|
Hi every one , this is my first entering to this forum.
I hope we will help ourselves to be professional in C#
C# interested
|
|
|
|
|
I don't understand what the point of interfaces are? Can you explain it to me?
/\ |_ E X E GG
|
|
|
|
|
|
what is that eggie5 on??????
Cheers
|
|
|
|
|
I need to show a loading message or retrieving data message while im accessing to any webservice for data
|
|
|
|
|
Create it in another thread it will do that jop
|
|
|
|
|
Hi experts,
I am trying to display data in a datagrid from a xml file. I have no problem reading the xml file, however when i try to display the data in a datagrid all i get is "null" values. I have bound my dataset to the datasource property but still dont know where im going wrong
can anyone point me in the right direction???
Cheers
|
|
|
|
|
A simple example:
DataSet ds = new DataSet();<br />
ds.ReadXml("99999.xml");<br />
<br />
this.dataGrid1.DataSource = ds.Tables[0].DefaultView;<br />
<br />
CurrencyManager cm = (CurrencyManager)this.BindingContext[this.dataGrid1.DataSource, this.dataGrid1.DataMember]; <br />
((DataView)cm.List).AllowNew = false;<br />
<br />
this.dataGrid1.CaptionText = "Total Tasks: " + dataGrid1.BindingContext[dataGrid1.DataSource, dataGrid1.DataMember].Count.ToString();
Hope this helps
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
I want to get the value(the X and Y value)of a curve from a .jpg file?
get the value of the curve from a .jpg file.
could anyone give me a sample about it?
my E-mail: dxhdxh2k@hotmail.coom
Thanks
|
|
|
|
|
How many times are you going to ask this question ? I've answered it several times, you obviously just want someone to write code for you. I suggest going to rentacoder if you want some cheap code to do this. It might even work.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|