Recent

Author Topic: How do I import OCX / ActiveX Control  (Read 51895 times)

bambamns

  • Full Member
  • ***
  • Posts: 223
Re: How do I import OCX / ActiveX Control
« Reply #30 on: May 02, 2012, 07:45:01 pm »
Thank you ludob , everything is working like it has to bee.

This is 100% substitute for Delphi TWebBrowser (on windows of course).
Lazarus 1.8.4 + FPC 2.6.4 x86 (rebuild) and Lazarus 2.0, Windows 7 x64, unless otherwise specified

ludob

  • Hero Member
  • *****
  • Posts: 1173
Re: How do I import OCX / ActiveX Control
« Reply #31 on: May 02, 2012, 08:26:58 pm »
Today I tested the daily build installing in another directory. When I started it, I correctly configured the paths.

The LazActiveX module was checked and the Lazarus IDE compiled without problems, but any applications that I started with it trowed a SIGILL on start. I don't know the exact cause.
Do you mean that even a new application (empty form) would crash?

Rocky

  • New member
  • *
  • Posts: 8
Re: How do I import OCX / ActiveX Control
« Reply #32 on: May 02, 2012, 09:00:47 pm »
Yes.

On the Lazarus release, the application starts with a SIGSEGV but can continue. Maybe it's my test computer. I should clean everything and install only the testbuild to see.

Timewarp

  • Full Member
  • ***
  • Posts: 144
Re: How do I import OCX / ActiveX Control
« Reply #33 on: May 11, 2012, 05:16:29 pm »
Thanks for update. This seems much better than using atl.

My Delphi soft uses InternetSecurityManager interface http://msdn.microsoft.com/en-us/library/ms537130(v=vs.85).aspx to block javascript from specified urls. I implemented that to shell.explorer, I can add small sample, if anyone interrested.

bambamns

  • Full Member
  • ***
  • Posts: 223
Re: How do I import OCX / ActiveX Control
« Reply #34 on: May 27, 2012, 02:44:06 pm »
Is there any way to use this ActiveX http://wiki.freepascal.org/LazActiveX#TActiveXContainer_early_binding for WinCE (WM 6.5 - WebBrowser) ?
« Last Edit: May 27, 2012, 08:17:46 pm by bambamns »
Lazarus 1.8.4 + FPC 2.6.4 x86 (rebuild) and Lazarus 2.0, Windows 7 x64, unless otherwise specified

Timewarp

  • Full Member
  • ***
  • Posts: 144
Re: How do I import OCX / ActiveX Control
« Reply #35 on: June 04, 2012, 08:39:45 pm »
Here is two pieces of code, maybe useful to someone else too?!

Need to drop activexcontainer1, edit1, and button1 to form and assign formshow and button1click events.

InternetSecurityManager, ProcessUrlAction: Every action is disallowed, if url contains word "google". (You should notice google autocomplete is disabled)

********

IDocHostUIHandler and CoInternetSetFeatureEnabled

Function TranslateUrl: Try navigate to "google", it goes to http://lazarus.freepascal.org

CoInternetSetFeatureEnabled: Navigation sounds are disabled.

z505

  • New Member
  • *
  • Posts: 38
  • think first, code after
Re: how do i import ocx
« Reply #36 on: June 13, 2016, 09:05:02 pm »
No one has made  more Windows features obsolete than Microsoft. This addiction to making code non portable even between the many Microsoft platforms is in part the encouragement for alternative solutions like Lazarus.

I know this is a 6 year old post however, can you give some examples of what Microsoft has made obsolete and encouraged to be obsolete? Microsoft is well known for purposely making 10 year old software work on their platforms, they even went in and modified the operating system to work around bugs that other developers created who have nothing to do with microsoft (third party apps).

The whole blog, titled "Old New Thing" describes all the efforts Microsoft has made to make old things work on new things.. (hence blog title)

Quote From Joel Spolsky:
"The Old New Thing is chock-full of detailed technical stories about why certain things are the way they are in Windows, even silly things, which turn out to have very good reasons.

The most impressive things to read on Raymond's weblog are the stories of the incredible efforts the Windows team has made over the years to support backwards compatibility:


I first heard about this from one of the developers of the hit game SimCity, who told me that there was a critical bug in his application: it used memory right after freeing it, a major no-no"
...
..."The testers on the Windows team were going through various popular applications, testing them to make sure they worked OK, but SimCity kept crashing. They reported this to the Windows developers, who disassembled SimCity, stepped through it in a debugger, found the bug, and added special code that checked if SimCity was running, and if it did, ran the memory allocator in a special mode in which you could still use memory after freeing it."


Quote
Much work is done in Lazarus to mediate the penchant for Microsoft to make portability insecure.

One thing I can think of that Microsoft made non portable is old Visual Basic IDE which is no longer in use and people have to change over to .Net.  But if Microsoft really wanted to tick off developers, it would make the Win32 API obsolete, which people still use now... over 20 years later after it was originally developed.  To have an API like win32 last 20 years, and people still create brand new projects using the winapi 20 years later... is pretty impressive with today's throwaway software attitude.

Complaining about microsoft is easy...  but look at all the things that break with apt-get debian or other unix issues.  It's easier to complain about one system, and ignore the problems of your own system. As an example, MacOSX is no better... they made all their old MacOS apps incompatible with the newer OSX.  Easier said than done, to make things all backwards compatible. Sometimes a fresh start is best... Such as deleting all unix and windows systems off the planet and creating a good OS from scratch.  Plan9 tried, and failed...


« Last Edit: June 13, 2016, 09:12:36 pm by z505 »
think first, code after