|
Avanish Singh Chauhan wrote: How can i make my application compatible with Vista ?
Don't store data files in program folders!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
I think the problem is related to Access Rights on the Program Folders folder. You may need your program to operate with Administrative rights in order to acces it.
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
shared user data is supposed to be in the Program Files\Common Files\Company Name(optional?)\App Name folder. That's been the way it's supposed to be done since XP if not earlier. You can force your app to still do so, but you'll end up hammering your users with UAC dialogs in the process.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
hi friends
I want to read network stream with byte[] format, but i don't know it's size. what can I do?
|
|
|
|
|
You call the Read method repeatedly, until it returns a number of zero bytes. Just like reading any stream.
---
single minded; short sighted; long gone;
|
|
|
|
|
thanks, but do you know how I can connect them together?
|
|
|
|
|
Write the bytes to a MemoryStream, then you can access the data once you are done reading. Basically thr MemoryStream will allocate an initial array, then keep moving the data to a larger and larger array as needed.
If you need to support large amounts of data use a FileStream instead.
|
|
|
|
|
Hi Friends I need a details and program for create a Trial version to an application in C# dot net 2005. Help me dear's..........
I got a code for this in vb dot net but i want it in c# help me ......
http://www.codeproject.com/useritems/registration.asp
regards
Sasi Kumar.V
-- modified at 7:12 Wednesday 10th October, 2007
|
|
|
|
|
Sasi Kumar. V wrote: I got a code for this in vb dot net but i want it in c# help me ......
It should be easy enough to convert. There's tons of ways of doing this anyhow, all pretty straightforward.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Compile it, then open the DLL in .NET reflector and disassemble as C#. I have not said this is the best way, but it certainly is a way.
|
|
|
|
|
Why do you need to do this? It's .NET and presumably it's should be CLS Compliant which means that it should be accessible from your assembly.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Where I'm working at the moment, I'm seeing a lot of this sort of thing:
if (ReferenceEquals(curve, null))
{
}
whereas I would personally just use:
if (curve == null)
{
}
Now I know that equality is more complicated than it sounds, so my question is, is there any merit in using the first approach over the second?
Regards,
Rob Philpott.
|
|
|
|
|
Well, IMHO ReferenceEquals method, when used to compare a reference with null , it's merely redundant.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
That would depend on where it is used.
For example: When you override the == operator, you may want to use ReferenceEquals() so that you don't end up with an infinite loop or other undesired effect.
|
|
|
|
|
override operators... you can do that?
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
public static operator bool == (MyObject lhs, MyObject rhs)<br />
{<br />
}
|
|
|
|
|
|
Hello,
I'm looking for a way to activate an existing browser session by means of a C# .Net executable.
I have found some code where I would be able to look for all active programs, and eventually even kill them. I did not find a way to activate a process, however.
private void button1_Click(object sender, System.EventArgs e)
{
System.Diagnostics.Process[] myProcesses;
myProcesses = System.Diagnostics.Process.GetProcesses();
foreach (System.Diagnostics.Process instance in myProcesses)
{
MessageBox.Show (instance.MainWindowTitle);
instance.Kill();
}
}
I need this to avoid the user to have logged in again.
I want to activate his open internet session, and eventually even refresh his session with a new url.
E.g.
http://localhost/sid=abc123?nameId=10
should be replaced by
http://localhost/sid=abc123?nameId=20 , in the same session, and triggered by an executable.
Is this possible ?
Help would be very much appreciated.
|
|
|
|
|
I doubt it's possible.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hai all,
I have to send mails through MAPI.
I have gone through the articles given in code project.
I have created a sample application. But when the send() method is called it is prompting a dialog box intimating an application is trying to send mail automatically... ... from the Microsoft outlook application. While clicking on the "Yes" option it is sending the mail.
But the above task should be automated in my module and it has to be done in a windows service.
Can any one give me a solution to perform the above without displaying the message box.
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Is there a reason you have to use MAPI over SMTP?
In this[^] example they specify the user cannot edit the message (which I believe means it is not shown to them).
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Yes, because i have to have the items in the "Send Items" folder of the outlook.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
That makes sense. Can you post the code that you are using to call MAPISendMail?
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
The code is:
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
using Microsoft.Office.Core;<br />
using Outlook = Microsoft.Office.Interop.Outlook;<br />
<br />
namespace ExchangeMAPI<br />
{<br />
public partial class MailUsingMAPI : Form<br />
{<br />
public MailUsingMAPI()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void btnSendMail_Click(object sender, EventArgs e)<br />
{<br />
object missing = System.Reflection.Missing.Value;<br />
<br />
Outlook.Application outlookApplication = new Outlook.Application();<br />
Outlook.NameSpace nameSpace = outlookApplication.GetNamespace("MAPI");<br />
<br />
nameSpace.Logoff();<br />
nameSpace.Logon(missing, missing, true, false);<br />
<br />
Outlook.MailItem mail = (Outlook.MailItem)outlookApplication.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);<br />
mail.To = txtReceiverAddress.Text;<br />
mail.Subject = txtSubject.Text;<br />
mail.BodyFormat = Outlook.OlBodyFormat.olFormatHTML;<br />
mail.HTMLBody = "<html><body><p>" + txtMessage.Text + @"</p></body></html>";<br />
mail.Send();<br />
}<br />
}<br />
}
Best Regards,
M. J. Jaya Chitra
|
|
|
|