|
This was marginally funny the first time you did it - now you're just trolling.
|
|
|
|
|
hello please lah wei...be practical?i just ask help or guide ok not to ask the whole things?i am in begineer stage of cuz need help..dun simply judge ppl lah...if ur are the professor be moderate okeh?if dun wan help just say cannot help...if not just guide me..thanks for urs reply coollzzzz
|
|
|
|
|
Hi,
I want to drop text to a textbox via drag'n'drop.
basic drag'n'dropping is no problem but I want to insert the text at a specific cursor position, that changes with the mouse cursor like selecting text in MS Word and moving it around an drop it between other text passages...
Is this generally possible and how?
greetings
|
|
|
|
|
I dunno for sure.. but you can try this.
Make a MouseDrag event on the textbox and in the event move the cursor to the position of the mouse.
When you release.. Fire the DragNDrop event.
I hope it helps
------------------------------------------------------------------
Life would have been much easier if I had the source-code!!
|
|
|
|
|
thank you I'll try this asap
|
|
|
|
|
if i have a List<> of controls. i can add those controls to a container
and use the .Parent property. but is there any way to find out which List<> ('s) the control belongs to?
i know i can do it the other way with .Contains on the list but then i would need a list of lists to enumerate.
Am i missing something obvious here?
If it' stuck, DO NOT pull harder!
|
|
|
|
|
Hi,
this is how I see it:
- a Control can be shown in some Container, and Parent will reflect that;
there is only one Parent, since the Control is in one Container at most.
- an object (Control or other) can be part of many collections at the same time;
so there is no property that points from that object to the collection(s) it is in.
- if you somehow make sure an object is in exactly one of several collections, you can
reflect that fact in several ways, here are two of them:
(a) create a Hashtable or Dictionary, use the object/Control as key, and the collection
it belongs to as value; doing so, a single Hashtable/Dictionary lookup will return the
collection
(b) a Control has a Tag property that is not used by Windows or the .NET Framework;
it has type Object and can be used for whatever purpose you see fit. So you could store
a reference to the collection in that Tag.
Three more comments:
1. in both cases you would have to provide code to keep things correct (insert/replace
the Hashtable/Dictionary entry when the Control is inserted into or mode among collections
2. when using the Tag property or the Hashtable you would need to cast the value
to a Control (or a more specialized type such as Label) when you retrieve it.
3. The proposed ways avoid the explicit search at the expence of extra data; this data
redundancy could result in an inconsistent state. If you don't like that, the solution is
to search the collections, as you were mentioning.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thanks for the reply.
this is just one of those "i wonder what the best way to solve X is" thaughts that just wont leave my brain ;}
i had a project a couple of weeks ago where i needed to have a reference to the "parent list" which i solved by overloading the controls and adding a ParentList property. but that never felt like "best practice". i needed the .Tag for other purposes
CP should have a Philosophy message type ;}
If it' stuck, DO NOT pull harder!
|
|
|
|
|
c0ax_lx wrote: CP should have a Philosophy message type ;}
Actually, this would fit quite nicely into the Design and Architecture section. It would certainly trigger a debate.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
probably! i just need to gather some courage. i'm scared of professional software architects ;}
If it' stuck, DO NOT pull harder!
|
|
|
|
|
Don't be. Most of the people who answer on that forum are professional developers rather than architects.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I want to attach a file to my c# project while clicking the browse button,using open file dialogue we can open the file but i want to save it in a particular folder in tha solution explorer
bobin
|
|
|
|
|
File.Copy(source,target) (System.IO namespace)
you'd have to extract the filename from source, and append it to the target path. then save the target path somewhere in your app.
If it' stuck, DO NOT pull harder!
|
|
|
|
|
hi,
As there is no provision for saving the address of the background image of a form or a picturebox when the image is loaded using a property grid i was suggested to override the propertygrid and to write a event for the same
so i have overriden the function now i dont know what type of overriding function must be written so as to store the image address if any one knows please let me know as i am strucked at this point
regards
sindhu tiwari
thank u codeproject.com
|
|
|
|
|
My MSDN knows about PropertyGrid.BackgroundImageChanged and Form.BackgroundImageChanged
and I don't use PictureBox, to me it has no value whatsoever.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Dear guru's,
I have 2 questions.
1.
How can I load a html-page from i-net into a windows-form - is there any control available?
2.
If I have loaded that html-page: How can I parse it? e.g. to get any data out of a table in this html-page.
thank you very much for your hints ! ! !
|
|
|
|
|
Use WebBrowser control to load a webpage and show it in a windows form
To parse the html page use HtmlDocument class and play around... u can load the htmldocument by using
HtmlDocument doc = WebBrowser1.Document;
Koushik
|
|
|
|
|
Thank you for your fast reply ! ! !
|
|
|
|
|
And if you didn't want to show a webpage to a user, but still get the html to parse, you can use HttpWebRequest.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
Thank you for your fast reply ! ! !
|
|
|
|
|
Hi to all,
I got a new question, managed to clean up the memory of an imagetool that was loaded at the client side as an activeX control.
I kept developping it and it now has basic selection (select, resize, crop etc.) as well as adding text, hue, contrast brightness etc.
There is though one thing missing and that would be a lasso tool or a free selection tool... I tried the codeproject, I tried google but no luck so thought I should ask the question in here
Anybody has an idea?
Thanks again
Cheers
its our widgets that make us men
|
|
|
|
|
That's a tool to select a freeform shape out of an image ? I've done that before, in C++. You can only create a bitmap that is square, you need to work out how to handle transparency in the unselected area of the square.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
One nice characteristic of Fortran (the language some people don't know the syntax of)
is it allows for spaces in identifiers. Unfortunately more modern languages don't...
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thanks to both for replying so quickly
Hmmm so if for example I try and find the maximum outer points of a selection
(btw any idea on how to draw such a selection? would ControlPaint allow a freehand selection? I'm using it to draw a square selection on the image but not sure it can handle a freehand one?)
then lets say I copy this square, keep the selection in mind and turn every pixel outside that selection to blank...
the problem would be how can I determine if the pixel is inside the selection?
What I did for the square selection is take the rectanle, find its coordinates in the picture and used the DrawImage with a source rectanle (knowing that the ControlPaint uses a rectanle to draw a reversible frame)
Lool sorry if I'm repeating myself a little through the post, try to imagine how I can find the pixel inside the selection... what is outside doesn't need to be transparent (lucky me the client doesn't want that)
its our widgets that make us men
|
|
|
|
|
Hi All,
How can i a new file (.exe) in new menu. means Right Click > New > MyFile will availbe with all other stuff.
Any idea ....
Thanks in advance !!!!
|
|
|
|