|
The mail.CC field is an array, I'd say you need to add each address seperately, and the delimiter is not working.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you. I'll try another way.
|
|
|
|
|
I could be wrong, as I'm not certain if your using the System.Web.Mail.SmtpMail class. If you are, and your "mail" object is a MailMessage, then the .Cc is indeed a string, addresses separated by semicolon. If I am incorrect, and .CC is a string array (string[]), you could populate it like so:
mail.CC = new string[] { "mail1@mail.com", "mail2@mail.com" };
|
|
|
|
|
You can start one, but how do you go about stoping one?
|
|
|
|
|
Hi there,
System.Diagnostics.Process.Kill to kill a process
or u can use Windows API SendMessage to kill a process
<< >>
|
|
|
|
|
Hi all,
Here I come with another problem : I want to create a form that will show as a dialog like a MessageBox, I know Windows Mobile permits it as I saw it in other apps, but how can I achieve this using .NET CF ?
Thanx,
Stephane
|
|
|
|
|
Stephane,
I had to create a form that simulated the MessageBox for a CF project. If you are still stuck, let me know and I dig out the source and e-mail it to you.
|
|
|
|
|
Hi !
Yes I would be really gratefull to you if you could send me the source code because I really don't know how to do it ...
Thanks so much !
Stéphane
|
|
|
|
|
Stephane,
If you send me your e-mail address to 'barkingtreeAThotmail.com' (remember to change the AT ), and I will send the source file and the resx for the form.
|
|
|
|
|
I want to make a user control with an image embeded in it,
this image will be use in design time
|
|
|
|
|
If you embedd it as a resource, you can access it from there. But you're saying you want the user to see it when designing a form ? Is it just a logo ? Create a control that displays the image, and it should work.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thank you but I embedd the image in the control library but i dont know how to load it
can you answer me
sorry for my bad English
|
|
|
|
|
Oh, OK. You use the resource manager to load it, using the fully qualified namespace and file name. Do you just want to expose it as a Bitmap property on your class ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am making a control. Should I override functions like OnMouseMove, OnMouseLeave, OnPaint etc or should i create an event handler like this.MouseMove += new blah blah for these
|
|
|
|
|
Depends, really. I tend to override, so I can control when/if the base is called.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
If your creating a control by combining multiple existing controls onto a UserControl form, I would use event handlers. If your creating a completely new custom control by deriving from Control, the best option, and for all intents the only option, is to override the protected members like OnPain, OnResize, OnMouse*, etc.
|
|
|
|
|
i need whole ur help about connecting , inserting, updating ,etc. information to MSAccess,
please give me a whole code sample,
i need a code that could insert to a table.
tnx alot,
ASPERSICA
|
|
|
|
|
Hi there,
First, I think u need to have an overview about ADO.NET technology and then u can try to practise on this
take a look on this link
ADO.NET Overivew
<< >>
|
|
|
|
|
I currently have a method in a class library that is being accessed via .net remoting. The remote object handles active directory functions such as authentication, and getting the groups associated with an authenticated user. My problem is that when I call the method to get the groups for the authenticated user, it fails (something about not being able to find the domain or ldap server), but when i copy that method into my web app and call it directly from the web app, it works fine. Here is the code in the remote object's method:
<code>
public string GetGroups(string strPath, string strFilterAttribute)
{
DirectorySearcher search = new DirectorySearcher(strPath);
search.Filter = "(cn=" + strFilterAttribute + ")";
search.PropertiesToLoad.Add("memberOf");
StringBuilder groupNames = new StringBuilder();
try
{
SearchResult result = search.FindOne();
int propertyCount = result.Properties["memberOf"].Count;
string dn;
int equalsIndex, commaIndex;
for(int propertyCounter = 0; propertyCounter < propertyCount; propertyCounter++)
{
dn = (string)result.Properties["memberOf"][propertyCounter];
equalsIndex = dn.IndexOf("=", 1);
commaIndex = dn.IndexOf(",", 1);
if(-1 == equalsIndex)
{
return null;
}
groupNames.Append(dn.Substring((equalsIndex + 1), (commaIndex - equalsIndex) - 1));
groupNames.Append("|");
}
}
catch(Exception ex)
{
throw new Exception("Error obtaining group names. " + ex.Message);
}
return groupNames.ToString();
}
</code>
I use this to call it remotely (the necessary set up to call the remote object is already taken care of at this point):
<code>string strGroups = myRemote.GetGroups(strPath, strFilterAttribute);</code>
This way causes the error, but when I copy and paste the same method into my web app, I call this way:
<code>string strGroups = GetGroups(strPath, strFilterAttribute);</code>
and it works perfectly. Does anyone have any ideas as to why? Also is there a way to run my web app in debug mode and at the same time run my remote object in debug mode so that I can step into it when it is called? I remember doing this in VB 6 with COM objects (dlls).
Thanks in advance
|
|
|
|
|
Is your class derived from MarshalByRefObject? Or is it serializable?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi Senthil,
Thanks for your response, my class is derived via MarshalByRefObject.
|
|
|
|
|
Hi
please I need help, i need icon in system tray which manages my window service. windows service run on my computer but it doesnt show the icon. and other thing is how i can send messages to window service to do some perticular stuff.
|
|
|
|
|
We'll need some more information before we can help in regards to the notification icon problem (systray icon). Do you already have code to display a system tray icon, or do you need help adding that code?
As for communicating with your windows service, there are many ways, and it all depends on the environment the service is intended to be used in, and what kind of performance you need out of the communication protocol. You can use named pipes (there are several EXCELLENT implementations of named pipe communication here on CodeProject), .NET Remoting (search this site and google for it), as well as custom implementations such as with TCP/IP. Again, more information is needed before useful advice can be given.
|
|
|
|
|
HI Jon Rista,
Thank you for speedy reply.
In my project I need to create communication between .net application and MFC application on the same machine.
Please help me.. after resolving this communcation problem i will handle system tray problem.
Thanks in advance.
Regards,
vidya
|
|
|
|
|
If you want to communicate between dissimilar apps like that (and dissimilar platforms), I would say the best option is TCP/IP if you need to communicate accross a network, or Named Pipes if you just need to communicate to the same machine. There are a couple good named pipe implementations here on CodeProject that should help you get started. You will need to write custom communication code for each app.
|
|
|
|