Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Creating OMControls (like browser)

  1. #1
    Newbie
    Join Date
    Jan 2011
    Location
    Italy
    Posts
    26

    Creating OMControls (like browser)

    Hi,
    want to ask something which maybe is already explained in the forum or somewhere else, but cannot find it!
    Also this is probably something elementar for experienced programmers.
    I would like to know if there is somewhere any example/tutorial/guideline (also outside the forum) to understand how to embed windows form controls such as webbrowser or calendar, or 3rd parts controls like geckoFX (firefox).
    There is a way to do this or the controll needs to be re-written completely by inheriting the control type of OM framework?

    I've also tried to use the external nav plug in to embed an application, but it starts outside of OM. Embedding app plug in works but it does not open the application (I have some issue with my compiler but in this case I downloaded the "official" dll the the plug-in utility). Moreover I believe that this way to embed is "fictitious" embedding as far as exchanging information with the application would be quite difficult.

    Thanks for the help and sorry for the trivial question of a newbie programmer.....

  2. #2
    Maximum Bitrate Borte's Avatar
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    529
    Quote Originally Posted by martin_p View Post
    Hi,
    want to ask something which maybe is already explained in the forum or somewhere else, but cannot find it!
    Also this is probably something elementar for experienced programmers.
    I would like to know if there is somewhere any example/tutorial/guideline (also outside the forum) to understand how to embed windows form controls such as webbrowser or calendar, or 3rd parts controls like geckoFX (firefox).
    There is a way to do this or the controll needs to be re-written completely by inheriting the control type of OM framework?
    You can not embed controls from any other source for use on a panel in OM. OM has it's own control handling/rendering so controls has to use the OM framework to function. But you can create your own controls by basing them off OMControl. If you look at the code here: http://openmobile.svn.sourceforge.ne...92&view=markup you'll see how you can create a control by your self. Most of the normal graphic commands from .Net should be available for you to draw your control.
    This could easily be quite an advanced topic, but do some digging on your side and look at the link I provided. This should at least get you started.

    Quote Originally Posted by martin_p View Post
    I've also tried to use the external nav plug in to embed an application, but it starts outside of OM. Embedding app plug in works but it does not open the application (I have some issue with my compiler but in this case I downloaded the "official" dll the the plug-in utility). Moreover I believe that this way to embed is "fictitious" embedding as far as exchanging information with the application would be quite difficult.

    Thanks for the help and sorry for the trivial question of a newbie programmer.....
    The embedding plugin works like any other embedding as it only grabs the output window from the application and presents this inside an host application. The actual application runs like it normally does (although usually hidden).
    Yes communication to and from the application is hard but not impossible. To do some actual communication you could use windowsmessages to the application window but the results might be limited. Usually you're limited to what you would be able to do in the application by mouse or keyboard inputs.

    If you look at this link then you'll see some info on the topic: http://www.codeproject.com/KB/miscct...rth_embed.aspx
    Failure is not an option...
    __________________________________________________ ______________________________
    The only full multizone / multiscreen cross platform open source Front End -> OpenMobile

  3. #3
    Newbie
    Join Date
    Jan 2011
    Location
    Italy
    Posts
    26
    Many, many thanks.
    This is a precious help!

  4. #4
    Raw Wave
    Auto Apps:loading...
    justchat_1's Avatar
    Join Date
    Jul 2008
    Location
    Boston, Ma or NY,NY
    Posts
    2,359
    Ignore that link he posted....if you do embed apps you'll want to use OMs embedding functions which work cross-platform:
    http://openmobile.sourceforge.net/wi...php/OSSpecific

    If you share a little more about what your trying to do we can provide more info.

  5. #5
    Newbie
    Join Date
    Jan 2011
    Location
    Italy
    Posts
    26
    The link posted by Borte is in any case interesting because shown hot to embed Google earth in a Windows form, without going through a browser!

    Well, let say I'm making some experiments, first I'm trying to improve my skillness in programming (my last experience are on Access VBA and Turbo Pascal 6), second I'm trying to put together a a carpc project and I belive that OM is a good front end and very good environment to customize and to learn.
    What I'm trying to do now is to embed a browser control similarly to how webbrowser can be inserted in a windows form.
    My target is not only to navigate but also to exchange information between OM and the browser and to have visibility of the DOM inside the browser.
    I know, probably ambitious aim, but I know it is possible and I'm not in a hurry......

    Anyway the first thing I have to do is to make work the example....because also other plug-in can be compiled but they doesn't work as well.... Would like to know if the most of you guy are using VS XP 2008.

  6. #6
    Maximum Bitrate Borte's Avatar
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    529
    Quote Originally Posted by martin_p View Post
    Would like to know if the most of you guy are using VS XP 2008.
    I think most of the dev team are running VS 2008 Pro.
    Failure is not an option...
    __________________________________________________ ______________________________
    The only full multizone / multiscreen cross platform open source Front End -> OpenMobile

  7. #7
    Newbie
    Join Date
    Jan 2011
    Location
    Italy
    Posts
    26
    Hi,
    following the suggestion to use the integrated method to embed application, I tried to translate the plug-in written in VB "embedapp2" into c#.
    I succeeded to make it visible to OM and also setting panels work properly. But there is no way to convince the main panel to read the actual plugin name set in the setting panel and to make run the chosen embed application.
    I'm sure there is something really stupid around, but I'm not able to find it.
    Sorry to bother you but I really want to go through this thing.
    Here attached the C# solution and the compiled dll (to FW 3.5....)

    Thanks for the help!
    Attached Files Attached Files

  8. #8
    Maximum Bitrate Borte's Avatar
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    529
    You can't change a plugin's name at runtime, this is by design. Otherwise the system would have no way of recognizing your plugin while the application is running.

    authorName, authorEmail, pluginName, pluginVersion, pluginDescription can and should not change at runtime.

    I'm guessing you're trying to show the name of the embedded application on the button on the main screen?
    Failure is not an option...
    __________________________________________________ ______________________________
    The only full multizone / multiscreen cross platform open source Front End -> OpenMobile

  9. #9
    Raw Wave
    Auto Apps:loading...
    justchat_1's Avatar
    Join Date
    Jul 2008
    Location
    Boston, Ma or NY,NY
    Posts
    2,359
    DisplayName can be changed at runtime but the user will have to re-assign the main menu button.
    Plugin name should never be changed during runtime and will either not work or trigger a security exception from OMs plugin security module.

    As for your plugin:
    It works correctly.... OMPluginEmbedSample shows up in the list in the main menu...and when selected you get the display text on the button.

    You need to update mDisplayName and the other variables in the OnSettingsChanged event though, otherwise they won't be correct until the app is restarted

  10. #10
    Newbie
    Join Date
    Jan 2011
    Location
    Italy
    Posts
    26
    For Borte: the methods you mentioned are defined only to get and not to set the property, so they should never change these values, unless I didn't understood what you meant.

    For justchat: when I change settings they remain correctly in memory because when I load again the setup panel I see exactly the values I set previously.Also if I exit from OM and re-enter the values are still there.

    But there is no way to convince the main menu button to update with the displayname. Probably something wrong in the cycle "for" or in general in method Setting_Changed, but again very difficult to understand what (how to debug a plugin? Is it possibile to write something in the debug.txt file?)

    A part of this, I cannot make start the application I choose, just an empty panel appear.

    I tried then the embedApplication method in a simpler plugin and it actually works. But the application is not actually embedded but appears like a normal application window over OM, as I started-up by myself. Same thing if I try with external nav plugin.
    Is there a way to actually embed it in the panel without showing borders, similarly to what suggested borte for google inside windows form?
    Is there a way to embed a browser like webBrowser in windows form? How much difficult could be to adapth the geckofx control to fit in OM?

    THanks again for support. For me very precious.

Page 1 of 3 123 LastLast

Similar Threads

  1. Fresh Install on New PC, Rebooting
    By phc in forum StreetDeck
    Replies: 3
    Last Post: 12-23-2007, 09:33 AM
  2. pc reboot on sd startup
    By duanes7 in forum StreetDeck
    Replies: 3
    Last Post: 12-14-2007, 08:55 AM
  3. Holux GPS Trouble
    By mangus580 in forum StreetDeck
    Replies: 34
    Last Post: 11-26-2007, 08:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •