Click here to Skip to main content
16,005,206 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: OleCreatePictureIndirect NOT WORKING returns -2147467262 Pin
FeRtoll19-May-10 7:34
FeRtoll19-May-10 7:34 
GeneralRe: OleCreatePictureIndirect NOT WORKING returns -2147467262 Pin
DaveAuld19-May-10 8:00
professionalDaveAuld19-May-10 8:00 
GeneralRe: OleCreatePictureIndirect NOT WORKING returns -2147467262 Pin
FeRtoll19-May-10 8:39
FeRtoll19-May-10 8:39 
GeneralRe: OleCreatePictureIndirect NOT WORKING returns -2147467262 [modified] Pin
FeRtoll19-May-10 9:05
FeRtoll19-May-10 9:05 
QuestionHow can I clear the cache when using the WebBrowser Object Pin
Tp5harp18-May-10 22:59
Tp5harp18-May-10 22:59 
AnswerRe: How can I clear the cache when using the WebBrowser Object Pin
Johan Hakkesteegt18-May-10 23:27
Johan Hakkesteegt18-May-10 23:27 
AnswerRe: How can I clear the cache when using the WebBrowser Object Pin
Luc Pattyn19-May-10 2:18
sitebuilderLuc Pattyn19-May-10 2:18 
AnswerRe: How can I clear the cache when using the WebBrowser Object Pin
The Man from U.N.C.L.E.19-May-10 5:36
The Man from U.N.C.L.E.19-May-10 5:36 
We had a similar issue, but not with reporting services reports. We tried setting the webpage expiration, telling it to never cache, disposing of the WebBrowser object (it does not dispose by the way, it hangs around attached to the calling process and then complains if you try to use it again), all to no avail.

The only solution was to remove the URL from the cache. If fact we ended up coding that into every call (remove from cache, then navigate), in the one class that everything else calls of course.

Here is the remove from cache code.

VB.NET
Public Shared Sub DeleteFromUrlCache(ByVal url As String)
     Dim apiResult As Long = DeleteUrlCacheEntry(url)
     If apiResult <> 0 Then
          Return
     End If

     Dim lastError As Integer = Marshal.GetLastWin32Error()
     If lastError = ERROR_ACCESS_DENIED Then
         Throw New ApplicationException(String.Concat("Access denied: ", url))
     End If
End Sub

Public Const ERROR_ACCESS_DENIED As Integer = 5

<DllImport("wininet.dll", SetLastError:=True)> _
Private Shared Function DeleteUrlCacheEntry(ByVal lpszUrlName As String) As Long
End Function

If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
[My Articles]  [My Website]

GeneralRe: How can I clear the cache when using the WebBrowser Object Pin
Tp5harp19-May-10 9:45
Tp5harp19-May-10 9:45 
QuestionAvoid inserting a duplicate record using vb.net Pin
faisalali_7818-May-10 21:34
faisalali_7818-May-10 21:34 
AnswerRe: Avoid inserting a duplicate record using vb.net Pin
Andy_L_J18-May-10 21:41
Andy_L_J18-May-10 21:41 
AnswerRe: Avoid inserting a duplicate record using vb.net Pin
Wayne Gaylard18-May-10 21:44
professionalWayne Gaylard18-May-10 21:44 
AnswerRe: Avoid inserting a duplicate record using vb.net Pin
Johan Hakkesteegt18-May-10 22:12
Johan Hakkesteegt18-May-10 22:12 
AnswerRe: Avoid inserting a duplicate record using vb.net Pin
Luc Pattyn19-May-10 2:19
sitebuilderLuc Pattyn19-May-10 2:19 
GeneralRe: Avoid inserting a duplicate record using vb.net Pin
Johan Hakkesteegt19-May-10 2:45
Johan Hakkesteegt19-May-10 2:45 
AnswerRe: Avoid inserting a duplicate record using vb.net Pin
TheComputerMan19-May-10 6:06
TheComputerMan19-May-10 6:06 
Questionhow to check for duplication before inserting data in tables using vb.net Pin
faisalali_7818-May-10 21:13
faisalali_7818-May-10 21:13 
AnswerRe: how to check for duplication before inserting data in tables using vb.net Pin
Eduard Keilholz18-May-10 21:49
Eduard Keilholz18-May-10 21:49 
Questionhow to add controls dynamically ? [modified] Pin
sanyexian18-May-10 16:33
sanyexian18-May-10 16:33 
AnswerRe: how to add controls dynamically ? Pin
Luc Pattyn18-May-10 16:39
sitebuilderLuc Pattyn18-May-10 16:39 
QuestionCurious Cross Thread Error Pin
TheComputerMan18-May-10 4:31
TheComputerMan18-May-10 4:31 
AnswerRe: Curious Cross Thread Error Pin
Dave Kreskowiak18-May-10 5:05
mveDave Kreskowiak18-May-10 5:05 
GeneralRe: Curious Cross Thread Error Pin
Luc Pattyn18-May-10 5:09
sitebuilderLuc Pattyn18-May-10 5:09 
GeneralRe: Curious Cross Thread Error Pin
Dave Kreskowiak18-May-10 8:17
mveDave Kreskowiak18-May-10 8:17 
GeneralRe: Curious Cross Thread Error Pin
Luc Pattyn18-May-10 8:42
sitebuilderLuc Pattyn18-May-10 8:42 

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.