|
if you're a n00b, then it doesn't really matter which language you use to learn the ideas. they can be applied in any language.
And, that's how I learned: by studying code other excellent programmers wrote (don't personally know if that really applies to thunderbird code).
programming is programming regardless of language used. what you learn can be applied to C#.
There is the System.Net.Mail namespace that has a lot of stuff in it that you'd need.
Why not get started trying something and then ask more appropriate, *small-scope* questions.
First break down the problem into smaller pieces. Then break those pieces into even smaller pieces and repeat until you get something that you can do in a few steps. accomplish all those smallest pieces, and you will have solved the larger ones.
Silence is the voice of complicity.
Strange women lying in ponds distributing swords is no basis for a system of government. -- monty python
Might I suggest that the universe was always the size of the cosmos. It is just that at one point the cosmos was the size of a marble. -- Colin Angus Mackay
|
|
|
|
|
Why do you need to create a mail program ? There's plenty out there.
N4D33M wrote: Im a comlete n00b in C#.
Then if this is a job you've accepted, you should let them know it is beyond you. If it's a personal project, start with something more within your reach. Most people who give up on programming, do so because they didn't set themselves reasonable goals. They expected to start big, instead of learning at a reasonable pace.
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 )
|
|
|
|
|
Thanx u all for your replies ...i guess i will have to study a bit more before i delve into such projects .... btw its a project just for fun and information ....
N4D33M.
|
|
|
|
|
I have a problem where i am using a TextBox with the MultiLine property set to true. This is for operators to enter an address, which is saved, and printed to a label.
However...
We've a problem were operators, who have the ability to always do the unexpected, are holding the space bar until the cursor gets to the next line in the textbox instead of using enter/return, which means the labels which are then printed are screwed (attempting to put the entire address on one line)
Has anyone any ideas how to tackle this so the user can't use space bar to pad to the next row and have to use return?
Thanks
|
|
|
|
|
This sounds like a training issue rather than a technical one, however you could intercept each keypress and if it is a space character with a preceeding space character then you could remove 1 char from the end of the textbox - thus stopping the user from being able to enter multiple space chars.
|
|
|
|
|
Thanks for the response
i would love it to be a training issue but they guys working on the packing benches in our warehouse arent exaclty IT literate.
The idea is to just stop them doing anything other than what they should be doing!
I've considered the keypress but thought there may be a better solution.
I suppose i should know by now to always expect the unexpected.
|
|
|
|
|
You could put a message box with the message "Your supervisor has been warned of your overuse of spaces"
|
|
|
|
|
i like it
or
"GET OFF THAT SPACE BAR: REFER TO MANUAL"
|
|
|
|
|
I agree with Jamie that it's primarily a training issue, but it's also one of validation.
Before accepting the data as entered you should be scrubbing the text entered and looking for multiple spaces next to each other and various other irregulaties that would break your output.
You should always be treating user input as if they're a bunch of demonic 2 years olds mashing the keyboard. Would you trust anything they enter?? Your code shouldn't trust it either...
|
|
|
|
|
trust me there are more checks on that address than there are at US customs on a flight from Colubia, but i'm not dealing entirely with my own system. i hate to interact with others. Its complicated. And also why i hate contractors. Overpaid and leaving me to clean up the mess.
|
|
|
|
|
blakey404 wrote: there are more checks on that address than there are at US customs on a flight from Colubia
Wanna bet?? Guess who I work for, as a contractor, who's grossly underpaid...
|
|
|
|
|
hehehe to be honest it is a particular contractor i mean to aim my anger at, not all of you
and yes i do wanna bet, the whole despatch system is based on postcodes (UK) for validation to lots and lots of checks are done. its a simple fact that this is the manual override option which is required because the UK post office cannot release their updates (to address based on postcode) quick enough for us to rely on it completely. So there does need to be a manual override, it just needs to allow as much but also as little functionality as possible, if that makes sense.
Cheers
Anthony
|
|
|
|
|
blakey404 wrote: And also why i hate contractors
Way to alienate people trying to help you.
|
|
|
|
|
grumpy contractor
|
|
|
|
|
Dave Kreskowiak wrote: You should always be treating user input as if they're a bunch of demonic 2 years olds mashing the keyboard. Would you trust anything they enter?? Your code shouldn't trust it either...
Thats brilliant, and very true.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Hi!
I guess the easiest solution will be to turn off word wrapping.
That way they can enter as many spaces as they like, they only get the TextBox to scroll horizontally once the right margin is reached and then (hopefully) they see the error in their ways.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
i considered that to be honest and its currently looking like my favourite solution as they cannot get to the next line that way without using return
|
|
|
|
|
A few years back, i worked on a project where permissions were handled by assigning a number to a user, and that number would then be read as a "binary" (if i remember correctly), ie, it would then get broken up into its parts based on the 1,2,4,8 scale.
so 3 = 1 and 2
7 = 1 and 2 and 4 and so on.
i know there is a method for interpreting this in c#, but i no longer work for that company, and a need to use a similar method of interpretation has come up. so, could someone please point me toward the method for interpreting this, and, let me know if i am calling it the right thing?
thank you
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
More commonly refered to as bitwise operation, you use the | and & operators. (& to interpret if a particular "bit" is set, and | to set a particular "bit").
Some examples.
<br />
int myNum = 1;<br />
myNum = myNum | 2;
To use this in a boolean expression, you can check the result != 0 (which effectively means the "bit is set".
<br />
if( (myNum & 2) != 0)<br />
{<br />
}
|
|
|
|
|
Yeah, what he said. Plus, look at the FlagsAttribute for enumerations.
|
|
|
|
|
Hi all,
I have a child form compiled as DLL (project1) to be used from another Main Application (project2). Now this window has many settings.
The Main Application can create multiple instances from the child form (project1).
All these instances will share the same settings.
My question is how can I make each instance create its own settings?
Thank you
|
|
|
|
|
I assume you're asking for persistent settings. Have you looked at any of the classes in System.Configuration namespace? You should be able to create a new app settings group per instance.
|
|
|
|
|
Hi All,
I need to run 3 methods parallaly.Then I have used Threading for that. Here is the code.
public void threadtest()
{
Thread SpecialThread = new Thread(new ThreadStart(this.GetSpecial));
Thread BulkThread = new Thread(new ThreadStart(this.GetBulk));
Thread NormalThread = new Thread(new ThreadStart(this.GetNormal));
SpecialThread.Start();
BulkThread.Start();
NormalThread.Start();
SpecialThread.Join();
BulkThread.Join();
NormalThread.Join();
while((NormalThread.ThreadState==System.Threading.ThreadState.Running) ||
(BulkThread.ThreadState==System.Threading.ThreadState.Running) ||
(SpecialThread.ThreadState==System.Threading.ThreadState.Running)
)
{
}
}
But most of time one or two threads are going to aborted or something happen and I loose their results.Sometimes this worked properly and I can get all results from 3 methods.
Can any one correct this code?
|
|
|
|
|
Repost. Though I'd seen it before and yes, a week ago you posted the same code. A complete c+p actually. No-one helped you then, what makes you think they will now?
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
So what? He is trying again and may have better luck. Why didn't you just ignore his post?
|
|
|
|