Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. arnoldw

    How do I call an instance method from an exported method in a MFC DLL?

    Thanks for your reply. I solved it like this: class CDllProblemApp... { ... MyClass myInstance; ... }; double _stdcall MyExportedMethod(double param) { theApp.myInstance.MethodIwouldLikeToInvoke(); return 0; }
  2. arnoldw

    Accessing USB-device: How to determine lpFileName in CreateFile call

    Many thanks for this most valuable link!
  3. arnoldw

    Accessing USB-device: How to determine lpFileName in CreateFile call

    I am trying to communicate (send and receive ASCII-characters) with a USB-barcode printer. In order to get a handle to the device I believe I have to call CreateFile and it has the following prototype: HANDLE WINAPI CreateFile( __in LPCTSTR lpFileName, __in DWORD dwDesiredAccess...
  4. arnoldw

    How can I get gotFocus events from a user form?

    Please see the lower part of my 28 Nov 07 4:13 post. If nobody comes up with a better suggestion, then I will use the appropriate events generated by all components on my form instead.
  5. arnoldw

    How can I get gotFocus events from a user form?

    Thanks for your suggestions. However, I would prefer to let the user freely switch between accessing the Excel sheet directly and accessing the user form, without having to push any buttons. Whenever the user wants to switch from accessing the Excel sheet to accessing the user form, he/she...
  6. arnoldw

    How can I get gotFocus events from a user form?

    No, UserForm_gotFocus() does not exist, I just used it in my previous post to easily explain what I needed. If the _gotFocus() sub routine existed, I wouldn't have started this thread.
  7. arnoldw

    How can I get gotFocus events from a user form?

    Thanks for your replies. ---------------------------------------------------------- nickdel: I have a user form with a textbox (among other components) in Excel. The user form is modeless so the user can switch between accessing the Excel sheet and the user form. Whenever the user form is...
  8. arnoldw

    How can I get gotFocus events from a user form?

    I have user form in a macro in Excel. I want the user form to generate gotFocus events when it gets focus. Is this possible?
  9. arnoldw

    How do I call an instance method from an exported method in a MFC DLL?

    I have created a dll in MFC using the Visual Studio wizard and the dll exports a function called MyExportedMethod: #include "stdafx.h" #include "DllProblem.h" BEGIN_MESSAGE_MAP(CDllProblemApp, CWinApp) END_MESSAGE_MAP() CDllProblemApp::CDllProblemApp() { } CDllProblemApp theApp; BOOL...
  10. arnoldw

    Office Add-in: Can Excel worksheet be parent of a Windows Form?

    Found the solution: http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.windowsforms/topic12117.aspx In order to make it work with Excel I made the following change: New code: IntPtr hwnd = Win32.FindWindow("XLMAIN", null); Old code: IntPtr hwnd = Win32.FindWindow("OpusApp"...
  11. arnoldw

    Office Add-in: Can Excel worksheet be parent of a Windows Form?

    I have created a Shared Office add-in for Excel. The add-in works great and in my C# code I create a Windows Form (System.Windows.Forms.Form). Can I make this Form be a child of the Excel window itself? Basically, I want to make sure the dialog is always on top of the Excel window.
  12. arnoldw

    How do I invoke methods in a custom made ActiveX component?

    Thanks for replying. I will try to clarify a bit. I used the following example as my starting point for the ActiveX component and it is still in progress: http://www.codeguru.com/cpp/com-tech/activex/controls/article.php/c5517/ I'm not sure if it is a COM component or not, the .ocx file gets...
  13. arnoldw

    How to write a very simple ActiveX component with a GUI

    I would like to write a very simple custom ActiveX component with one button and one checkbox on it. I will put this ActiveX component into a user form in an Excel macro and I want this ActiveX component to communicate (invoke methods and generate events) with the VBA code that embeds it, based...
  14. arnoldw

    How do I invoke methods in a custom made ActiveX component?

    I have written a custom ActiveX component and I inserted it into a user from in Excel. How do I go about to invoke methods that the ActiveX component exports? Also, how do I subscribe to events from the ActiveX component? If anybody could refer me to an online tutorial or provide snippets of...
  15. arnoldw

    ActiveX component written in C#

    I would like to write an ActiveX component in C#. I followed the following instructions: http://www.codeproject.com/cs/miscctrl/exposingdotnetcontrols.asp When I test this ActiveX component using tstcon32.exe, the component runs fine, with the exception that nothing happens when I invoke the...
  16. arnoldw

    Export method and create interrupts from a .NET Component

    Thanks! I can't believe it was that simple to export a method. I found out that the events works like this: using System; namespace EventExample { public delegate void EventHappenedDelegate(Double dValue); public class MyClass { public event EventHappenedDelegate...
  17. arnoldw

    Export method and create interrupts from a .NET Component

    I have created a custom made .NET Component (in Visual Studio .NET 2003) that contains a regular button and a checkbox. I build a .dll file and then use the .NET Component in a LabVIEW application. In LabVIEW I can get a long list of methods that the .NET Component supports (BeginInvoke(Delegate...

Part and Inventory Search

Back
Top