|
Your welcome, glad I could be of help!
Rocky Moore <><
|
|
|
|
|
hi,
i think this question has been asked many times in the past, so sorry, but i didnt find any "good"/"acceptable" solution for the mailing thing...
you'd really help me if you have a idea how to
- send emails (including all the stuff, like html-mail, attachments, priority what ever) AND
- receive emails (incl. attachments, etc.)
using VC#
and please dont give the "system.web.mail"-namespace answer ...
code/links to code/example projects are welcome!
hope you can help me on that, thx,
Harry
|
|
|
|
|
Search CP. There is a C# article on Html mail, and a couple on SMTP (send). If I remember correctly there are a couple on POP3 (receive). They should be easy to find.
Rocky Moore <><
|
|
|
|
|
This is what you need to be able to send an email through a C# windows app. You do have to declare using system.web.mail;
MailMessage EmailMessage = new MailMessage();
EmailMessage.From = "someaddress@whatever.com";
EmailMessage.To = "someaddress@whatever.com";
EmailMessage.Cc = "someaddress@whatever.com";
EmailMessage.Bcc = "someaddress@whatever.com";
EmailMessage.Subject = "Subject text goes here.";
string sEmailMessage = "Ask and you shall receive. " + DateTime.Now.ToLongDateString() + " - " + DateTime.Now.ToLongTimeString();
EmailMessage.Body = sEmailMessage;
EmailMessage.Attachments.Add( new MailAttachment( /*string from a openfiledialog file path*/, MailEncoding.Base64 ) );
SmtpMail.Send( EmailMessage );
Hope this helps.
|
|
|
|
|
well, thx, but i already knew that....;)
i know this is cool and easy code for sending, but i need to receive emails aswell!!
and i have no damn clue to do that... i mean receiving emails with attachement and all..
has anybody yet programmed such kind of a class or app?! please i really need that code...
can anyone help!?
|
|
|
|
|
In Windows XP Home Edition, when trying to list MSDE servers using C# and SQLDMO the list is empty. For instance, when doing
SQLDMO.ApplicationClass DMOApp= new SQLDMO.ApplicationClass();
SQLDMO.NameList names=DMOApp.ListAvailableSQLServers();
I get names.Count=0, although two instances of the MSDE server are installed.
Can anybody help?
|
|
|
|
|
|
That is not true. You can add a reference to the Microsoft SQLDMO Object Library 8.0 in the COM tab of the Add Reference dialog in Visual Studio when you have MSDE installed.
As an exemple, see this Christian Graus article.
http://www.codeproject.com/cs/database/MSDE-GUI.asp[^]
|
|
|
|
|
I wish that people would not reply if they are not 100% sure.
I was just reading a book about that and also people have
made apps that lets people administer these MSDE applications
thru the SQLDMO library.
|
|
|
|
|
|
Hi.
I have a panel with scrollbars, onto which i draw a bunch of controls such as listboxes and other panels.
Now I want to be able to print the contents of this "design area" (it is a class diagram designer) panel on a printer. So how can I print such objects? I've looked through an example of doing a screen capture for printing windows forms, but in my case the whole area to be printed might not be present on screen, because of the scrollbars.
Is there any way to render controls onto another area than the screen, i.e. an offscreen buffer? In that case I could just draw all my controls onto that one, scale it and print. But can this be done?
Or any other good suggestions as of how to print forms/controls?
|
|
|
|
|
Were you able to print the form ?
|
|
|
|
|
When dragging and dropping a file onto a control with AllowDrop set to true, how do we access the name of the dropped file?
|
|
|
|
|
In your DragDrop handler you would use the Data.GetData method of the DragEventArgs which will return an array of strings. As an example, to capture a file(s) dropped on a Form:
private void Form1_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
object ob = e.Data.GetData(DataFormats.FileDrop, true);
if(ob!=null)
{
System.Array files = (System.Array) ob;
foreach(string file in files)
System.Diagnostics.Debug.WriteLine(file);
}
}
Rocky Moore <><
|
|
|
|
|
|
I have this text file "demo.txt" that's just straight 1 and 0s, no formatting or anything...
I need to format the file like this...
14 columns with a space between each, and with 4 characters in each... like this...
0000 0000 0000 0001 0101 C130 0000 0000 0000 0000 0000 0000 0000 0D20
and after 14 columns start a new line, and just do that for the whole "demo.txt"...
How can I do this?
/\ |_ E X E GG
|
|
|
|
|
This needs to be tested and fixed, but its close. I'm sure there are better ways of doing this.
using System;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
public class Class1
{
public static void FormatFile(string text2read)
{
const char EOF = char.MaxValue;
TextReader reader = new StringReader (text2read);
BitVector32 vector = new BitVector32 (0);
ArrayList al = new ArrayList ();
char bit = (char) reader.Read ();
int pos = 0;
while (bit != EOF)
{
vector[pos] = Convert.ToBoolean (bit);
pos++;
if (pos == 32)
{
al.Add (vector.Data);
vector.Data = 0;
pos = 0;
}
bit = (char) reader.Read ();
}
int index = 0;
const int width = 14;
const string format =
"{0:x0000} {1:x0000} {2:x0000} {3:x0000} {4:x0000} " +
"{5:x0000} {6:x0000} {7:x0000} {8:x0000} {9:x0000} " +
"{10:x0000} {11:x0000} {12:x0000} {13:x0000}";
int[] vals;
while (index + width < al.Count)
{
vals = (al.GetRange (index, width)).ToArray (typeof (int)) as int[];
Console.WriteLine (format, vals);
index += width;
}
}
}
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
It says "C:\Documents and Settings\Alex Egg\My Documents\Visual Studio Projects\ConsoleConvert\Class1.cs(1): Property or indexer 'System.Collections.Specialized.BitVector32.Data' cannot be assigned to -- it is read only"
What's that mean?
/\ |_ E X E GG
|
|
|
|
|
|
It was not my intention to write the code for you. Rather to give you direction so you might grow on you own. Thus "this code needs to tested and fixed."
Now - What does "Its read-only" sound like? That its read only.
Now, try replacing:
vector.Data = 0;
with:
vector = new BitVector32 (0);
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
Please tell me how to program an application that can run at exactly time that user configure. Some thing like Windows'sheduled tasks.Thanks.
Where there is a will, there is a way
(Unknown)
|
|
|
|
|
Another application should be run at background and take care of it. This program should have a thread(or timer) that run for every one second for example,and check the settings. If its the time then run that program.
Mazy
No sig. available now.
|
|
|
|
|
Do you know any VS 2003 to VS.NET project converter?
I need to convert a complex project created in VS 2003 to VS.NET.
Thank you
|
|
|
|
|
If you have a VS.NET 2002 project, make a backup of it, open it in VS.NET 2003 and then diff the two. You'll see that there are very few changes and that they are easy to do by hand (which is one of the points about doing XML - anything can read, write, and parse it - including humans!).
For all my projects at work (which are many, though there is not really any level of difficulties as you say), the version was different and there were a couple of extra attributes in a couple of the elements. Changing these worked nicely.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|