|
Hello,
I am trying to do an image editing app.
It requires opening and displaying an image and then selecting a portion of the image for crop. I also want to rotate the image.
(1)How will I implement "area selection" [click and drag to mark an area] for an image ?
(2)Which will be the best control to display the image, for edit operations?
Thanks,
Tweety
It's easy to sit there and say you'd like to have more money. And I guess that's what I like about it. It's easy. Just sitting there, rocking back and forth, wanting that money.
|
|
|
|
|
Tweety wrote:
How will I implement "area selection" [click and drag to mark an area] for an image ?
Draw the image, store the co-ordinates you've dragged, and draw them onto the window ( not onto the image ), so they are lost with every refresh and do not affect the image.
Tweety wrote:
Which will be the best control to display the image, for edit operations?
Just whack it right onto your window.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Thanks CG for the help.
Christian Graus wrote:
Just whack it right onto your window.
Isn't there any image control that will scroll and show the original image ?
Tweety.
It's easy to sit there and say you'd like to have more money. And I guess that's what I like about it. It's easy. Just sitting there, rocking back and forth, wanting that money.
|
|
|
|
|
Does anyone know of a sscanf (Old C-runtime function) equivalent in C#?
Regards,
Roy
_____________
Roy H. Berger
roybrew@att.net
|
|
|
|
|
Use the System.Convert class. There's a bunch of stuff in there that will let you convert from one data type to another.
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
roybrew wrote:
Does anyone know of a sscanf (Old C-runtime function) equivalent in C#?
As David said you can use the Convert class however sscanf provided more of a parsing technique than what you will probably find with Convert . You may wish to look into the RegEx (regular expressions) class as that's where the power will come from (;P). Here is a quick article to read up on if you are new to regular expressions.
C# Regular Expressions [^]
Nick Parker
|
|
|
|
|
Nick Parker wrote:
sscanf provided more of a parsing technique than what you will probably find with Convert
Forgive me for not brushing up on my C libraries.;P
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
I'll look at RegEx. The parsing is what I am looking for. I've looked at Convert. Maybe a combination of both ?? Basically, I'm parsing comma delimited data (text, numeric, date, etc.).
Thanks for the suggestions.
Regards,
Roy
_____________
Roy H. Berger
roybrew@att.net
|
|
|
|
|
try the Split method on string to break it up into little strings
Stupidity dies.
The end of future offspring.
Evolution wins.
- A Darwin Awards Haiku
|
|
|
|
|
Does anybody know how to do "NET SEND" using C#?
|
|
|
|
|
[DllImport("Netapi32.dll", CharSet=CharSet.Auto)]<br />
private static extern int NetMessageBufferSend(string servername,string<br />
msgname,string fromname,string buf,int buflen);<br />
<br />
string msg = "My text";<br />
NetMessageBufferSend(null,"remotePC",null,msg,msg.Length*2+2);
Hope this helps !
Tomtom
|
|
|
|
|
Hello,
I wrote a program who is not UI dependent. I have all my program logic in a class and I raise some events for any potential frontend.
I can then create a console application or a Windows form application using the same program logic.
The frontend just run a thread using the run() function of my main class (UI independent) which do all the job.
This main class also creates internally several threads performing various tasks in parallel. Since all this threads are just pure computation I have no problems.
But I recently wanted to create forms in some of these internal threads running in parallel and I have been unsuccessful for far
What happens is that forms get created but are not responsive at all and the internal threads get stuck. How can I create these forms and make them run independently in each thread ?
Here is schema:
Frontend (Console or Form, main thread)
|
|
Main class (running in a thread)
| | | | |
| | | | |
Child threads (computation)
x x x x x <-- child threads can not work with forms
x x x x x <-- how to call functions in those forms ?
Child threads forms
Any idea ?
R. LOPES
Just programmer.
|
|
|
|
|
|
Hello,
I understood I have to use invoke from threads to call methods in controls.
But what about creating forms from threads ?
Thanks,
R. LOPES
Just programmer.
|
|
|
|
|
|
Hi,
My goal is to have several forms running independently. Each form has its own thread doing a specific computation.
One example could be to have several forms embedding the webbrowser control and automatically crawling a different website. All will run in parrallel.
Any idea ?
R. LOPES
Just programmer.
|
|
|
|
|
|
Hello,
I would like to know if it is possible to use the webbrowser control just to navigate a webpage and then traverse its DOM, without creating a form and even in a console application ?
Thanks,
R. LOPES
Just programmer.
|
|
|
|
|
Lookup a sample called WalkAll in MSDN.
|
|
|
|
|
Hello Stephane,
Ok but WalkAll uses only the MSHTML component. I'm trying to use the WebBrowser control because it adds a lot of navigation stuff I would like not to take care of.
Thanks,
R. LOPES
Just programmer.
|
|
|
|
|
UI --> iexplore.exe | web ocx
no UI --> walkall
Both have the DOM and the IWebBrowser interface (shdocvw) to play with.
|
|
|
|
|
Hello,
Ok then. So what is the DLL I'm supposed to use ?
Shdoccvw or mshtml ? Or both ?
And what happens without any UI when a NewWindow event is trigerred ?
Thanks,
R. LOPES
Just programmer.
|
|
|
|