|
Hi All! I'm using "Microsoft CDO For Exchange 2000 Library" along with Microsoft ActiveX Data Objects 2.5 Library to send mails using Exchange server. I've tried running the code with all possible ammendments but to no avail. I always get the "Could not find the Sender's mailbox"
error.My code is given below.
CDO.Message iMsg = new CDO.Message();
CDO.Configuration iConf = new CDO.Configuration();
ADODB.Fields Flds = null;
try
{
Flds = iConf.Fields;
Flds["http://schemas.microsoft.com/cdo/configuration/sendusing"].Value = 3;
Flds["http://schemas.microsoft.com/cdo/configuration/smtpserver"].Value = "<220.220.220.91>";
Flds["http://schemas.microsoft.com/cdo/configuration/sendusername"].Value = "Nitin.Vij";
Flds["http://schemas.microsoft.com/cdo/configuration/sendpassword"].Value = "common";
Flds["http://schemas.microsoft.com/cdo/configuration/smtpserverport"].Value = 25;
Flds["http://schemas.microsoft.com/cdo/configuration/MailboxURL"].Value = "http//Exchange/Exchange/Nitin.Vij/Inbox";
Flds.Update();
iMsg.Configuration = iConf;
iMsg.MimeFormatted = false;
iMsg.AutoGenerateTextBody = false;
iMsg.To = "Nitin.Vij@Domain.com";
iMsg.Subject = "Test mail from Nitin";
iMsg.Sender = "Nitin.Vij@Domain.com";
iMsg.TextBody = "Test";
iMsg.Send();
Console.ReadLine();
}
catch(Exception ex)
{
Console.WriteLine(ex);
}
Any help is highly appreciated.
Don't Quit
|
|
|
|
|
Hi,
It basically uploads the data from inside the files into sql server 2005 and then moves files around on the network.
At present I have this function inside a button in a .net 2.0 win application.
This functionality will have to be scheduled to run either every few minutes or as of when there are files on the network (To be decided later).
I am thinking that may be it is best to create a windows service for this task. What do you think?
I am also using sql server 2005.
Do you think I should use windows service in .net 2.0? #
Is there a functionality in sql server 2005 for this kind of functionality?
Thanks
|
|
|
|
|
Hello, I have a combobox that I popullate as follows:
combobox.DataSource = dataset.Tables["Table"];
combobox.DisplayMember = "name_field";
combobox.ValueMember = "id_field";
It works great, and the next step is trying to modify the displayed value directly in the combobox.
The idea is to modify the value of the name_field field in the dataset, and save it lately in the database.
I try to write directly in the combobox to modify the displayed name of the item, but as soon as I select another item, I can check that the previously selected item still has the value it used to have.
How can I make the changes permanent in the dataset?
Thank you very much.
|
|
|
|
|
It looks like on combobox selected index changed event, you are will be binding the old data again from DB ? Can you post the selected index changed event of that combo ?
|
|
|
|
|
I am doing nothing in this event.
Should I do something? I thought it would automatically update it by itself, like when I use a databindings.add(new binding...) in a textbox, in example. In this case, the only thing I have to do to have my datareader updated is to chanche the currentposition of the bindingcontext, but with the combobox it is not working at all.
Any ideas?
|
|
|
|
|
I’m trying to load a sprite into my form and move it with the cursor keys. I have added:
private Bitmap player; (player is my sprite name and has been added as a resource)
This is at the top of my file. I have then added the code to move the sprite:
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Left:
player. **** Problem is here ******
After the player. I am trying to get intellisense to offer me the .left option which I then want to add:
player.left--;
I have tested a similar functionality using a picturebox1 which I just stuck on my form and was able to move this using the code above. Am I missing something to do with loading my sprite in, as the picture box was already on the form and i managed to move this using the code above?
Here’s the code in full:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Media;
namespace Game
{
public partial class Form1 : Form
{
// insert private bitmap background
// and movement int x/y move etc.....
private Bitmap background = new Bitmap(640, 320);
//private Bitmap car;
private Bitmap player;
public Form1()
{
InitializeComponent();
player = new Bitmap(GetType(), "player.jpg");
//car = new Bitmap(GetType(), "car.jpg");
Bitmap background = Game.Properties.Resources.background;
this.BackgroundImage = background;
SoundPlayer sndPing = new SoundPlayer(@"c:\lee\traffic.wav");
sndPing.Play();
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.UserPaint, true);
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Left:
player.
}
}
}
}
Thanks
|
|
|
|
|
player is a Bitmap[^] object, and as you can see from the members[^] it has, Left is not one of them.
lee.hallows wrote: I have tested a similar functionality using a picturebox1 which I just stuck on my form and was able to move this using the code above
That is because a picturebox is a control and has a location on the form. A bitmap is just an image representation.
Perhaps if you assigned the bitmap to the picturebox and moved the picturebox you would get the functionality you desire.
[ADDITIONAL]
Also, if you are programming a game you may find it more advantageous to use XNA Game Studio Express which is designed for the purpose. It is a free download from Microsoft and it will provide better functionality for writing games than plain Visual Studio.
[/ADDITIONAL]
|
|
|
|
|
Hi,
I have Created One Windows Application , it have one Post Operation ,When any data is posted It will inserted to Database.I have Installed My application to many systems.When any Data is Posted I want To give Alert To All Systems?How can I give the Alert To All the Systems?I s this is possible or not?Please Any one help me.......(I have Only one Server and Many clients)
**Is any Data is posted ,How can I give the Alert To All Systems.....?
|
|
|
|
|
Hi,
You can send some sort of message to the clients. By 'message', I mean, some custom class object or a simple string denoting that the event has occured on the server. Then the client can display the object recieved from the server in any form ( as you might want it to be displayed ). By the way how are you connected to the server ? Using sockets ?. If yes then just send string of data to all clients when the event occurs on the server and the client should be able to interpret the string.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Thanks for ur reply.
Is there any article u have please send me the link....I have used normal database connection..(SQL connection).When any data is added in the database ,I want to give alert message to all login users.Please help me
|
|
|
|
|
hi all,
I am developing a windows application where i have included code for online update of my application.When i am trying to download the files from the server, I am able to download all the files except exe file.
Could anybody tell me how to download a exe file from the server?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Maybe your virusscanner or firewall is blockig exe files. Essentially thee is no difference between different types of datafiles.
|
|
|
|
|
Hi.
What is the easiest way to synchronize two(or more) threads in the classic producer-consumer problem?
What classes and mechanisms must be used? Does .NET Thread object have features similar to Java threads? (wait, notify, notifyAll methods)
Some code snippets would certainly help.
Thanks.
|
|
|
|
|
Google is your friend.
[^]
|
|
|
|
|
hi,
i want a combo with the ok and browse button ..
browse i should browse the files and i can say ok
pls help me
with regards
prasad
|
|
|
|
|
during the form load event, say
ComboBox1.Items.Add("Ok");
ComboBox1.Items.Add("Browse");
Then use the following code
if(ComboBox1.Text=="Browse")<br />
{<br />
<br />
OpenFileDialog ofn = new OpenFileDialog();<br />
ofn.Filter = "XML Files (*.xml)|*.xml";
ofn.Title = "Type File";<br />
if (ofn.ShowDialog() == DialogResult.Cancel)<br />
goto Quit;<br />
}
i hope this helps/
Keshav Kamat
India
|
|
|
|
|
hi,keshav
u r adding a text wright and it is not working..
i think my question was not clear
i am having a datagrid and one of the column is made as a
column type=DataGridViewComboBoxColumn
and i am adding a rows like
Scenario_Designer_gridview.Rows.Add(filename);
where filename contains the list of files in a specifeid folder i am getting from folder browser.
now i want add the list of files to a that column...
i am getting error......
help me pls.
|
|
|
|
|
u mean to say that when the user clicks on the browse button, it should open a file dialog for only a fixed path, and automatically select all the files from that path, and load the names of the files in the data grid rows! right?
I will try to figure it out. It requires a little addition of code.
I will try it and let u know.
Keshav Kamat
India
|
|
|
|
|
or do u mean that every row in that datagrid will have a column that comprises of a combo box that allows u to choose a particular file?
Keshav Kamat
India
|
|
|
|
|
Hey, I wanna try to make a 3rd party prog that can control CS servs from outside (Like HLSW).
I know this is not the main forum for this, but I think that maybe someone here knows what I'm talking about and MAYBE help me (please).
Well, I could find several sites to deal with RCON cmds, and I even found a code (with a help of a friend) to connect to the server and exec RCON cmds, but however, I can't get the log.
This is a link that showed me a little about the log: http://www.hlstats.org/logs/[^]
but however, I could not understand HOW to get it.
If someone can help, PLEASE PLEASE HELP ME.
And if you have a prog\snippet for this this would help even more!
Thanks ALOT in advance.
NaNg.
|
|
|
|
|
my application work with ms access file (*.mdb) and i want share my application folder (content exe and mdb file) for clients (user in my workgroup) that clients run my application from their pc and work with database.
below is my connection that work correctly in local, but return error when run from shared folder !
private string constr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\\\servername\\sharedfolder\\MainDb.mdb; ";<br />
whats wrong?
|
|
|
|
|
Hello All,
I am using a datagrid, and I populate the datagrid, using a sqldata reader. The code is as follows.
SqlConnection conn = new SqlConnection("Data Source=" + Environment.MachineName + "\\WINCC;Integrated Security=SSPI;Initial Catalog=Logger; Packet Size = 32766;");<br />
SqlCommand cmd=null;<br />
SqlDataReader rdr = null;<br />
conn.Open(); <br />
cmd = new SqlCommand("SELECT * FROM RDPLogViewer", conn);<br />
rdr = cmd.ExecuteReader();<br />
while (rdr.Read())<br />
{<br />
LoggerDatagrid.Rows.Add(rdr["TypeLevel"].ToString(), rdr["TimeStamp"].ToString(), rdr["SubSystem"].ToString(), rdr["ClassName"].ToString(), rdr["FunctionUsed"].ToString(), rdr["Memory"].ToString(), rdr["Statement"].ToString());<br />
}<br />
rdr.Close();<br />
conn.Close();<br />
It is working perfectly fine. Does there exist an alternative or an additional way to populate the datagrid, more fast? I just want to optimize it.
Keshav Kamat
India
|
|
|
|
|
Hi,
Why dont you try to use SqlDataAdapter to fill a data set and then attach that data set to the DataSource property of the DataGrid. I think this will save you some coding effort.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I think the way what you used to bind the grid is difficult. As coolestcoder told you can use sqldatadapter to fill one dataset. Then set the dataset as datasource to grid. One more problem what i find with your binding is,it's tough to implement paging on your example since sqldatareader is forward only. So better to go for dataset
|
|
|
|
|
HI,
Is it possible to do IPC with DOS apps using C#?
I have a 32-bit DOS App which takes in CMD line parameters. I need to get the results from this app onto a Windows Form.
The results are quite large, 25-30 MB....which is the 1. Easiest and 2. Fastest way to do it?
I'm right now looking for an easy way to do it, but a Fast way with minimum overhead would be great.
Examples and pointers would really help.
Thx
Ashish Sharma
|
|
|
|