Does anyone know of any way of calling functions in a VB6 exe, from code in C#? Is this even possble? I don't know much (if anything!) about VB6 so I'm a bit confused. I've managed to call functions in a VB6 dll, but is the same thing possible with exe's too?
As always, any help at all would be greatly appreciated!
Nope. VB6 .EXE's don't support export functions, so you there's really nothing to call. .DLL's on the other hand, you've already found out.
The only exception to this would be if the VB6 .EXE is an ActiveX Server, which has all kinds of exports, just like any other COM-based assembly. Just add a COM reference to your .EXE and you're just about all set.
Hi all, I'm using component WebBrowser in my Windows Forms application (Framework 2.0), thus I need to block WebBrowser shortcuts (such as F5).
When I set WebBrowserShortcutsEnabled property to false, all shortcuts are blocked, but also it blockes "Delete" key.
Is there simple way to block "F5" without blocking "Delete"?
i have an application that i am trying to 'port' to be more usable by accessing properties via the prop grid in VS IDE.
i have a function in my component that needs two callback functions (which the component provides delegates for) which it calls in the owning application to get/set a string in that application, how can i allow the programmer to select these functions through the property grid?
if i set the type of the property to the delegate, the propertygrid makes it readonly.
i have provided sample bare code to illustrate the calling applications functions
i would like to move the delegate declarations into designer generated code.
this.updater1.GetProductVersionFunction = new AutoUpdate.UpdateClient.GetVersionString(GetApplicationVersion);
this.updater1.SetProductVersionFunction = new AutoUpdate.UpdateClient.GetVersionString(SetApplicationVersion);
// returns current app version from somewherereturn"version";
// set app version string here
UITypeEditor is the answer. For every type you can define an editor which should be shown when it is edited in the property grid. Normally the property grid resolves one of the inbuilt ones which can edit the type but in case of a delegate it just doesn't find one. So you have to built one on your own. In general you 'just' have to inherit from UITypeEditor and mark the delegate with this class (Editor attribute)). This can become very tricky. I would recommend to use Reflector to look at one of the inbuild editors (DockStyle and DockEditor are probably a good one to start). You could also look into this[^] because it deals with this topic.
Edit: To be honest I never tried this with a delegate. I hope there are no limitations in regard to this. If yes you would have to provide a wrapper class for the delegate.
Not to sure, but I think the property grid relies on the existance of a System.ComponentModel.Design.IEventBindingService service. To do that u need to:
1. Implement the interface yourself.
2. Add it to the IServiceProvider
NOTE: if u doing this at runtime, then you will likely need to provide all the design time services yourself.
I want to make a program that can create and unpack a encoded '.rar' or '.zip' document.
I have found a dll to download from rarlab.com, but it will not allow to unrar files with password.
Does anyone know where an good article about using the encoded '.rar' and '.zip' documents, or does anyone know where to get a freeware dll which already contain the functions with pack and unpack files with password.