|
Thanks, wasn't think of it that way.
|
|
|
|
|
Hello.
Does someone have a simple sample for flood filling for a picture, or even better a sample of how to count the pixels instead.
What I want is to count the pixels with the same color that touch eachother. I saw some flood filling you could rewrite, but those are very complicated so a simple sample for that would also be great.
Hope you can help.
|
|
|
|
|
It's not complicated at all, just change the "colourPixel" or whatever they call it to "counter++" or something like that
|
|
|
|
|
I'm trying to create a window with a border like the Intelli-sense one has under Vista/7
Example image
It has a glass border, no title bar and it IS NOT re-sizable
I've been trying all day to emulate this border style, even by copying the style Spy++ says it uses to no avail. (I even tried modifying CreateParams to use the parameters the window does- no luck)
How can I implement this kind of Window?
|
|
|
|
|
|
Hey Guys,
I am performing restore and backup of databases in my application .Can anyone help me to implement a progress bar for this whole process ?
Thanks,
Vikas
vikas da
|
|
|
|
|
Hi,
CodeProject hosts a lot of articles on progress bars, some or good, some not.
Progress can only be reported to the user if the operation consists of multiple steps and you know (or can somehow estimate) the relative duration of each step.
If OTOH your backup basically consists of a single SQL (or other) statement, then it is impossible to report progress as there are only two states: nothing done (before the statement) and all done (after the statement).
|
|
|
|
|
No there are multiple steps i need to perform . Can you please provide me some links related to progress bar.
Thanks,
Vikas
vikas da
|
|
|
|
|
|
I draw line on windows form, using following function.
private void DrawLine(Point pPoint, Point pFisrtPoint)
{
Graphics graph = this.CreateGraphics();
Pen pen = new Pen(Color.Red);
graph.DrawLine(pen, pPoint, pFisrtPoint);
}
How can I get painted points coordinates?
|
|
|
|
|
hi,
that is bad code for several reasons:
- when no longer needing objects that you created and have a Dispose() method should be disposed, especially the expensive ones such as a Graphics;
- Pens.Red is for free;
- within a Paint handler, the Graphics is for free, see PaintEventArgs.
- you should not use CreateGraphics except as a last resort.
I suggest you read this[^].
BTW: the pixels modified by a DrawLine are on or near the line you paint, which exactly depends on some parameters, such as SmoothingMode I guess.
|
|
|
|
|
dataminers wrote: How can I get painted points coordinates?
What do you mean? you want to get coordinates of already pained point? (All points on screen are painted)
Or are you refering to?
pPoint.X
pPoint.Y
also Graph.TranslateTransform can affect your coordinate system
|
|
|
|
|
For example I write following code;
Point p1 = new Point(0, 0);
Point p2 = new Point(3, 0);
DrawLine(p1, p2);
I want to get painted Point;
"0,0", "0,1", "0,2", "0,3",
|
|
|
|
|
You'll need to implement you're own line drawing algorithm to return those points. There is nothing in the .NET Framework that will do it for you.
|
|
|
|
|
That's not strictly true - he could paint it onto a bitmap of the same size and examine the pixels.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
|
Hi:
I’m trying to create an application using C# which will be responsible to return me the numbers of windows workstation IP from LAN environment.
Can any one suggest me on that…
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
WMI should help. Check this[^] article.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Let me try with this... thanks once again ..
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
how do I use the default language in datetimepicker?
eg computer I set the default language is English! but is still datetimepicker french
|
|
|
|
|
No such thing.
Plus you should always use an ISO 8601 format, e.g. yyyy-MM-dd.
|
|
|
|
|
I Think that is connected to OS language. Since I am using XP with Slovenian language. And I useded DateTimePicker, I got in Slovenian names. You must be missing something. (XP have 3 difrent location settings in Regional settings) gonna tried at home, where I have Win7 english
|
|
|
|
|
Now i am home and i know what affects it.
Under Region And Language (Where you see date and time formats), you need to change Format to specific country
|
|
|
|
|
|
how to send data from computer to computer...i wanaa make lan messenger..pls help me..
|
|
|
|