|
Yes and no. You can ship those DLLs - they do not contain any implementation. Those DLLs (assemblies) are merely RCWs (Runtime Callable Wrappers), or "interop assemblies".
The "no" part of my answer is because you're using the wrong assemblies. When possible, use the Primary Interop Assemblies (PIAs) shipped by the company (in this case, us - Microsoft). You can download the Office 2002 PIAs from http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en[^] and the Office 2003 PIAs are included with the Office 2003 System installations as "Developer Support" (or something similar).
You will have to chance your project references and your using statements, but the interfaces, classes, methods, properties, enumerations, and struct names should all remain the same.
The difference is that Office PIAs are "official" and signed with the corporate key, making it easier to support. If you download, extract, and follow the README file (or install these with Office 2003), in the future the PIAs are used automatically.
When possible, develop against the oldest typelibs (COM type libraries; they're used to generate RCWs) you can (without sacrificing functionality you need). When written correctly - and Office is - COM types are supported in future versions, only being deprecated when absolutely necessary (this is acheived, in part, by never changing published interfaces - always derive new interfaces with new methods, even when exposing .NET components to COM).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi all!
Is it possible to change the color of Text in the Visual-Studio Editor? If it is, how can I do this? (I'm working with c#)
Any links, tutorials, tips?
Thanks in advance.
Christian
|
|
|
|
|
If you look at the object model for the EnvDTE object, you might notice the ColorableItems property/object. Read about it in your VS.NET help documentation or online in the MSDN Library[^].
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Ok, so I have a PictureBox on my form named pctInternet. It has the following code associated with it:
string imageLocation = @"C:\mypicture.jpg";<br />
Bitmap bmp = new Bitmap(imageLocation);<br />
pctInternet.Image = bmp;
Now, I just want my PictureBox to display the picture and CLOSE the actual "mypicture.jpg" file, but for some reason whenever I try to delete the "mypicture.jpg" file while my app is running, it errors and says "File is in use."
How do I fix this? What line of code am I missing?
|
|
|
|
|
Because the file is in use. What you need to do is clonse the Bitmap and then dispose it:
using (Bitmap bmp = new Bitmap(imageLocation))
{
pctInternet.Image = (Bitmap)bmp.Clone();
} It's good to use the using block statement for IDisposable implementation because it ensures that objects are disposed even if an exception occurs (it compiles to a try-finally block).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
That doesn't work though. Another work around might be the following:
string loc = @"C:\image1.gif";
using(Bitmap bmp = new Bitmap(loc))
{
using(Graphics g = Graphics.FromHwnd(this.Handle))
{
g.DrawImage(bmp, 5, 5);
}
}
- Nick Parker My Blog | My Articles
|
|
|
|
|
When I set the user account to be disabled or change password at next logon Properties["userAccountControl"].Value always returned ADS_UF_NORMAL_ACCOUNT (512).
Any ideas?
|
|
|
|
|
And this has to do with C# how?
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
If you want to disable the account set your userAccountControl value to 514 (0x202).
- Nick Parker My Blog | My Articles
|
|
|
|
|
I want to see which accounts are locked out.
|
|
|
|
|
If you want to check a particular account, the following will work:
string path = "LDAP://Blah=blah,Blah=blah";
DirectoryEntry de = new DirectoryEntry(path);
int val = Convert.ToInt32(de.Properties["userAccountControl"][0];
if((val & 0x202) == 0)
MessageBox.Show("Account is disabled");
- Nick Parker My Blog | My Articles
|
|
|
|
|
It works if user account is disabled, but does not work if account is locked out ((Convert.ToInt32(de.Properties["userAccountControl"].Value & ADS_UF_LOCKOUT) == ADS_UF_LOCKOUT)
|
|
|
|
|
Zackmac wrote:
but does not work if account is locked out ((Convert.ToInt32(de.Properties["userAccountControl"].Value & ADS_UF_LOCKOUT) == ADS_UF_LOCKOUT)
You need to check if your add operation equals 0, not 0x0010 - 16 (ADS_UF_LOCKOUT). Try this for a lockout checking:
string path = "LDAP://Blah=blah,Blah=blah";
DirectoryEntry de = new DirectoryEntry(path);
int val = Convert.ToInt32(de.Properties["userAccountControl"][0];
if((val & 0x210) == 0)
MessageBox.Show("Account is locked out");
- Nick Parker My Blog | My Articles
|
|
|
|
|
You don't understand me. Problem is userAccountControl value is not reflected when account is locked, but the userAccountControl value changes when the user account is disabled.
|
|
|
|
|
Anyone know of any samples for writing a streaming audio server?
|
|
|
|
|
Hello
I have been tryin to customize the Code appear for iEtoolbar
www.codeproject.com/csharp/dotnetbandobjects.asp
Instead of Click,I am willing to Implement DocumentComplete Event,guide me please
Thanks
|
|
|
|
|
If you have questions about a particular article, ask at the bottom of the article in the article message board: that's what it's there for. This forum is for C#-related and typically general .NET questions 1) not related to a specific article, 2) not related to a specific product or library, and 3) isn't about ASP.NET (there is a forum more specific to that topic here on CodeProject).
There are answers to that question already. In fact, the first question is what you want and I went ahead and posted a reply. Be sure to read it. If you don't understand, don't come back here; continue the thread in the article's message board.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I am sorry,you are right,infact i had to post there but did here without noticing the rules
but it could be good if you gave the link of the post you made on that article..
right now i am searching it in archieve..
Thanks
|
|
|
|
|
|
Not sure if this is in the correct forum or not.. but I had to rant
Does anyone else HATE writing reports that MUST be printable?
Life would be so much easier if our Admin would let us use
SqlServer Reporting Services or Crystal Reports... but nooo
ok.. sorry had to get that out
Will
|
|
|
|
|
> Not sure if this is in the correct forum
The soapbox dude.
If your admin has an issue with Crystal Report running over the network you can run it on the local machine.
Alex Korchemniy
|
|
|
|
|
|
OMalleyW wrote:
Life would be so much easier if our Admin would let us use
SqlServer Reporting Services or Crystal Reports... but nooo
Sounds like you need a new Admin.
In this situation. I'd cost up the project costs of developing reports without SQL RS or Crystal Reports and cost up developing with reporting software. Then go above the admins head and talk to somebody who can make a better choice.
Michael
CP Blog [^]
|
|
|
|
|
Hello friends
I am newbie in C#,been working on it for few weeks and very excited after working on it,things ve become easier with it which were difficult in past(coding in VC++)
i want to ask that is there anyway to use MSN API for the development of MSN Plugin?any help regarding that? beside this is it possible to customize "TOAST"?
Thanks
|
|
|
|
|
kadnan wrote:
i want to ask that is there anyway to use MSN API for the development of MSN Plugin?
If you simply want to hook into MSN Messenger, you can use tlbimp.exe[^] to generate an interop assembly which will give you access to their exposed classes and interfaces to program against. Are you looking to attach your "plugin" into the MSN Messenger client UI or just use some of their exposed API's?
- Nick Parker My Blog | My Articles
|
|
|
|