LinkLabel control in CF

  • Thread starter Thread starter RonG
  • Start date Start date
R

RonG

I am trying to get a linklabel to work on my iPAQ (WM6, VS2008, CF3.5,
VB) and I just can't seem to get the correct info. I see lots of info
on standard .net, but none of those work for CF. Anyone have some info?
 
What's the problem? We need something more than "doesn't work". What links
have you tried? What happens when you tap on one?

Paul T.
 
The .Text property can be set to the link that you want to allow the user to
click on.

http://www.google.com

for example. Then you'd have to handle the Click event and launch the
browser, passing the value from the .Text property as a parameter. Maybe
something like this:

private void linkLabel1_Click(object sender, EventArgs e)

{

Process.Start("iesample.exe", linkLabel1.Text);

}

Note that the name of the browser depends on the device type you are running
on. I may be overlooking some easier way to establish the link with the
browser. Maybe someone else will chime in.

Paul T.
 
It is probebly best not to provide the web browser app but just let the
device choose the registered default ie:

System.Dialognostics.Process.Start(http://www.google.com, "");

As Paul says, there is no magic wand or property where you specify the URL.
You have to handle the Click event - this is true for the desktop even the
latest version.

Cheers
--
Simon Hart
Visual Developer - Device Application Development MVP
http://www.simonrhart.com

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:OTkst9J%[email protected]...
 
Thanks guys. Works great. I am just struggling on figuring out all the
differences between .NET 3.5 and .NET CF 3.5. There sure are a lot of
things that were chopped off ...
It is probebly best not to provide the web browser app but just let the
device choose the registered default ie:

System.Dialognostics.Process.Start(http://www.google.com, "");

As Paul says, there is no magic wand or property where you specify the
URL. You have to handle the Click event - this is true for the desktop
even the latest version.

Cheers
--
Simon Hart
Visual Developer - Device Application Development MVP
http://www.simonrhart.com

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:OTkst9J%[email protected]...
The .Text property can be set to the link that you want to allow the
user to click on.

http://www.google.com

for example. Then you'd have to handle the Click event and launch the
browser, passing the value from the .Text property as a parameter.
Maybe something like this:

private void linkLabel1_Click(object sender, EventArgs e)

{

Process.Start("iesample.exe", linkLabel1.Text);

}

Note that the name of the browser depends on the device type you are
running on. I may be overlooking some easier way to establish the
link with the browser. Maybe someone else will chime in.

Paul T.

RonG said:
Sorry about that - I should have been more descriptive.

I dragged a LinkLabel control to my form (vb.net), but I am not sure
of what methods/properties to use. The documentation is not clear to
me.

I have used, on .NET 3.5, the following:

linkWebsite.Links.Add(6, 4, "www.example.com")

But in CF, .Links is not supported (see
http://msdn.microsoft.com/en-us/library/system.windows.forms.linklabel_members.aspx),
so which properties do I use?

Ron

Paul G. Tobey [eMVP] wrote:
What's the problem? We need something more than "doesn't work".
What links have you tried? What happens when you tap on one?

Paul T.

I am trying to get a linklabel to work on my iPAQ (WM6, VS2008,
CF3.5, VB) and I just can't seem to get the correct info. I see
lots of info on standard .net, but none of those work for CF.
Anyone have some info?
 
Actually, I jumped too soon when I said everything is OK.

I tried the following, from within _Load():
System.Diagnostics.Process.Start("www.microsoft.com", "")

But, when I tried if from within _Click(), I get a Win32 exception.

Is there something else I need to do to call if from an event?

Ron
It is probebly best not to provide the web browser app but just let the
device choose the registered default ie:

System.Dialognostics.Process.Start(http://www.google.com, "");

As Paul says, there is no magic wand or property where you specify the
URL. You have to handle the Click event - this is true for the desktop
even the latest version.

Cheers
--
Simon Hart
Visual Developer - Device Application Development MVP
http://www.simonrhart.com

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:OTkst9J%[email protected]...
The .Text property can be set to the link that you want to allow the
user to click on.

http://www.google.com

for example. Then you'd have to handle the Click event and launch the
browser, passing the value from the .Text property as a parameter.
Maybe something like this:

private void linkLabel1_Click(object sender, EventArgs e)

{

Process.Start("iesample.exe", linkLabel1.Text);

}

Note that the name of the browser depends on the device type you are
running on. I may be overlooking some easier way to establish the
link with the browser. Maybe someone else will chime in.

Paul T.

RonG said:
Sorry about that - I should have been more descriptive.

I dragged a LinkLabel control to my form (vb.net), but I am not sure
of what methods/properties to use. The documentation is not clear to
me.

I have used, on .NET 3.5, the following:

linkWebsite.Links.Add(6, 4, "www.example.com")

But in CF, .Links is not supported (see
http://msdn.microsoft.com/en-us/library/system.windows.forms.linklabel_members.aspx),
so which properties do I use?

Ron

Paul G. Tobey [eMVP] wrote:
What's the problem? We need something more than "doesn't work".
What links have you tried? What happens when you tap on one?

Paul T.

I am trying to get a linklabel to work on my iPAQ (WM6, VS2008,
CF3.5, VB) and I just can't seem to get the correct info. I see
lots of info on standard .net, but none of those work for CF.
Anyone have some info?
 
What does the win32 exception say? What device are you running on?


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com



RonG said:
Actually, I jumped too soon when I said everything is OK.

I tried the following, from within _Load():
System.Diagnostics.Process.Start("www.microsoft.com", "")

But, when I tried if from within _Click(), I get a Win32 exception.

Is there something else I need to do to call if from an event?

Ron
It is probebly best not to provide the web browser app but just let the
device choose the registered default ie:

System.Dialognostics.Process.Start(http://www.google.com, "");

As Paul says, there is no magic wand or property where you specify the
URL. You have to handle the Click event - this is true for the desktop
even the latest version.

Cheers
--
Simon Hart
Visual Developer - Device Application Development MVP
http://www.simonrhart.com

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:OTkst9J%[email protected]...
The .Text property can be set to the link that you want to allow the
user to click on.

http://www.google.com

for example. Then you'd have to handle the Click event and launch the
browser, passing the value from the .Text property as a parameter.
Maybe something like this:

private void linkLabel1_Click(object sender, EventArgs e)

{

Process.Start("iesample.exe", linkLabel1.Text);

}

Note that the name of the browser depends on the device type you are
running on. I may be overlooking some easier way to establish the link
with the browser. Maybe someone else will chime in.

Paul T.

Sorry about that - I should have been more descriptive.

I dragged a LinkLabel control to my form (vb.net), but I am not sure of
what methods/properties to use. The documentation is not clear to me.

I have used, on .NET 3.5, the following:

linkWebsite.Links.Add(6, 4, "www.example.com")

But in CF, .Links is not supported (see
http://msdn.microsoft.com/en-us/library/system.windows.forms.linklabel_members.aspx),
so which properties do I use?

Ron

Paul G. Tobey [eMVP] wrote:
What's the problem? We need something more than "doesn't work". What
links have you tried? What happens when you tap on one?

Paul T.

I am trying to get a linklabel to work on my iPAQ (WM6, VS2008,
CF3.5, VB) and I just can't seem to get the correct info. I see lots
of info on standard .net, but none of those work for CF. Anyone have
some info?
 
Just Win32Exception (in View Details, the error code is -2147467259 (?
80004005).

I'm running an HP iPaq 210.
 
Peculiar. That translates to the ever-helpful "Unspecified Error". What
happens if you give it the name of the browser? Or something as simple as
calc.exe?


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
Back
Top