Click here to Skip to main content
15,891,907 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to insert image in the database Pin
PIEBALDconsult16-Dec-14 4:12
mvePIEBALDconsult16-Dec-14 4:12 
AnswerRe: how to insert image in the database Pin
Chris Quinn16-Dec-14 21:49
Chris Quinn16-Dec-14 21:49 
GeneralRe: how to insert image in the database Pin
Eddy Vluggen17-Dec-14 7:23
professionalEddy Vluggen17-Dec-14 7:23 
AnswerRe: how to insert image in the database Pin
Otekpo Emmanuel17-Dec-14 6:38
Otekpo Emmanuel17-Dec-14 6:38 
QuestionPls HELP me How to print data from datagridview bind on access database Pin
Member 1131194915-Dec-14 2:06
Member 1131194915-Dec-14 2:06 
AnswerRe: Pls HELP me How to print data from datagridview bind on access database Pin
Eddy Vluggen15-Dec-14 3:04
professionalEddy Vluggen15-Dec-14 3:04 
QuestionProper us of await Pin
jkirkerx14-Dec-14 13:50
professionaljkirkerx14-Dec-14 13:50 
AnswerRe: Proper us of await Pin
Richard Deeming15-Dec-14 2:37
mveRichard Deeming15-Dec-14 2:37 
jkirkerx wrote:
dCB.httpWebRequest_With_Progress(...)

Your httpWebRequest_With_Progress function returns a Task(Of Integer). If you want the calling code to pause and wait for the method to complete before continuing, you'll need to Await the returned task.
VB.NET
Await dCB.httpWebRequest_With_Progress(
  New Uri(localDB_Url_X64).ToString, 
  desktop_Save, 
  lbl_localDB_Progress, 
  pbLocalDB
)
' The download has finished; more code here...



jkirkerx wrote:
Dim resp = Await (New TaskFactory(Of Net.WebResponse)).StartNew(AddressOf webClient.GetResponse)

jkirkerx wrote:
bytesRecieved = Await (New TaskFactory(Of Integer)).FromAsync(AddressOf rqs.BeginRead, AddressOf rqs.EndRead, buffer, 0, bufferSize, Nothing)

You shouldn't use the TaskFactory to call synchronous methods on a new background thread:
Should I expose asynchronous wrappers for synchronous methods?[^]

Instead, use the asynchronous methods:

VB.NET
Dim resp = Await webClient.GetResponseAsync()
...
bytesRecieved = Await rqs.ReadAsync(buffer, 0, bufferSize)


Perhaps this walkthrough[^] might help. Smile | :)



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Proper us of await Pin
jkirkerx16-Dec-14 7:11
professionaljkirkerx16-Dec-14 7:11 
Questionwrite the buffer to the drive Pin
jkirkerx13-Dec-14 18:58
professionaljkirkerx13-Dec-14 18:58 
AnswerRe: write the buffer to the drive [Got It] Pin
jkirkerx14-Dec-14 8:08
professionaljkirkerx14-Dec-14 8:08 
SuggestionCalculating time gap b/w files in MSFlexgrid Pin
Member 1042199813-Dec-14 3:32
Member 1042199813-Dec-14 3:32 
GeneralRe: Calculating time gap b/w files in MSFlexgrid Pin
Richard MacCutchan13-Dec-14 4:14
mveRichard MacCutchan13-Dec-14 4:14 
QuestionGridview problems with Entity framework Pin
dilkonika11-Dec-14 16:56
dilkonika11-Dec-14 16:56 
AnswerRe: Gridview problems with Entity framework Pin
Dave Kreskowiak11-Dec-14 17:00
mveDave Kreskowiak11-Dec-14 17:00 
GeneralRe: Gridview problems with Entity framework Pin
dilkonika13-Dec-14 6:17
dilkonika13-Dec-14 6:17 
GeneralRe: Gridview problems with Entity framework Pin
Dave Kreskowiak13-Dec-14 7:40
mveDave Kreskowiak13-Dec-14 7:40 
Questiondialog, top level vs mdiparent Pin
jkirkerx11-Dec-14 11:56
professionaljkirkerx11-Dec-14 11:56 
AnswerRe: dialog, top level vs mdiparent [settled] Pin
jkirkerx11-Dec-14 13:32
professionaljkirkerx11-Dec-14 13:32 
AnswerRe: dialog, top level vs mdiparent Pin
Dave Kreskowiak11-Dec-14 13:41
mveDave Kreskowiak11-Dec-14 13:41 
GeneralRe: dialog, top level vs mdiparent Pin
jkirkerx11-Dec-14 13:48
professionaljkirkerx11-Dec-14 13:48 
GeneralRe: dialog, top level vs mdiparent Pin
Dave Kreskowiak11-Dec-14 14:44
mveDave Kreskowiak11-Dec-14 14:44 
GeneralRe: dialog, top level vs mdiparent Pin
jkirkerx11-Dec-14 16:37
professionaljkirkerx11-Dec-14 16:37 
GeneralRe: dialog, top level vs mdiparent Pin
Dave Kreskowiak11-Dec-14 16:58
mveDave Kreskowiak11-Dec-14 16:58 
GeneralRe: dialog, top level vs mdiparent Pin
jkirkerx11-Dec-14 17:35
professionaljkirkerx11-Dec-14 17:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.