|
Is there a way to draw a rectangle on top of a loaded image that a user can drag to create a selection area? I can make a rectangle and have it follow the mouse movements, but i don't know how to redraw the underlying image to clear the dragging effect. The image in the picturebox is rather large (10000x10000 pix give or take).
Any help or pointers is much appreciated.
R.Myers
|
|
|
|
|
R.Myers wrote: can make a rectangle and have it follow the mouse movements, but i don't know how to redraw the underlying image to clear the dragging effect.
Do you use double buffering? First draw both the image and the rectangle to an offscreen surface and then present it on the screen.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
If you're drawing onto the actual Image in the picturebox (IE through Graphics.FromImage() ) then the actual image is going to be edited and you won't be able to "clear" it without loading the image again (expensive for a huge image like that!).
Instead what you should do is override the OnPaint event of the PictureBox and take its graphic region from the PaintEventArgs (PaintEventArgs.Graphics), and then do your drawing there.
|
|
|
|
|
Thanks PhilDanger & greeeg
I'll take a look into these ideas
R.Myers
|
|
|
|
|
I have a enum.I need to capture this enum in a string array. and also i need to check it with a string parameter that comes from with the function.
function is a boolean.if enum values which is in string array are matches with the string parameter then it will return true or else false.
public bool aaa(string bbb)
{
string []----->capture enum
now string [] will check with the string parameter.
if matches
{
return true;
}
}
|
|
|
|
|
Enum.GetNames(typeof(myEnum))
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
I answered you both times you asked this yesterday, why don't you go read them?!
|
|
|
|
|
does this code goes in public class or i have to create new class and how?
i want to know where to right a code for error handleing please some one give me a answer.
tahank you
-- modified at 13:21 Wednesday 11th July, 2007
|
|
|
|
|
Please either be more explicit in your requirements or read up on try, catch, finally.
If you don't know how to research then use the following link:
Google knows everything![^]
or browse the articles here on CP.
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
Hi,
On MSDN this property looks like:
public static string HashAlgorithmType { get; }
When I try to override it I get an error. My code:
public override string HashAlgorithmType
{
get { return m_HashAlgorithmType; }
}
Error:
Error 81 'My.Web.Security.MyMembershipProvider.HashAlgorithmType': no suitable method found to override
I don't know why I am getting this error. Please can someone advise?
Regards
ma se
|
|
|
|
|
do you see any difference between the following lines ?
public static string HashAlgorithmType
public override string HashAlgorithmType
|
|
|
|
|
Yes there is.
I see my mistake. I was using that property in my custom membership provider class, and there is no such property.
|
|
|
|
|
you should be able to override it statically: public static override string...
en watse naam is daai..?
|
|
|
|
|
Hi All,
I have a single table that contains the following Columns
As you can see i generated the data base on ASc on id's
Select * from Call_register order by id
Table Call_Register
id Call(in Hour) Seconds
76 00:04:23 263
76 00:05:58 358
76 00:06:38 398
77 00:06:22 382
77 00:01:29 89
77 00:10:28 628
77 00:01:18 78
78 00:03:35 215
79 00:07:26 446
I want to regroup them as follows : want to also keep track of number of time id occurs:Like
id occurance call(in Hour) totalSeconds
76 3 times 00:04:23 +00:05:58+00:0638(= 263+358+398=
77 4 times 382+89+628+78=1019seconds
Could you please help in getting me the script that enables me to generate in this format.
Please advice
Thanks
-- modified at 12:14 Wednesday 11th July, 2007
|
|
|
|
|
Please use the SQL forum:
Here[^]
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
Ok im building an application in C# to modify add items to an xml file which is imported into flash , Im completly new to XML in C# but i know what im doing in flash so ill just say what i need to happen .
here is my xml
{?xml version="1.0" encoding="utf-8" ?}
{EventList}
{Events sourceurl="http://blah.net"}
{item type="Alert"}
{Time}1{/Time}
{Type}2{/Type}
{Name}3{/Name}
{Description}4{/Description}
{/item}
{/Events}
{/EventList}
Now all i need o the application side is to add items ie {item ... {/item} thats it im not talking about generating the xml above and saving it im talking about making a new {item type="Alert"} ... {/item} and adding that abovethe old one and saving it .
Can anyone tell me how to do this ? Thanks
(yeah i know my xml looks funny just replace the brackets with notepad they dont show up)
|
|
|
|
|
This can be accomplished using XmlDocument s and XPath . This[^] article and demo project demonstrate it nicely.
|
|
|
|
|
thanks i tried the demo works perfectly
|
|
|
|
|
how do we arrange them in ascending order..
|
|
|
|
|
Do you want to arrange arrays in ascending order? Or do you want to arrange the items in an array in ascending order?
Try to work some on the clarity of your question.
---
single minded; short sighted; long gone;
|
|
|
|
|
sinji_solanki wrote: how do we arrange them in ascending order..
By using a sort algorithm.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
If you want to place a threat for every question of your homework.
Don't go on!
Place them in one question, so we only need to downvote this rude behaviour once!
All the best,
Martin
|
|
|
|
|
The technical term for that is: sorting.
You may want to read up on the Array class, maybe it has some kind of sort method...
|
|
|
|
|
I think you have to populate them in ascending order
|
|
|
|
|