locked
Checking whether FM20.DLL is installed RRS feed

  • Question

  • How could I check whether FM20.DLL was installed and registered?

    My little program needs to use some of its ActiveX text controls...


    Friday, March 13, 2015 2:15 PM

Answers

  • http://support.microsoft.com/de-de/kb/224305/en-us

    The use of these Microsoft Forms components in your own compiled applications, such as those written with Microsoft Visual C++ and Microsoft Visual Basic, is not recommended or supported. These controls were designed and tested to work exclusively within Microsoft Office and its Visual Basic for Applications environment.

    So even if it works, it's not recommended to make use of these controls outside of Office.

    Bye, Olaf.



    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

    Saturday, March 14, 2015 9:54 AM
  • >Anyway, how could I check whether FM20.DLL was registered?
    >By attempting to create an ActiveX object in FM20.DLL and watch for a fatal error?

    Well, either that, or simply install the Microsoft ActiveX Control Pad mentioned in KB224305

    Isn't it better to be sure the controls exist than just checking, whether they are missing?

    Besides that, the Webbrowser control offers all HTML form controls, which support UTF-8 or Unicode, if you set up the html encoding correct.

    It's not new VFP doesn't support Unicode and you used VFP quite a long time, as far as I remember you even from the nntp newsgroups. So did you use the Forms 2.0 Controls all this time, or what did you use?

    VFP friendly ActiveX controls are dbi or exontrol, besides chillkat is VFP aware. I didn't need many ActiveX controls in my life and so the question could rather be answered by yourself as you'll have the constant need to support Unicode.

    Bye, Olaf.


    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

    Saturday, March 14, 2015 12:58 PM
  • See https://west-wind.com/presentations/shellapi/shellapi.asp

    Bye, Olaf.


    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

    Monday, March 16, 2015 7:18 AM
  • OTOH, I found that FM20.DLL was not removed when I uninstalled Office 2007 from a notebook computer. It's a Windows 8.1 PC. Is FM20.DLL also a part of the dotNet Framework?

    No. And I don't see the logic in your observation. Do you think everything, which remains after a deinstall is part of dotNet Framework? Who teached you that?

    Ask Microsoft why the DLL remains. My guess would be, as you can embed Forms inot documents, it must remain for your documents to work. In the same way the uninstall doesn't remove all your docx, etc.

    Have you ever heard of a Philipine company called ActiveX Factory?

    No.


    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

    Monday, March 16, 2015 7:38 AM
  • This could be a strategy to migrate away from VFP, yes. In the end you'll only need a browser.

    But the article also shows how you can bind to events and get at controls and their values, so you could also just host a unicode textbox in a webbrowser control, not the whole form. Seems inappropriate? Well, every ActiveX control also is a form with window handle, so why not?

    Bye, Olaf.


    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

    • Marked as answer by Carl Cai Monday, March 23, 2015 8:27 AM
    Thursday, March 19, 2015 6:30 AM
  • OK  I finally found a proper routine to do it:

    http://www.tek-tips.com/faqs.cfm?fid=6069

    I haven't fully tested the codes thoroughly, though.

    Declare Integer LoadLibrary In kernel32;     STRING lpLibFileName Declare Integer FreeLibrary In kernel32;     INTEGER hLibModule ?isDLLAvailable('cdosys.dll')

    Function isDLLAvailable(DllFilename)     Local hModule     hModule = LoadLibrary(DllFilename)     If hModule > 32         FreeLibrary(hModule)         lRetval = .T.     Else         lRetVal = .F.     ENDIF     RETURN lRetVal Endfunc



    • Edited by Man-wai Chang Wednesday, September 9, 2015 4:04 PM
    • Marked as answer by Man-wai Chang Wednesday, September 9, 2015 4:07 PM
    Wednesday, September 9, 2015 4:03 PM

