none
Hyperlink control in windows mobile application

    Question

  • Hi all,

            I have a small doubt on windows mobile application UI design. Anybody have the idea how to add hyperlink control into the my mobile application. Please also give some sample codes. Am using "windows mobile pocket pc 5.0". Waiting for reply guys..........




    Regards,

     Asath

    Wednesday, August 27, 2008 11:57 AM

Answers


  • Hi

    As stated in that URL..

    Hyperlinks are not a control. They are a concept, and as such have multiple ways of being created by the developer.

    Label control:

        * This method does not allow the link to live within a non-linked text string and does not allow for the dynamic flow of text around the link.
        * There is no performance hit when using this control.
        * This is the most simple control to code. Just trap the click and perform whatever action you want.



    In your VC++ project. place a label control in the form and apply the setting that the label looks link a hyperlink control.

    And in the click event of that label control use the ShellExecute which can be used to open a URL in Internet Explorer.

    ShellExecute(NULL, "open", "http://www.google.com",NULL, NULL,SW_SHOWNORMAL);


    Hope you got..
    Thursday, August 28, 2008 1:28 PM

All replies

  • Hi Asath,

     Give you work around. Make a label control looks like Hyper Link Control. In the click event of that label control
    use the following code,

    Process.Start(@"\Windows\iexplore.exe","http://www.google.com");

    it will launch the iexplore and load the google page.

    Hope usefull

    Wednesday, August 27, 2008 1:30 PM
  • Hi,

       
    Process.Start is the fucntionailty for .net i think.. can u give some native C++ code samples for hyperlink control.




    Regards,
     Asath
    Thursday, August 28, 2008 4:31 AM

  • Hi

    Call CreateProcess

    or


    You can use ShellExecute Function to execute any exe from VC++ code.

    Hope that will help you.
    Thursday, August 28, 2008 5:26 AM
  • Hi  prasanna,
     
                        Thanks for ur reply.. My requirement was UI design that is how to add hyperlink control into the application. I saw some label link control, html control and
    Rich Ink control for hyperlink control(refer this link http://msdn.microsoft.com/en-us/library/aa454169.aspx). But am not getting any examples for that controls. Please give some sample code for hyperlink control. If its not possible then tel me how to achieve the hyperlink control in windows mobile application.

    Thanks,
    Azad.S
       
    Thursday, August 28, 2008 8:55 AM

  • Hi

    As stated in that URL..

    Hyperlinks are not a control. They are a concept, and as such have multiple ways of being created by the developer.

    Label control:

        * This method does not allow the link to live within a non-linked text string and does not allow for the dynamic flow of text around the link.
        * There is no performance hit when using this control.
        * This is the most simple control to code. Just trap the click and perform whatever action you want.



    In your VC++ project. place a label control in the form and apply the setting that the label looks link a hyperlink control.

    And in the click event of that label control use the ShellExecute which can be used to open a URL in Internet Explorer.

    ShellExecute(NULL, "open", "http://www.google.com",NULL, NULL,SW_SHOWNORMAL);


    Hope you got..
    Thursday, August 28, 2008 1:28 PM