|
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 !!!!
|
|
|
|
|
|
Thanks man !!!
|
|
|
|
|
I've been writing a client / server app for a while now, and in the original version I had a load of exception handling. Recently I've come to rewrite this and I think it's time for me to learn some lessons on what exactly I'm doing. The first part I need to solve is my client connection to a remote Unix server.
_connectionSocket.LocalSocket =<br />
<br />
new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp );<br />
<br />
_connectionSocket.TimeStamp = DateTime.Now;<br />
<br />
IPEndPoint remoteEndPoint = new IPEndPoint( Dns.GetHostEntry( remoteIp ).AddressList[ 0 ], remotePort );<br />
<br />
_connectionSocket.LocalSocket.Connect( remoteEndPoint );<br />
<br />
_connectionSocket.LocalSocket.BeginReceive( _connectionSocket.DataBuffer, 0, SocketPacket.BufferSize,<br />
<br />
SocketFlags.None, OnDataReceived, _connectionSocket );
_connectionSocket is SocketPacket object containing my socket, the buffer etc. I'm following what I've seen done in other comms code. When I disconnect;
if( _connectionSocket.LocalSocket != null)<br />
<br />
{<br />
<br />
_connectionSocket.LocalSocket.Shutdown( SocketShutdown.Both );<br />
<br />
_connectionSocket.LocalSocket.Close( 5 );<br />
<br />
}
I'm having issues in that when I'm trying to shutdown, my code is hanging (I know that 5 means seconds to wait to complete sending messages and I don't think that's it). And then I can't establish a new connection, I have to wait a few minutes before the connection is dropped. Can anyone guide me here/
|
|
|
|
|
Hi
I am working on a desktop application using C# n .NET 2.0. I have a BindingNavigator, BindingSource and a DataSet on a screen. Their properties are set as follows.
BindingNavigator1.BindingSource = BindingSource1;
BindingSource1.DataSource = DataSet1;
BindingSource1.DataMember1 = DataSet1.Table1;
Now the AddNewItem event of BindingNavigator looks something like and here is what I want to do.
void BindingNavigator1_AddNewItem_Click( sender s, EventArgs e )
{
// if( MyCond )
// Cancel this event;
// else
// Go Ahead;
}
I think there should have been e.cancle(); to cancel this event but it is not there. So I cannot find out how to cancel this event. Can anybody help me out?
|
|
|
|
|
This might help you
void BindingNavigator1_AddNewItem_Click( sender s, EventArgs e )
{
if( MyCond ) {
// delete the coming item
BindingNavigator1.BindingSource.CancelEdit();
} else{
// go ahead..
}
}
//C0ax
If it' stuck, DO NOT pull harder!
|
|
|
|
|
Thank you so much. It was really helpful. Thankx once again
|
|
|
|
|
Well the situation has become a bit complex. In my DataSet I have two tables say table1 and table2. They have one to many relation (no rule is set like for update, delete or accepct/reject changes). When I drop a binding source for the parent table i.e table1, I get another binding source for child i.e table2BindingSource1 after rebuilding the project. That is really helpful because when I set
//this.BindingNavigator1.BindingSource = table1BindingSource;
The self created BindingSource collaborates with the navigator itself and I need not to do any extra coding.
Now the problem is when I do
//this.BindingNavigator1.BindingSource.CancelEdit();
to cancel any changes made to DataSet in case user clicks Delete button one the Navigator.
This only works for the parent table i.e table1 and not for the child table or say for self created BindingSource.
How can I apply this CancelEdit for both the tables in the DataSet ( for both BindingSources ).
Can anybody help me out?
|
|
|
|