All replies

  • http://support.microsoft.com/de-de/kb/224305/en-us

    The use of these Microsoft Forms components in your own compiled applications, such as those written with Microsoft Visual C++ and Microsoft Visual Basic, is not recommended or supported. These controls were designed and tested to work exclusively within Microsoft Office and its Visual Basic for Applications environment.

    So even if it works, it's not recommended to make use of these controls outside of Office.

    Bye, Olaf.



    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

    Saturday, March 14, 2015 9:54 AM
  • http://support.microsoft.com/de-de/kb/224305/en-us

    So even if it works, it's not recommended to make use of these controls outside of Office.

    Thanks! But FM20.DLL ActiveX controls support Unicode. So I am using them in my little program.

    Anyway, how could I check whether FM20.DLL was registered?

    By attempting to create an ActiveX object in FM20.DLL and watch for a fatal error?

    Lastly, is there a cheap if not free 3rd-party ActiveX textbox control that supports Unicode?

    Saturday, March 14, 2015 12:29 PM
  • >Anyway, how could I check whether FM20.DLL was registered?
    >By attempting to create an ActiveX object in FM20.DLL and watch for a fatal error?

    Well, either that, or simply install the Microsoft ActiveX Control Pad mentioned in KB224305

    Isn't it better to be sure the controls exist than just checking, whether they are missing?

    Besides that, the Webbrowser control offers all HTML form controls, which support UTF-8 or Unicode, if you set up the html encoding correct.

    It's not new VFP doesn't support Unicode and you used VFP quite a long time, as far as I remember you even from the nntp newsgroups. So did you use the Forms 2.0 Controls all this time, or what did you use?

    VFP friendly ActiveX controls are dbi or exontrol, besides chillkat is VFP aware. I didn't need many ActiveX controls in my life and so the question could rather be answered by yourself as you'll have the constant need to support Unicode.

    Bye, Olaf.


    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

    Saturday, March 14, 2015 12:58 PM
  • Well, either that, or simply install the Microsoft ActiveX Control Pad mentioned in KB224305. Isn't it better to be sure the controls exist than just checking, whether they are missing?

    I would like to thisform.ADDOBJECT() a different textbox class depending on the availability of FM20.DLL. I think I should just check for fatal errors then, which is a simple solution.

    OTOH, I found that FM20.DLL was not removed when I uninstalled Office 2007 from a notebook computer. It's a Windows 8.1 PC. Is FM20.DLL also a part of the dotNet Framework?

    Besides that, the Webbrowser control offers all HTML form controls, which support UTF-8 or Unicode, if you set up the html encoding correct.

    How do you insert a HTML form into a Foxpro form? How do you exchange information with the objects in the web browser control? A elaborate example would be helpful.

    It's not new VFP doesn't support Unicode and you used VFP quite a long time, as far as I remember you even from the nntp newsgroups. So did you use the Forms 2.0 Controls all this time, or what did you use?

    My honor! It's just my little Foxpro program to enter Chinese using Cantonese input method. So I would like to use the simplest method.

    VFP friendly ActiveX controls are dbi or exontrol, besides chillkat is VFP aware. I didn't need many ActiveX controls in my life ....

    Thanks! Will look them up!

    BTW, Have you ever heard of a Philipine company called ActiveX Factory?


    Sunday, March 15, 2015 5:15 PM
  • See https://west-wind.com/presentations/shellapi/shellapi.asp

    Bye, Olaf.


    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

    Monday, March 16, 2015 7:18 AM
  • OTOH, I found that FM20.DLL was not removed when I uninstalled Office 2007 from a notebook computer. It's a Windows 8.1 PC. Is FM20.DLL also a part of the dotNet Framework?

    No. And I don't see the logic in your observation. Do you think everything, which remains after a deinstall is part of dotNet Framework? Who teached you that?

    Ask Microsoft why the DLL remains. My guess would be, as you can embed Forms inot documents, it must remain for your documents to work. In the same way the uninstall doesn't remove all your docx, etc.

    Have you ever heard of a Philipine company called ActiveX Factory?

    No.


    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

    Monday, March 16, 2015 7:38 AM
  • Tuesday, March 17, 2015 6:11 AM
  • Hi,

    On your question:

    How do you insert a HTML form into a Foxpro form? How do you exchange information with the objects in the web browser control? A elaborate example would be helpful.

    Please study the solution samples.

    Type in your command window:

    DO "c:\program files (x86)\microsoft visual foxpro 9\samples\solution\main.prg"

    now open the form and look for Foundation Classes -> Create a Visual FoxPro web browser

    Regards,

    KoenP

    Tuesday, March 17, 2015 4:06 PM
  • Type in your command window:

    DO "c:\program files (x86)\microsoft visual foxpro 9\samples\solution\main.prg"
    now open the form and look for Foundation Classes -> Create a Visual FoxPro web browser

    Bad news, for this way of using the IE ActiveX control:

    Microsoft is killing off the Internet Explorer brand
    http://www.theverge.com/2015/3/17/8230631/microsoft-is-killing-off-the-internet-explorer-bran

    Tuesday, March 17, 2015 6:09 PM
  • Ask Microsoft why the DLL remains. My guess would be, as you can embed Forms inot documents, it must remain for your documents to work. In the same way the uninstall doesn't remove all your docx, etc.
    It seems that this leftover "bug?" could be dated back to the days of Office 97....
    Tuesday, March 17, 2015 6:12 PM
  • See https://west-wind.com/presentations/shellapi/shellapi.asp

    Bye, Olaf.


    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de


    On second thought. why bother using Foxpro as a bridge to a web-based application? I knew the Foxpro bridge could serve some purposes, but then, it's still just a window to a 100% web application, which could be done with PHP, MySQL and AJAX.....
    Tuesday, March 17, 2015 6:14 PM
  • This could be a strategy to migrate away from VFP, yes. In the end you'll only need a browser.

    But the article also shows how you can bind to events and get at controls and their values, so you could also just host a unicode textbox in a webbrowser control, not the whole form. Seems inappropriate? Well, every ActiveX control also is a form with window handle, so why not?

    Bye, Olaf.


    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

    • Marked as answer by Carl Cai Monday, March 23, 2015 8:27 AM
    Thursday, March 19, 2015 6:30 AM
  • OK  I finally found a proper routine to do it:

    http://www.tek-tips.com/faqs.cfm?fid=6069

    I haven't fully tested the codes thoroughly, though.

    Declare Integer LoadLibrary In kernel32;     STRING lpLibFileName Declare Integer FreeLibrary In kernel32;     INTEGER hLibModule ?isDLLAvailable('cdosys.dll')

    Function isDLLAvailable(DllFilename)     Local hModule     hModule = LoadLibrary(DllFilename)     If hModule > 32         FreeLibrary(hModule)         lRetval = .T.     Else         lRetVal = .F.     ENDIF     RETURN lRetVal Endfunc



    • Edited by Man-wai Chang Wednesday, September 9, 2015 4:04 PM
    • Marked as answer by Man-wai Chang Wednesday, September 9, 2015 4:07 PM
    Wednesday, September 9, 2015 4:03 PM