|
Thanks, I got some code on google.
|
|
|
|
|
Hi guys.
Can we send email in C# (WinForm) with our free YahooMail or Gmail account ?
Thanks.
|
|
|
|
|
Did you try this[^] before posting your question?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thank you.
I've found the answer.
try
{
NetworkCredential loginInfo = new NetworkCredential("username", "password");
MailMessage msg = new MailMessage();
msg.From = new MailAddress("something@gmail.com");
msg.To.Add(new MailAddress("sth@sth.com"));
msg.Subject = "Email Subject";
msg.Body = "Some text";
msg.IsBodyHtml = true;
SmtpClient client = new SmtpClient("smtp.gmail.com");
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Credentials = loginInfo;
client.Send(msg);
MessageBox.Show("Your password has sended to your email", "Email sended", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
|
|
|
|
|
Hi Guys,
I have the following out put from Sql data adapter(sda)
WebRequest req = null;
WebResponse rsp = null;
Dataset ds=new dataset();
Sda.fill(ds)
string xmlDs= ds.Getxml();
string fileName = xmlDs;
string uri = "http://www.webpage/default.appx";
req = WebRequest.Create(uri);
//req.Proxy = WebProxy.GetDefaultProxy(); // Enable if using proxy
req.Method = "POST"; // Post method
req.ContentType = "text/xml";
I would like to Encript the Xml data before sending it accross.How would i go about it?
Thank you in advance.
|
|
|
|
|
The Cryptography namespace is where you need to go. Thing is, do you want to encrypt the XML ( which will mean it's not XML anymore ), or some of the data IN the XML ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi All,
i have a code (below), it take 2 variables, the first being the server name and the second being the eventID to look for in the Directory Service eventlog.
it seems to work fine for all eventID's except the one im looking for - 1394, where it always shows nothing!!
any ideas?
EventLog el = new EventLog("Directory Service", args[0].ToString());
foreach(EventLogEntry i in el.Entries)
{
if(Convert.ToInt32(i.EventID) == Convert.ToInt32(args[1]))
{
Console.WriteLine(i.EventID.ToString() + " - " + i.TimeWritten.ToShortDateString());
}
}
|
|
|
|
|
lane0p2 wrote: it seems to work fine for all eventID's except the one im looking for - 1394, where it always shows nothing!!
Probably, there is no event for this id
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
there is!!
i was looking at the eventviewer and ended up testing loads of ID but only 1394 failed.
i just can't figure it out!
|
|
|
|
|
Hey buddys...........I was trying to use an animated picture pox which acts as a button in my application...................So what I wanted was,when the user mouseEnter in to this picture box i wanted to show another picture box which is the same as that picture but the brightness is more than the previous picture box.................I done it easly by going to photoshop and adding a brightness on the picture.............. But I have a lot of picture boxes as the above one which makes my application very slow...... .........So i came with an idea of using Photoshop reference(CS3 photoshop dll file) and want to add a brightness to that picture in a code.................... So please any body with an idea it is nice to me........ thnak you
|
|
|
|
|
First, yoiu don't use picturebox's this way. All you do is use a button, set it's Image property to the dimmed image. Handle the MouseEnter and MouseLeave events of the button. In those handlers, just change the Image property to point to either the dimmed or brighted image as appropriate. No pictureboxs involved at all.
BTW - the more controls you have on a form, the slow it renders. The only way to speed things up is to reduce the number of controls on the form.
|
|
|
|
|
Thank you man. That is also a good idea............ But to make my customers happy ......i should use this ways ...... because it looks more nice on the picture box than on the button................. by the way i can also make what you said on the picture box.................. thank you
|
|
|
|
|
matiIsGreat wrote: But to make my customers happy
Is it only me or you guys also thought that ?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I'm trying to create a custom treeview that will draw a blue rectangle over a selected node and then redraw the text over it. Is there any command that can help me find the (x,y) coordinates of the node? The node can be selected by either mouse, keyboard, or a button. Any suggestions?
|
|
|
|
|
How about using the Bounds property of the node? that good enough for what you want?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Yup, funny. I've been googling all morning and I just came upon bounds a minute before you answered. Thank you for the reply!
|
|
|
|
|
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
|
Hi,
satigar123 wrote: hi
great
But that's not exactly an answer is it
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi i have a dtaset that contains a table with 2 fields, i want to use thius to create a bar graph,
on field is a company name and the other field is a profit value, i want to show on the graph each comapny(x axis) with their profit values(y axis) as the bars on the bar graph.
can anyone help me with this.
thanxs
|
|
|
|
|
0. Don't use Crystal Reports.
1. Try using zedGraph[^], it is a much cleaner wy to produce graphs and charts.
2. I'm serious about #0.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Hi thanks for your response,
i'm using ZedGraph, it's working great.
|
|
|
|
|
Greetings,
I would like to know if anyone has any code or even VB script, Perl etc that can simply be run from a command line to download whatever page is on a browser and write the raw HTML to a file, it can also be MHT for that matter.
I know about using - Navigate etc for a specific web page. This is different. The page I go to require authentication with word art and user name and password etc. Then once there you must click a few times to get where you are going for the data. Therefore running a script to direct me to a certain webpage will not work. The page has to be displayed first and then downloaded.
So, I just want to take whatever is currently on the browser, mainly due to catch refreshes of new data. Understand the page I am getting data from is generated as from a database so I can not simply run a script file to download that page. The program must be able to simple be activated and write to disk what ever is displayed on the browser at the time the program is run.
I have a seperate data extractor to run against the new file to find the data I need. This file can always have the same name as well and be overwritten.
Thanks,
Antone
|
|
|
|
|
How to write my own printing control, which will printing html (HtmlDocument)?
The control should set print settings in code c#.
1) paper orientation
2) margins
3) paper format (A4,A3 ...)
The control should have view printing.
|
|
|
|
|
I think, what you need is PrintDocument.
Just put PrintDocument in PrintPreviewControl and you can see the result.
|
|
|
|