|
Sprinkle liberally with cheese and enjoy.
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
Do you know where I can get the whole gamut of Shell and OLE interfaces (like IOLEWindow, IViewObject, IContextMenu, IPersistStorage, etc.) in C# definitions?
I could write them myself, but oh, what a time-saver it would be to already have them written!
THANKS!
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
I don't know if anyone has put all of them into a single place, but a majority of them may be covered by several articles in the Shell Programming[^] section.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
Thanks for the pointer. I'm working on an IE ToolBand, and there happens to be a toolband sample which I didn't know about.
But I suppose I'll just have to write a bunch of interface defs myself for all the others.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Is there anyway to fool the compiler into working with an Interop library with a strong name? I am receiving the following error when trying to compile my app and sign it.
Assembly generation failed -- Referenced assembly 'Interop.WIALib' does not have a strong name
Thanks,
Steven
|
|
|
|
|
Nevermind guys, I found it. It was listed under the C# Project Options called: "Wrapper Assembly Key File."
Thanks,
Steven
|
|
|
|
|
Ok,
I built a pretty cool app for my company to use, and now I'm trying to deploy the .exe file to other users.
I've copied that file over to another computer that does not have Visual Studio .NET 2003, and it won't run without a bunch of DLL files.
How do I build the distribution app? Or is there an easier way to do this?
Thanks!!
-ed
|
|
|
|
|
You can use VisualStudio itself to build installers fairly easliy. Check out the C# Today tutorial:
http://www.csharptoday.com/content.asp?id=1691
|
|
|
|
|
You need to download and install the .net runtime on the target computer. There is no way around this.
Also, assuming you have the help installed, do a search on 'Setup Project'. You will find a few walkthroughs that show you the basics of deployment.
Hey don't worry, I can handle it. I took something. I can see things no one else can see. Why are you dressed like that?
- Jack Burton
|
|
|
|
|
|
I'm going to have to tell C# that the HRESULT is an int, so I can do my own return value.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
I'm trying to find if a bit is set in a mask.
The code:
if(pdbi.dwMask & olelib.DESKBANDINFO_Masks.DBIM_TITLE)
gets an error:
error CS0029: Cannot implicitly convert type 'olelib.DESKBANDINFO_Masks' to 'bool'
and the code:
if(pdbi.dwMask & (int)olelib.DESKBANDINFO_Masks.DBIM_TITLE)
gets an error:
error CS0029: Operator '&' cannot be applied to operands of type 'olelib.DESKBANDINFO_Masks' and 'int'
Could someone kindly explain how to get around this?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
To make myself more clear, 'olelib.DESKBANDINFO_Masks' is an int Enum.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Don't know for sure, but I think you need to have the Flags attribute on the olelib.DESKBANDINFO_Masks enum.
- monrobot13
|
|
|
|
|
Found out it had nothing to do with that. That line of code should be:
if(!((pdbi.dwMask & olelib.DESKBANDINFO_Masks.DBIM_TITLE)==0))
I clean forgot that in C#, true is -1 !!!!
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
I clean forgot that in C#, true is -1 !!!!
Its not that true is -1, in C# you cannot implicitly convert from an int to a bool. While pdbi.dwMask & olelib.DESKBANDINFO_Masks.DBIM_TITLE may result in a non-zero value; the if statement requires a bool. Which is why simply comparing that result to zero works, the comparison produces a bool which the if statement can deal with.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
Is there a way to get a tab page change event (or any event for that matter) to fire when you click the "tab" portion of the tab page...??? All the events I've tried seem to need a click in the tab page body in order to fire...
I need to be able to do some "init" coding on tab pages as soon as the tab label is clicked, without having to first click in the tab page body, and I'm wondering if anyone has some advice as to how this can be done...
thanks.
|
|
|
|
|
You can use the SelectedIndexChanged event of the TabControl. This event fires whenever the selected tab page changes. The selectedindex property of the TabControl will be the page that was selected (0 based).
- monrobot13
|
|
|
|
|
Yo,
thanks for the clue, that's what I was looking for....
I owe you a beverage...
|
|
|
|
|
Is there any easy way to get the width of a font? I see that I can use the ToLogFont method or the Font class and then use the lfWidth member of the LOGFONT structure to get the width, but there has to be an easier way. Am I wrong? If there is no easier way how would I use the ToLogFont method?
Thanks
- monrobot13
|
|
|
|
|
Well, with the windows API, you use GetTextMetrics. There should be a wrapper for this API in .NET. Just keep looking!
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
I think what you're looking for here is the Graphics.MeasureString() method
|
|
|
|
|
Hey all
i've got a small app that creates several Rectangle objects as part of its constructor code. These are then used later as bounding rectangles for hit testing of lines. This works very well for my needs ... the problem is when i scroll vertically the rectangles no londer bound the correct area!! i've tried creating a seperate function(which i called in my paint handler) which re-initialises the Rects to the original co-ords plus AutoScrollPosition.X and Y. .... this doesn't seem to have any effect though!!! i guess i'm calling the function from the wrong place but is there an event that's triggered by scrolling as in OnScroll for ex.
If anyone has any ideas i'd love to hear them
thanks
Paul
Paul Griffin
|
|
|
|
|
my first thought is rememeber that Rects are structs...
so bob.rect = new Rectangle(1,2,3,4); is fine, but
bob.rect.x = 1; will not work...
as Rectangles are stuctures they are copy by value.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Ya your right but i don't actually attempt anything like that luckily
what i try to do is add the scroll position offsets to the Rect dimensions by creating entirely new rects but of the same name.
the trouble is when to do this ... that's why i was hoping there might be some event triggered by the scrolling
Paul Griffin
|
|
|
|