|
Yes you can. See http://www.microsoft.com/sql/msde/[^] for more information. Basically, if you obtained MSDE through Office Developer, Visual Studio, or several other products, you can redistribute it. The link above and the readme files in the distribution discuss ways of redistributing it using the Windows Installer merge modules, or to bootstrap your application to install an MSI (there are 18 - each one corresponding to one of the 18 instances that can run simultaneously so make upgrading your application easier (just keep using the same named file with each new version of the MSDE).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I am trying to use the "New Project Dialog Box" into my Application .I want it to work like the way it works in VS 7 i.e. when i click the file menu New >New Project i want the New Project Dialog Box to open up.
But the Kinds of Projects /Templates (which i inted to develop later) will be different or specific/modified to the application that i am developing.
Can somebody please advise me/ direct me to a code snippet,so that i can use this object/compnent into my Application.
Rajn
|
|
|
|
|
You can't reuse that dialog because it's in a separate application, so just create your own form and add all the logic yourself. VS.NET searches certain directories for wizard files, reads the information from those and builds a list. Just do the same thing. It's not like it'd be hard to create a similar form for your application.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thank You Stewart,I'll follow your guidelines.If i have any problems doing it i'll post the questions on the forum.
Thank You again
Rajnp
|
|
|
|
|
Hello
í want to fill out a html formular on a html webpage using c#
i use a normal webbrowser component to view the site
and then i want to fill out the fields of a fomular by click a button or anything else
could someone help me?
cia buzdaman
|
|
|
|
|
You mean "form"?
So what's the problem? Have you actually tried doing this? It isn't hard, but you're definitely not going to get anyone here to just do it for you.
For simple drag-n-drop "programming", customize your toolbox in VS.NET and add the Microsoft Web Browser control. Drag that on your form. Then you'll have to reference the Microsoft.mshtml.dll assembly in your project and use the WebBrowser.Document property to get a reference to the IHTMLDocument2 interface, which you can then use to access the MSHTML DOM and start assigning values to form elements. There are some examples on MSDN using the web browser control (hint, type "WebBrowser" in the search) and read the documentation for reusing the WebBrowser control at http://msdn.microsoft.com/workshop/browser/prog_browser_node_entry.asp[^].
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
|
I have a large pool of business objects all referencing one another in various ways.
In the client application I want to do something like
employee.Delete();
Behind the scenes, I want to remove all references to the object allowing it to be garbage collected. I then want to remove the physical representation of the object from persistance. Unless I have missed a scenario, the references to the object can be deleted in two ways
MyParentObject.EmployeeProp = null; or
MyEmployeeList.Remove(employee);
In order to do this, I have to maintain some kind of internal lists of these relationships.
My questions are --
1) Have I missed any other way that an object can be referenced?
2) Isn't there an easier way? Doesn't the GC already have this list somewhere?
Robert Zurer
robert@zurer.com
|
|
|
|
|
Technically, MyEmployeeList.Remove won't remove a reference to the object - it only removes the reference from a list. If a class references that particular object somewhere else, it still won't be GC'd.
One way you can do this - but you must have proper exception handling in place - is to dipose the object (make sure it implements IDisposable somewhere up the class hierarchy and call Dispose() on it). Components and controls are already disposable, as well as many other classes in the .NET BCL.
If another object tries referencing it then, an ObjectDisposedException will be thrown.
Unless you add a collection into which each referencing class must add itself (or, make your object to be referenced a ContextBoundObject and perform the registration yourself since you can intercept / handle even direct method calls and assignments), there is no way to get access to what the CLR knows about your app through managed code.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thank you again for your help.
No I can't throw and exception. What I want is to null the reference only, so IDisposable is not an option. I suppose I could catch the ObjectDisposedException exception and null the reference there, but I don't like that idea.
What I was looking for was a way to not have to manage these internal referencing lists. But I guess that is not to be.
Robert Zurer
robert@zurer.com
|
|
|
|
|
Catching it was my whole point - it's either that or manage the list of callers that reference it yourself as I also mentioned. Once again - you can't get access to the reference list through managed code. This pretty much defeats the purpose of the CLR managing the memory so you don't have to.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
bz - You are thinking about it too much. If you keep a list of yet more references to an object that you want to be destroyed it will never disappear.
Think un-C++, think dirty, think c#. Leave it null and let it be. That's all you are contracted to do memory management wise in C#.
I suggest that if you have it as part of a collection, you first remove the reference from the collection, and then nullify whatever else points to it (including the temp variable).
It's a pain, but you don't get much control over the GC, and MS would have you believe it's better that way.
If you've just done a big batch remove process, probably worth while calling GC.Collect.
It often takes two passes of the GC for the physical memory to be actually freed up though (first makes it a weak reference, second destroys).
/**********************************
Paul Evans, Dorset, UK.
Personal Homepage "EnjoySoftware" @
http://www.enjoysoftware.co.uk/
**********************************/
|
|
|
|
|
Thanks Paul,
As the song goes, maybe I think too much.
Anyway I wasn't so much concerned with making the GC work as I was maintaining consistency of data across the application. I just need to have a list of references to an object so that I can null them all. The framework I'm trying to develop needs this reference list for validation and updating objects as well.
|
|
|
|
|
Hello
I am using C# to create an mdi application. i have the parent form which has its own toolbar and file menu, and a child form that has it own file menu and toolbar. When l press a command button to show the child form l want the parent form's file menu and toolbar to be replaced by the childs.
I have found out how to replace the toolbar, just by making it invisible on the parent form. But l cannot not replace the parent's file menu with the childs file menu.
Many help in advance
Steve
|
|
|
|
|
I'm not too sure but there are some Merging options you can control. Perhaps an event fires to??? Good luck
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
The parent calls MergeMenu on its menu with the child Form's menu. Read the SDK documentation for Form.MergedMenu and read the current MSDN Online series about a document/view application in .NET by Chris Sells: http://msdn.microsoft.com/library/en-us/dnforms/html/winforms10162003.asp[^] (this is part 2 that discusses menu merging about half-way down the page).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Has anyone used the IUrlHistory Interfaces in C#? I've got working samples in C++, but cannot find any samples in C#. Yeah... You can probably guess my COM and Interop knowledge is not enough to build a class for myself!
Any samples or further reading (beyond MSDN) would be appreciated!
|
|
|
|
|
Dave Conn wrote:
You can probably guess my COM and Interop knowledge is not enough to build a class for myself!
Good sign to learn then! There are several articles here on CP, including a good one[^] by Nick Parker about it.
You don't actually have to wrap this interface yourself, though. You can use a little trick[^] where you create a typelib out of the urlhist.idl file, then use tlbimp.exe from the .NET SDK to create an interop assembly out of it. You can then either implement the class (if you're hosting the MSHTML control yourself or something) or get an instance to that interface in order to call methods on it. Tip: casting an object to an in interface in .NET is the same as QI'ing for it in COM (.NET does it under the covers).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi all,
I wonder if anyone can help with a problem I am having with an AddIn I am
writing for Visual Studio.NET
I am try to add a submenu to the Edit menu with two items in it.
I would assume this is done by creating a CommandBar of type
vsCommandBarTypeMenu and specifying the Edit menu as the parent, such as the
code below:
CommandBar EditMenu = (CommandBar)applicationObject.CommandBars["Edit"];<br />
.......<br />
.........<br />
CommandBar MySubMenu = (CommandBar)applicationObject.Commands.AddCommandBar("My Sub Menu", vsCommandBarType.vsCommandBarTypeMenu, EditMenu, 0);
However, when I try to add the CommandBar, a COMException is thrown with the
message "Class not registered. Looking for object with CLID {.........}".
What am I doing wrong here?
Regards,
Chris
|
|
|
|
|
|
Chris Morrison wrote:
However, when I try to add the CommandBar, a COMException is thrown with the
message "Class not registered. Looking for object with CLID {.........}".
It sounds as if the CLSID is not being found in the registry, thus it is not able to load the COM Server because it doesn't know it's location. Are you using a third-party component that hasn't been registered? If so, pull up a command prompt, navigate to the directory of your COM .dll and type the following:
regsvr32 "[YourComponent.dll]"
Not entirely sure this is your problem, however here are a few links that might be of some help:
COMException Class[^]
HRESULTs and Exceptions[^]
Nick Parker - DeveloperNotes.com
VB gets under people's skin because one can be ignorant of computer architecture and ASM and still
get a lot done. -Don Box
|
|
|
|
|
Nick Parker wrote:
Chris Morrison wrote:
However, when I try to add the CommandBar, a COMException is thrown with the
message "Class not registered. Looking for object with CLID {.........}".
It sounds as if the CLSID is not being found in the regisry, thus it is not able to load the COM Server because it doesn't know it's location. Are you using a third-party component that hasn't been registered? If so, pull up a command prompt, navigate to the directory of your COM .dll and type the following:
regsvr32 "[YourComponent.dll]"
That did not work and caused an error.
I would have thought that any registrations that were required would be performed when I build and debug the Add-In. Also I have added a floating toolbar to the IDE with no problems, and I can add new items directly to the Edit menu with out error, so I can't see why I am having problems adding a sub menu to it.
This is very strange.
Chris
|
|
|
|
|
Try running regasm.exe on your .NET assembly. It is equivalent to regsvr32.exe but is for managed assemblies. Since such assemblies do not export DllRegisterServer or DllUnregisterServer , regsvr32.exe is useless.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath Stewart wrote:
Since such assemblies do not export DllRegisterServer or DllUnregisterServer, regsvr32.exe is useless.
I would have suggested that but since it was throwing a COMException I figured it was due to a problem on the other side of the fence.
Oh well, it's the weekend after all.
-Nick Parker
VB gets under people's skin because one can be ignorant of computer architecture and ASM and still
get a lot done. -Don Box
|
|
|
|
|
VS.NET uses the DTE components via COM (even if written in managed code), so if it can't find the registered class (either because it wasn't registered correctly or because he moved the DLL after registering it) it would throw such a COMException .
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|