|
Bog,
I got to the same point that you did. I have IDocHostUIHandler implemented as well as ICustomDoc and my IPageClickHandler interface. I am also getting the 'not an instance of an object' error from my javascript.
I pulled my test page into VS7 and it does not expose a window.external method within the window object.
Did you figure out how to bind the javascript to the external interface? King Rufus seems to have fallen off the face of the earth and is not responding.
MJ
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
I've created a manifest and used flatstyle.system to get XP look and feel, but does anyone know how to get the XP downarrow onto the button (look and feel of the combobox button) or secondly a bit map (flatstyle.system ignores bitmaps)
Thanks
Steve
|
|
|
|
|
Hi,
Why don't you wrap some of the functions of the uxTheme.dll.
Then you will be able to draw any part of the themed stuff yourself.
If you want I can supply you some API's (there in VB though, but that shouldn't be the problem is it?)
greets,
Poolbeer
Speak Out! Use the Source, Luke!
(Dr. GUI .NET #5)
|
|
|
|
|
Sounds good, if you email me at Sovman@btinternet.com I'll have a look over the weekend.
Thanks
Steve
|
|
|
|
|
Does anyone know of a class for creating a standard click and drag select box?
This seems like it should be readily available but I can't seem to find it.
if not that, does anyone know how to draw with a pen or a brush that will show the inverse color of whatever is behind it?
thanks
JR
|
|
|
|
|
There are some methods in System.Windows.Forms.ControlPaint that look as though they might be useful (DrawReversibleFrame, DrawReversibleLine, FillReversibleRectangle), but I haven't tried them.
Chris Jobson
|
|
|
|
|
Has anyone succeeded in spawning a modeless dialog that stays on top of the main form, but that does not just stay on top of every window in the shell? That is, behaviour identical to Find/Replace dialogs in VS and Office.
In C++ this is routine, but in .Net I have failed when:
1) Setting dialog's TopLevel to false, and making dialog a child of main form. This only allows rendering the dialog within the client area of the main form, of course, since it is treated as a non-form child control.
2) Using Win32 API SetParent() and SetWindowPos() directly. The dialog freezes and paints garbage. CLR does not recognise Windows' way of setting parent-child relationships, I suspect, and proper message handling requires the dialog to be in the parent's collection.
I am investigating some wild hacks, but would appreciate it if anyone has insights on this.
TIA
|
|
|
|
|
Not sure if it's the right way, but the following works for me: Set the dialog's ShowInTaskBar property false, and after creating the dialog (in some method of the main form) call MainForm.AddOwnedForm(DialogForm).
Chris Jobson
|
|
|
|
|
Chris Jobson wrote:
Not sure if it's the right way
Going from memory, the docs for AddOwnedForm say that is what it does so I would say that is The Right Way™
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
Thanks for your support too, James.
Cheers
|
|
|
|
|
Thank you Chris, that's exactly what the doctor ordered It's a pleasure to have contributors such as yourself on CP.
Incredible that I overlooked that in the docs; probably scanned the protected methods too quickly, and got lost in keyword searches!
Cheers
|
|
|
|
|
I am trying to get an assembly compiled using the managed compiler and get the resulting class library strong named.
First I tried an explicite path to the file in the assembly. No go.
Now: the assembly info states that the strong name key must be relative to the project location....so I created the location in the assembly file as ..\..\keyfilename.snk and tried to have it find it.
I first tried just locating the strong name key file within the source files and then in the bin file and in both cases the key file is reported as not found by the compiler.
So next I added the path to my source in the /lib: switch for the compiler. This still ended with file not found.
Has anyone gotten a strong named compilation using the managed compiler and how did you get it to find the snk file ???
I am at wits end.
Thanks,
MJ
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
theRealCondor wrote:
..\..\keyfilename.snk
AssemblyKeyFile("..\\..\\mykey.snk")
Is it that simple a problem?
|
|
|
|
|
Robert,
I was shothanding here.
if ..\.. was actually entered into the assemblyinfo file, it would fail with a compile error and never attempt to compile the dll since \. is an invalid control character.
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
Just put every thing in the same directory and change the assembly.cs file to point to the current directory.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
lippie,
I had put the snKey file, and source files in one directory, and set
[assembly:AssemblyKeyFile("")] to the same directory name.
RESULT: key file could not be found
I had put the snKey file and source files in one directory and set
[assembly:AssemblyKeyFile("..\\..\\keyfile.snk")]
RESULT: key file could not be found
I had put the snKey file in the build directory and set the
[assembly:AssemblyKeyFile("..\\..\\\\keyfile.snk")]
RESULT: key file could not be found
I had put the snKey file in the build directory and directly pointed at
the build directory
RESULT: key file could not be found
I added a compile parameter /lib:"my souce library path"
RESULT: key file could not be found
I am about to put a shotgun in the mouth of the compiler and let it try and find it's brains after I pull the trigger !!!!!
I suspect that the little tidbit in AssemblyInfo where it goes after
%Project Directory%\obj\<configuration> that I am either
a) not getting %Project Directory% set
or b) I am still missing a directive to the compiler (which still goes back to a).
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
I finally got the managed compiler to create a strong named assembly.
What I had to do was as follows:
1) I did a File.Copy to move the SN Key from the selected directory to the
source directory. This was my choice but not necessary.
2) Instead of setting [AssemblyKeyName...]
I had to set [AssemblyKeyFile... and specified the fully qualified path.
[AssemblyKeyFile="D:\myApp\mySource\keyF.snk"]
3) Compile to your hearts content!!!! WOOHOO!
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
I want my program to be able to find a specified window, activate it, and send it keyboard commands. Kind of like a macro program. How would I code this?
|
|
|
|
|
Have a look at the WSH sendkeys functionality.
Not the only way though...
Davy
Blog for Software Testing, Bugs, Quality, Security and Stability - www.latedecember.com
News From Angus, Scotland - The Angus Blog
|
|
|
|
|
My application requires global variables in it(the variable that can be accessed from objects of any class in application).
How to implement such a feature ?
Thanks in advance
|
|
|
|
|
Create a class with static variables maybe... I dont think global variables are possible in C#.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Try something like this:
<br />
namespace MyGlobals<br />
{<br />
sealed public class DaysOfTheWeek<br />
{<br />
public static int nSunday = 0; <br />
public static int nMonday = 1;<br />
public static int nTuesday = 2;<br />
public static int nWednesday = 3;<br />
public static int nThursday = 4;<br />
public static int nFriday = 5;<br />
public static int nSaturday = 6; <br />
}<br />
}<br />
You can reference these variables by name (nMonday, nFriday, etc.) in your other files after adding the following line:
<br />
using MyGlobals.DaysOfTheWeek;<br />
Click here to see my articles and software tools
|
|
|
|
|
You could create an abstract super class that defines the variables that need to be global, then derive all of your classes from that one class.
Alternatively, If you don't need to update the value of the variable, then you could define it in a .config file, and then read the config file from the classes that need to access the variable. If you need to change it or share it between application types (web, windows, windows services, etc.), then define an XML document somewhere on your system and then read from and update it in the classes where you use it.
I'm sure there is probably a better way to do it, but this is my 2c.
RabidK
|
|
|
|
|
Vitaliy Vorontsov wrote:
My application requires global variables
BTW the politically correct name for a global variable is "Well Known Object"
|
|
|
|
|
Robert Hinrichs wrote:
BTW the politically correct name for a global variable is "Well Known Object"
Well said. And there are no global functions either, only statics, which preserve the purity of the OO paradigm.
Cheers
|
|
|
|