|
|
I have written an Outlook Add-In that has a number of buttons on it as well as a popup menu and the strangest thing is happening.
When debugging the Add-In with Outlook loaded as the debugging application, the buttons load and all of their respective click handlers work. For now each has a "Hello world" type message when it is clicked.
If I leave Outlook running for a few minutes all of the handlers except one stop working!!!
Anyone got a bright idea why this would happen?
|
|
|
|
|
Wild guess, but maybe, just maybe, there is some remoting going on and the server object's lease gets expired? I don't know how you can control that though.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi.
I am new to the .NET Framework and to the Enterprise Library. I was wondering if the Enterprise Library facilitates developers in implementing different acces levels, e.g.: an administrator will be able to view usernames&passwords, while a customer in the development department will not have such access.
Thank you,
Elena
|
|
|
|
|
I might have misunderstood how to use the enum, but this is what i want to do. I would like to have a Font class with an enum in it for different fonts, so all you would have to do to access the font would be to type MyFont.Fonts.CoolFont;
Now when I try to do this enum I can't get around the fact that it needs to be of a certain type.
But I'm pretty sure that you can store any object in the enum. So how do I do this?
|
|
|
|
|
No thats not possible with an enum. Enums can only contain certain numeric values. To do something like you want you will need a class with some static fields/properties:
public class MyFonts {
public static Font CoolFont = new Font("Blubb", 10);
public static Font NastyFont = new Font("Courier", 14);
}
This is only a sample. Instead of public fields you should make properties with some kind of factory behind them (instantiate them when you need them).
|
|
|
|
|
I found an articles:
http://www.codeproject.com/csharp/DocumentatorMacros.asp
It really cool by providing mechanism to faster the code writing process.
But I want more: when you type some characters, it will suggest some keywords that might fit your need.
For example, type "p", so it show a list of "public, private, protected, ..."
So how do I get start?
By the way, can it be done in C#?
|
|
|
|
|
I'm trying to measure a string for printing on a printer using System.Drawing.Printing. Because I need to adjust the layout dynamically, I need to measure strings to calculate the page sizes and such before I actually get to printing the pages.
Here's the catch: I don't have a Graphics object to measure the string with until I'm actually processing a page for printing!
Is there any way to measure strings without a Graphics object, or a way to get a Graphics object (at least temporarily) for printing, before the PrintPage events?
Thanks in advance.
|
|
|
|
|
I just found something really cool!
PrintDocument.PrinterSettings.CreateMeasurementGraphics() does EXACTLY what I need!
|
|
|
|
|
Helo
Need Help,Iam new to c#,
How can i merge columns and rows in Data Grid Same like Vb6. flex grid.
|
|
|
|
|
I need a way to create a hook that moniters both the mouse and keyboard input globally. Any ideas.
Using C#
I have seen some other articles, but they are much more complex than I need.
All I really need the program to report is the mouse's coordinates(x,y) and ANY key that is pressed, including Ctrl+S or whatever.
Thanks for any help or guidance.
|
|
|
|
|
What about This. It hook the keyboard, and mouse event as well.
|
|
|
|
|
My application allow user press Ctrl + S to save changes to document.
But how can I get this event?
|
|
|
|
|
You can subscribe to your form's KeyDown event. Then using the KeyEventArgs parameter to parse out what key was pressed.
If for some reason this isn't enough information for you, just let me know.
/\ |_ E X E GG
|
|
|
|
|
You can find a lot of example, and complete code/components in Here
|
|
|
|
|
Use the Shortcut property of the menu item in your main menu. That way it'll show up there too.
If you have a main menu, that is.
|
|
|
|
|
I think we have to check if the S is press while Ctrl is pressing.
It confuse me!
|
|
|
|
|
There's a setting in the main menu object properties that lets you choose from like a hundred different key combinations, Ctrl+S is one of them.
Otherwise, you can set a KeyDown event, and do this:
<br />
private void Form1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)<br />
{<br />
<br />
if(e.Modifiers == Keys.Control && e.KeyCode == Keys.S)<br />
{<br />
}<br />
}<br />
<br />
|
|
|
|
|
reinux, thank you for your helping.
I think that is what I need.
|
|
|
|
|
I'm trying to implement a module that transmits custom objects through net(between tcp clients), I'm familiar with such thing in Java(ObjectInputStream and ObjectOutputStream). My question is: is there are something like that in C# and how to use it?
Thanx in advance, Evgeny
evgenyus
|
|
|
|
|
Yes there is. Look for the System.Runtime.Serialization namespace. There you'll find a BinaryFormatter and a SoapFormatter class for serializing the objects. You can then use the NetworkStream to transfer them over. Something like
using System.Runtime.Serialization.Formatters;
void SendObject(object o, Stream s)
{
new BinaryFormatter.Serialize(o, s);
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I have a .gif I downloaded off the net as an Image type in my code. How can I take that and have it displayed as the icon for my NotifyIcon.Icon ?
/\ |_ E X E GG
|
|
|
|
|
Bitmap b = new Bitmap("filename.gif");
b.Save("d:\newname.ico",System.Drawing.Imaging.ImageFormat.Icon);
Icon c = new Icon("d:\newname.ico");
this.notifyIcon1.Icon = c;
|
|
|
|
|
Have you actually tried this, because I think I did something exactly like that and it didn't work.
/\ |_ E X E GG
|
|
|
|
|
Why? what was the problem? Maybe try convert that .gif to .ico with some application?
David
|
|
|
|