|
My articles on image processing might help in giving you code you can use to examine an image, a pixel at a time.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi Everybody!!!
I have a form with several controls, then I click Save button, I want to fire up same event for all those controls, each control have its own validating event. Control's event are fired then I go to another control.
I want to prevent Empty strings by pressing SAVE button at the begining of filling up the form
Any help PLZ.
foreach (Control ctrl in groupbox.Controls)
{
HERE FIRE SAME EVENT
}
|
|
|
|
|
I have no idea what you mean. If you add a validating event, you need to first check if your control is of the right type, then cast it and call the method.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
what type of controls is groupbox containing, textboxes?
Calin
|
|
|
|
|
you need to create an interface which will contain a Validate() method, extend your controls(eg. inherit from Textbox,..) and also inherit from that "IValidate" interface.
In your custom textbox let's say, you may validate:
public bool Validate()
{
return !this.Text.Equals(string.Empty);
}
After that, validate something like:
foreach (Control ctrl in this.Controls)
{
if (ctrl is IValidate)
{
bool result = (ctrl as IValidate).Validate();
}
}
|
|
|
|
|
public interface IValidate
{
bool Validate();
}
|
|
|
|
|
Hi,
I'm building my own tab control. I have classes with all of the lines and stuff I want to draw to make up the tabs and the outline to the control. But I'm just wondering because I'm finding it difficult to draw a tab each time a button to add a new tab is clicked, should I create a user control(for each tab) inside a user control(the actual tab control) or is there a good way to draw a tab using the class I have for that purpose each time the add tab button is clicked?
Sorry if this is hard to understand, I typed it out twice cos' the first time it was to hard for even me to understand
thanks
|
|
|
|
|
Is this through WPF or Windows Forms?
Also, are you building a new tab control more for fun, or to meet a need that the built-in tab control didn't meet?
|
|
|
|
|
akidan wrote: Is this through WPF or Windows Forms?
It's through windows forms.
akidan wrote: Also, are you building a new tab control more for fun, or to meet a need that the built-in tab control didn't meet?
A bit of both.
|
|
|
|
|
Hello all,
Can any body give me tips to reduce assembly and executables size. Like remove unused members,unused references etc.
Thanks.
modified on Thursday, February 12, 2009 8:21 PM
|
|
|
|
|
|
Why would you like to reduce the assembly's and executables.
What's the size they are now and what is the size you would like to have them?
|
|
|
|
|
the problem is i am deploying solution using clickonce and now the size is 80 mb, the more i reduce the faster it gets copied to client machine, thats my goal.
|
|
|
|
|
I don't really know a lot about this. But I guess that you have many pictures in your app?
If that's true, then you should try and make the pictures smaller. If this doesn't work, I don't know either.
|
|
|
|
|
thanks for the tip. I have lot of icons and png files, let me check if removing unused of them will reduce size.
|
|
|
|
|
I wrote code to send/receive e-mails using COM and MAPI many years ago. There must have been some progress since then. I know sending e-mails from .NET program is easy. How to read e-mails from .NET program? Any help is appreciated. Thanks.
modified on Thursday, February 12, 2009 3:39 PM
|
|
|
|
|
Nothing is built in to .NET as far as I know.
There are several third-party components that will talk to email servers, though. If you want to talk to an email program, I think COM/MAPI is still it.
|
|
|
|
|
its strange question from you. i checked twice... but its you.
ok dont take offence. I feel odd because, i read many of your article and you are at platinum level, so you can find this info easily from google or codeproject thatswhy... i am just kidding...
modified on Thursday, February 12, 2009 3:31 PM
|
|
|
|
|
Rutvik Dave wrote: ok dont take offence.
No problem, I am not Chuck Norris.
P.S. When I google with "receive mail .net", all I get is reference on how to send e-mail in .net.
|
|
|
|
|
Xiangyang Liu ??? wrote: No problem
Thanks...
I am sorry but when i read this tread, I also think of sending the mail which is tooooo easy. so thats my fault.
have look at this[^] or this[^]
|
|
|
|
|
|
I was hoping to avoid low-level coding in C#, but I will take a look at the article. Thanks.
|
|
|
|
|
.Net does not has native support for this (but you could build your own component using sockets and others *low* level components), as others have said, exists third party components that will do this for you, one of them is:
http://www.chilkatsoft.com/Email-DotNet.asp[^]
Hope this helps.
|
|
|
|
|
Thanks, I will take a look.
|
|
|
|
|
Hello,
I'm trying to read a RSS from within a C# code like this (I found this example on the internet):
XmlTextReader rssReader;
XmlDocument rssDoc;
XmlNode nodeRss=null;
rssReader = new XmlTextReader( *** URL *** );
rssDoc = new XmlDocument();
rssDoc.Load(rssReader);
for (int i = 0; i < rssDoc.ChildNodes.Count; i++)
if (rssDoc.ChildNodes[i].Name == "rss")
for (int ii = 0; ii < nodeRss.ChildNodes.Count; ii++)
if (nodeRss.ChildNodes[ii].Name == "channel")
nodeChannel = nodeRss.ChildNodes[ii];
This works fine for most of the RSS I tried. But it doesn't work with this one:
http://www.klack.de/include/generateRSS.php?TYPE=TVPLANER&ID=d7fdb37979873520025e66554beb532d3065904
I get an exception on "rssDoc.Load(rssReader);": The main element is not available. (translated from german).
Does anybody know how I can fix or get around this ?
Thanks !
Georg
|
|
|
|