This project is read-only.

Sharpbox in VB.Net on Windows Phone

Aug 17, 2011 at 7:04 AM

I am trying to figure how to use Sharpbox in a Windows Phone 7 app written in VB. Whilst I usually have no difficulty translating c# to VB.Net, I cannot fathom how to translate ...

 (App.Current as App).CloudAccess.BeginOpenRequest(LoginAsyncCallback, cfg, token);    

... into VB.Net for Windows Phone.

I have a stub procedure ...

    Sub LoginAsyncCallback(ar As IAsyncResult)
        ' end the assync call and take the token
        App.AccessToken = App.CloudAccess.EndOpenRequest(ar)
    End Sub

... but get 'Argument not specified for parameter 'ar' of 'Public Sub LoginAsyncCallback(ar As System.IAsyncResult)'.' referencing the BeginOpenRequest line.

Can anypoe explain where I'm going wrong and provide a solution?

Thanks in advance,

Jeff Law
New Zealand

Aug 20, 2011 at 12:21 AM
Hi,

we have a sample app in C# at our code. Does this help?

Dirk

Sent from my iPad

On 17.08.2011, at 08:04, jdlaw75 <notifications@codeplex.com> wrote:

From: jdlaw75

I am trying to figure how to use Sharpbox in a Windows Phone 7 app written in VB. Whilst I usually have no difficulty translating c# to VB.Net, I cannot fathom how to translate ...

 (App.Current as App).CloudAccess.BeginOpenRequest(LoginAsyncCallback, cfg, token);    

... into VB.Net for Windows Phone.

I have a stub procedure ...

    Sub LoginAsyncCallback(ar As IAsyncResult)
        ' end the assync call and take the token
        App.AccessToken = App.CloudAccess.EndOpenRequest(ar)
    End Sub

... but get 'Argument not specified for parameter 'ar' of 'Public Sub LoginAsyncCallback(ar As System.IAsyncResult)'.' referencing the BeginOpenRequest line.

Can anypoe explain where I'm going wrong and provide a solution?

Thanks in advance,

Jeff Law
New Zealand

Aug 20, 2011 at 12:49 AM
Dirk

That's what I have been translating. However, VB gives a syntax error on that bit of translated code.

Jeff Law
Sent from Windows Phone 7

From: dei79
Sent: 20/08/2011 9:21 a.m.
To: jeff.law@datamasta.co.nz
Subject: Re: Sharpbox in VB.Net on Windows Phone [sharpbox:269354]

From: dei79

Hi,

we have a sample app in C# at our code. Does this help?

Dirk

Sent from my iPad

On 17.08.2011, at 08:04, jdlaw75 <notifications@codeplex.com> wrote:

From: jdlaw75

I am trying to figure how to use Sharpbox in a Windows Phone 7 app written in VB. Whilst I usually have no difficulty translating c# to VB.Net, I cannot fathom how to translate ...

 (App.Current as App).CloudAccess.BeginOpenRequest(LoginAsyncCallback, cfg, token);    

... into VB.Net for Windows Phone.

I have a stub procedure ...

    Sub LoginAsyncCallback(ar As IAsyncResult)
        ' end the assync call and take the token
        App.AccessToken = App.CloudAccess.EndOpenRequest(ar)
    End Sub

... but get 'Argument not specified for parameter 'ar' of 'Public Sub LoginAsyncCallback(ar As System.IAsyncResult)'.' referencing the BeginOpenRequest line.

Can anypoe explain where I'm going wrong and provide a solution?

Thanks in advance,

Jeff Law
New Zealand

Aug 21, 2011 at 11:00 AM
Hi,

oh sorry I'm not the VB.NET man so hopefully someone else can help us out?

Sorry
Dirk


2011/8/20 jdlaw75 <notifications@codeplex.com>

From: jdlaw75

Dirk

That's what I have been translating. However, VB gives a syntax error on that bit of translated code.

Jeff Law
Sent from Windows Phone 7

From: dei79
Sent: 20/08/2011 9:21 a.m.
To: jeff.law@datamasta.co.nz
Subject: Re: Sharpbox in VB.Net on Windows Phone [sharpbox:269354]

From: dei79

Hi,

we have a sample app in C# at our code. Does this help?

Dirk

Sent from my iPad

On 17.08.2011, at 08:04, jdlaw75 <notifications@codeplex.com> wrote:

From: jdlaw75

I am trying to figure how to use Sharpbox in a Windows Phone 7 app written in VB. Whilst I usually have no difficulty translating c# to VB.Net, I cannot fathom how to translate ...

 (App.Current as App).CloudAccess.BeginOpenRequest(LoginAsyncCallback, cfg, token);    

... into VB.Net for Windows Phone.

I have a stub procedure ...

    Sub LoginAsyncCallback(ar As IAsyncResult)
        ' end the assync call and take the token
        App.AccessToken = App.CloudAccess.EndOpenRequest(ar)
    End Sub

... but get 'Argument not specified for parameter 'ar' of 'Public Sub LoginAsyncCallback(ar As System.IAsyncResult)'.' referencing the BeginOpenRequest line.

Can anypoe explain where I'm going wrong and provide a solution?

Thanks in advance,

Jeff Law
New Zealand

Read the full discussion online.

To add a post to this discussion, reply to this email (sharpbox@discussions.codeplex.com)

To start a new discussion for this project, email sharpbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Aug 31, 2011 at 7:30 AM

Got it!

I forgot to put AddressOf before LoginAsyncCallback !

Jeff

Aug 31, 2011 at 10:48 AM
Are you able to post a full sample? This would be realy cool to offer all the other VB.NET developer a good starting point :-)

Thanks
Dirk


2011/8/31 jdlaw75 <notifications@codeplex.com>

From: jdlaw75

Got it!

I forgot to put AddressOf before LoginAsyncCallback !

Jeff

Read the full discussion online.

To add a post to this discussion, reply to this email (sharpbox@discussions.codeplex.com)

To start a new discussion for this project, email sharpbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Aug 31, 2011 at 11:06 PM

I will do that as soon as I have the rest working. I have the log-in working well - just need to get (for my purposes) the CreateFolder and copying of files working.

At the moment, the CreateFolder hangs up with no result.

Jeff

Aug 31, 2011 at 11:12 PM
Hi,

ok thanks, sorry for my poor VB.net knowledge :-)

Dirk


2011/9/1 jdlaw75 <notifications@codeplex.com>

From: jdlaw75

I will do that as soon as I have the rest working. I have the log-in working well - just need to get (for my purposes) the CreateFolder and copying of files working.

At the moment, the CreateFolder hangs up with no result.

Jeff

Read the full discussion online.

To add a post to this discussion, reply to this email (sharpbox@discussions.codeplex.com)

To start a new discussion for this project, email sharpbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com