Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Activex Events

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Activex Events

    I have an ActiveX control that I've added to my form.

    I can see the ActiveXEvents, but when I add code to them, it appears as though they don't execute. I add for example a msgbox, and it never appears.

    Could I be doing something wrong?? Do certain ActiveX controls have problems with the events??

    Alan

    #2
    Re: Activex Events

    Hi Alan,

    The difficulty in using ActiveX controls with Alpha Five is that when they don't work, is it an Alpha Five issue or a activeX vendor issue? The other challenge is that I have yet to find a vendor that offers sample XBasic code, everything is C, Visual Basic, .net

    You may find the attachment of interest. It shows my experience yesterday of using two controls from Codejock software: an Outlook style calendar and datepicker.

    Both of these controls work fine when used with Microsoft Access 2003.

    However, when used with Alpha Five, problems are encountered.

    In summary, the two controls work fine with Microsoft Access,
    one of them works fine with Alpha Five and one of them does not. My example uses A5V9 buttons with very simple OnPush events.

    I think you will be impressed by how little effort is required to upgrade the appearance of your application with these tools. The XBasic statements are simpler than the corresponding Visual Basic.

    I have submitted the attached to Codejock to get their reaction, and if not their problem, ask them to specify what Alpha needs to do to expose all of the control's properties. My example shows that if the property is not exposed, your XBasic code will do nothing.

    Bob McGaffic
    Pittsburgh
    Last edited by rmcgaffic; 08-28-2008, 05:12 PM.

    Comment


      #3
      Re: Activex Events

      Alan,

      I have had the same problems with a lot of ActiveX TWAIN-devices I've tested. Alpha Five does handle some ActiveX objects not properly. It depends on the language they were programmed in and how they were programmed. A lot of Delphi types woes but also real Visual Studio types do the same. I've seen strange things when I tried to embed the ActiveX on forms, even total crashes of A5. If the box doesn't show right at the time you put it on the form you must be very careful.

      I always create a test example in MSWord on a form to see how it must behave. When the device is clickable I test the mouse event first. If that doesn't work I drop the ActiveX immediate. Otherwise you'll get crazy. These ActiveX devices do work properly in VB or VBA but not in Alpha Five.

      Hope this helps.
      Marcel

      I hear and I forget. I see and I remember. I do and I understand.
      ---- Confusius ----

      Comment


        #4
        Re: Activex Events

        Thanks for the info.
        It seems like even though I can see the events, they really won't work.
        I am trying to see if I can get around it, but I think I may be stuck on this one.
        Alan

        Comment


          #5
          Re: Activex Events

          What control from what vendor are you using?

          I sure would like to see a list of third party ActiveX controls that forum members have succeeded in getting to work with Alpha Five. And a small demo with XBasic would be great.

          Bob McGaffic
          Pittsburgh PA
          Last edited by rmcgaffic; 08-28-2008, 07:50 PM.

          Comment


            #6
            Re: Activex Events

            Originally posted by rmcgaffic View Post
            What control from what vendor are you using?

            I sure would like to see a list of third party ActiveX controls that forum members have succeeded in getting to work with Alpha Five. And a small demo with XBasic would be great.

            Bob McGaffic
            Pittsburgh PA

            If you want to do someting with Twain use the ActiveX versio of Dosadi.

            Twain components from gdpicturepro or ChestySoft doesn't work well in A5.

            For Charting I would use RMChart, but I have no project for this component at this time and the development stopped at the thread I gave you earlier at the moment we discovered that the component also doesn't work in the report. But that was A5v8 maybe it wil work in A5v9?
            Marcel

            I hear and I forget. I see and I remember. I do and I understand.
            ---- Confusius ----

            Comment


              #7
              Re: Activex Events

              I had the same problem when using an activeX license control. Alpha Five generated the code, When I tried to use TopparentXXXX = XXXX it gave an error that Topparent (What ever) could not be found I eventually tried to call a DLL. I would rether use the code Alpha generated. Am I doing something when the code is generated by Alpha but it cannot finf it?

              Comment


                #8
                New developments in ActiveX!

                Let's see what an excellent third party ActiveX firm has to say about Alpha Five.

                Here's the response I received to the zipped MS Word document attached to an earlier posting in this thread:

                Code:
                Hello Bob,
                
                At a first glance it looks to be a problem of Alpha Five software. 
                Of course, we never tested our control with it, but we'll try 
                downloading this software and playing with it there. You can 
                attach your sample application here to help us in that.
                
                --
                Best regards,
                Sergey
                I am very much impressed by Codejock's willingness to take
                a closer look at Alpha Five. Here's my response

                Code:
                Hi Sergey,
                
                I have attached a zip file of my application called appropriately MYAPPLICATION.
                
                Please visit www.alphasoftware.com, then from the 
                home page click on [Free trial].
                
                I appreciate your willingness to take a quick look at 
                this problem. As you will soon see, Alpha's controls are 
                solid, but not fully up to commercial standards. 
                
                I am seeking to recreate your Microsoft Access Demo 
                with Alpha Five. If successfull, I will add a full project 
                description to the Alpha Five code library. I think many 
                Alpha developers would benefit by using quality ActiveX 
                controls from firms like yourself or DBI Tech.
                
                You won't believe the laborious coding efforts that Alpha 
                developers are enduring to re-invent the wheel for calendar
                and scheduling applications.  Your MS Access Demo illustrates 
                that a good control can do the majority of the heavy lifting
                with a graphical polish to boot!
                
                One word about Alpha: their technical/development support 
                and user forum are superb. When problems are reported, 
                they generally have the fix patch out within two weeks. 
                
                I eagerly look forward to your assessment.
                
                Bob McGaffic
                Pittsburgh
                I'll keep you guys posted of any progress. Getting these commercial grade controls to work with Alpha Five is an important step in creating applications that will wow your client.

                Bob McGaffic
                Pittsburgh

                Comment


                  #9
                  Re: Activex Events

                  IMOH, Alpha Corporation will have to invest a fair amount of time to enhance their COM/ActiveX interface if they want to get this working. Of course they support the IUnknow and IDispatch interfacing to get connected to the COM object for late binding. This is the way we can now access Word and Excel. Embedding an ActiveX on the form is a lot more complex and uses early binding. From my own experience with embedding ActiveX TWAIN objects I must say the events, the types they are there but using them is a second problem. They just don't connect. Somehow they can't get it right. Customers have asked over the years about this stuff, including myself, (COM/ActiveX) and even now after years it isn't implemented the right way.

                  Alpha Five should be rewritten in such way that their users can buy any external library build with .NET technology. At the moment Alpha Five is build too propriarity.

                  Hmmm, maybe this is something for the wishlist .
                  Marcel

                  I hear and I forget. I see and I remember. I do and I understand.
                  ---- Confusius ----

                  Comment


                    #10
                    Re: Activex Events

                    Just for the record, documentation of my progress in getting Alpha Five to use industrial grade ActiveX controls. Folks, this is not easy, but I have made a little bit of progress. Am still awaiting Codejock's assessment of where the ball has been dropped.

                    Bob McGaffic
                    Pittsburgh, PA

                    Comment


                      #11
                      Re: Activex Events

                      Bob:

                      I've worked with a few activex controls in A5V9 (Dosadi's scanning control and the Topaz Signature Pad) and, in the main, I've been able to do what I wanted to do.

                      The main thing I found when doing this work is that if the syntax I expected to work, based on a VB example say, did not work, then I needed to play with that syntax in different ways. Often this meant taking a VB statement where a value was assigned to a property with a "statement = value" in VB and replacing it with an A5V9 function-type expression.

                      For example, in your documents you show the following

                      Code:
                      'Microsoft Access cocde
                      'Me.CalendarControl1.DayView.TimeScale = 30
                      'Alpha Five code
                      topparent.CalendarControl1.activex.Dayview.timeScale = 30
                      topparent.repaint()
                      If I was doing this, I would first try

                      Code:
                      'Alpha Five code
                      topparent.CalendarControl1.activex.Dayview.timeScale(30)
                      topparent.resynch()
                      It took a lot of trial and error to get things working. In many cases discovering the successful construction was more luck than anything else, which is why I can't offer more detailed guidance. Someone with more knowledge of VB or Access programming might be able to better or more accurately guess the possible constructions than I was.

                      Hope this helps
                      Finian

                      Comment


                        #12
                        Re: Activex Events

                        Finian,

                        Thank you so much for taking a look at my example. I tried your suggestion and unfortunately received the error message pictured below. My XBasic code was patterned after Visual Basic, it didn't error, but it sure didn't work either.

                        My real concern is that Alpha simply is not fully reading the properties and events of the control. Boy, do I hope this problem is not control specific.

                        Just an addendum to Michael's comment above, that Alpha should bite the bullet and get up to speed with the .net world if proven external ActiveX controls won't work with XBasic: take a look at the "Dear Alpha" posting in the wish lists. Most posters to that thread don't believe Alpha could/would ever pull that off. It seems that they've painted themselves into a corner of sorts.

                        I'll keep you posted on Codejock's response.

                        Bob McGaffic
                        Pittsburgh
                        Last edited by rmcgaffic; 10-26-2008, 03:48 PM.

                        Comment


                          #13
                          Re: Activex Events

                          Bob:

                          I downloaded and installed the CodeJock 30 trial activex. My what a beautifully put together piece of software.

                          From a combination of looking at the OLE automation explorer and the CodeJock help (which plugs right into the explorer - so nice) I found the following.

                          On your Calendar form I drew a new ActiveX object and left the object name as the default (i.e. ActiveX1). I also removed the existing activex objects from the form.

                          I changed the code in the OnChange event of the Vertical Time Scale combo box to the following:

                          Code:
                          dim dv as p
                          dv = topparent.ActiveX1.activex.Dayview()
                          dv.timescale = this.value
                          This works to change the calendar display to the desired interval.

                          From the way the properties and methods of the Calendar Control are laid out in the OLE Automation explorer I inferred that "DayView" was a "parent" and I probably could access the sub-properties if I played around. This is basically the same approach that I used with the other products. it's not ideal but I've usually been able to get things to work. OK. it's a pita because it took me about 40 minutes to come up with that combination. However, if you stick with it the guesses get better.
                          Finian

                          Comment


                            #14
                            Re: Activex Events

                            Finian,

                            I am extremely pleased to report that your code snippet works absolutely perfectly!!!!!! Below are screen prints showing your code in action.

                            Obviously, I am having difficulty making the mental transition from Visual Basic and Visual Basic for Applications to XBasic. Thank you for pointing out the subtleties that I had missed.

                            I sure would like to see guide to translating from one language to another; obviously it's not a word for word substitution.

                            I am going to continue to work on this project because I feel it is critical that Alpha offers its developers a industrial strength calendar control with full Outlook-like capabilities. Codejock's control fits the bill, I just now need to continue to understand how to make it work with XBasic.

                            If I am successful, I will put the full documentation in the code library. I did this with a industrial strength tree control from dbi-tech.com and built an application menu much like SAP R/3 and placed the documentation in the code library a couple of months ago.

                            I feel that Alpha can't be a considered a serious development tool without hightly polished trees, calendars, and email. I have some ideas perculating in my mind on how to strengthen Alpha's email, but I won't tackle that project until finishing this one. Then if I can find a tab control that offers the same modern look as Alpha uses for forms at the bottom of the screen (but does not make available to its developers), I think we'll largely have the pieces assembled for a professional looking application.

                            Thanks again and I'll keep you posted.

                            Bob McGaffic
                            Pittsburgh

                            Comment


                              #15
                              Re: Activex Events

                              I'm glad it worked. With some trial and error I think you'll be able to access all the properties and methods of the control.

                              You can get an idea of how Alpha is "breaking things down" by looking at the control properties in the OLE automation explorer. In the form itself (Right click on the activex object in the form, Events, ActivexEvents) you can see the functions that Alpha has declared based on its parsing of the controls properties and methods. These allow you to have Alpha respond to control events.

                              So, if you always wanted Alpha to do something after you change the timescale, you can add code to the TimeScaleChanged event such as

                              Code:
                              function timescalechanged as v ()
                              	ui_msg_box("","Time scale changed.")
                              		topparent:activex1.activex.redrawcontrol()
                              end function
                              Note that you have to redraw the control if you insert code here, otherwise, with the message box alone, the control doesn't get updated. Most of the time you can leave this section alone, but for any in-depth work you'll almost certainly have to customize the control events.
                              Finian

                              Comment

                              Working...
                              X