Click here to Skip to main content
15,908,901 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionPrinting xml Pin
Stephen Lintott23-Feb-09 20:01
Stephen Lintott23-Feb-09 20:01 
Questionhow to bind checkedlistbox with dataset in vb.net (window application) Pin
Jagz W23-Feb-09 19:06
professionalJagz W23-Feb-09 19:06 
AnswerRe: how to bind checkedlistbox with dataset in vb.net (window application) Pin
Dave Kreskowiak24-Feb-09 3:51
mveDave Kreskowiak24-Feb-09 3:51 
QuestionUsing Reflection to on a Subclass as a Property Pin
nickbequick23-Feb-09 11:52
nickbequick23-Feb-09 11:52 
AnswerRe: Using Reflection to on a Subclass as a Property Pin
Dave Kreskowiak24-Feb-09 3:50
mveDave Kreskowiak24-Feb-09 3:50 
GeneralRe: Using Reflection to on a Subclass as a Property Pin
nickbequick24-Feb-09 4:01
nickbequick24-Feb-09 4:01 
GeneralRe: Using Reflection to on a Subclass as a Property Pin
Dave Kreskowiak24-Feb-09 6:17
mveDave Kreskowiak24-Feb-09 6:17 
QuestionProblems getting httpWebRequest to work Pin
rfrank535623-Feb-09 8:22
rfrank535623-Feb-09 8:22 
HI - and Help !

I have a small working app that formats a request to Google Maps, an retireves the data.

I copied the code to access a USGS site - and the string works but the code hangs.

Here is the code

Sub GetElevationData()
'This is based upon GoogleMaps access code
'WebRequestString = "http://ws.geonames.org/gtopo30?lat=" & lineArray(LatPosition) & "&lng=" & lineArray(LonPosition) ' this is the eventual string . . . but I am using the following as a test - I can ctrl click and the link comes up ok with a 2 digit elevation.

Dim test1 As String = "http://ws.geonames.org/gtopo30?lat=33.7669399&lng=-116.4134417"
' documentation is available at http://www.geonames.org"


Dim Request As HttpWebRequest = CType(WebRequest.Create(test1), HttpWebRequest)

'Request.MaximumAutomaticRedirections = 5 Tried these (and lots other options - but no joy)
'Request.AllowAutoRedirect = True

Dim Response As HttpWebResponse = CType(Request.GetResponse(), HttpWebResponse)

'This seems to time out

Dim str As Stream = Response.GetResponseStream()


Dim inBuf(10000) As Byte
Dim bytesToRead As Integer = CInt(inBuf.Length)
Dim bytesRead As Integer = 0
While bytesToRead > 0
Dim n As Integer = str.Read(inBuf, bytesRead, bytesToRead)
If n = 0 Then
Exit While
End If
bytesRead += n
bytesToRead -= n
End While
MsgBox("bytesread " & bytesRead) 'says 4


'inBuf now has the elevation
'bytesRead has the string length

Dim elevationvalue As String = inBuf.ToString
MsgBox(elevationvalue) ' says system byte []
'lineArray(elevationPosition) = elevationvalue
Response.GetResponseStream().Dispose()

End Sub

Thanks

Bob
AnswerRe: Problems getting httpWebRequest to work Pin
Dave Kreskowiak24-Feb-09 3:43
mveDave Kreskowiak24-Feb-09 3:43 
GeneralRe: Problems getting httpWebRequest to work [modified] Pin
rfrank535624-Feb-09 10:21
rfrank535624-Feb-09 10:21 
Question$$$ $$$ NEED VB BASIC HELP - WEB DATA EXTRACTION - NEED CODE !!! $$$ $$$ Pin
pcfacile23-Feb-09 7:49
pcfacile23-Feb-09 7:49 
AnswerRe: $$$ $$$ NEED VB BASIC HELP - WEB DATA EXTRACTION - NEED CODE !!! $$$ $$$ Pin
0x3c023-Feb-09 8:00
0x3c023-Feb-09 8:00 
AnswerRe: $$$ $$$ NEED VB BASIC HELP - WEB DATA EXTRACTION - NEED CODE !!! $$$ $$$ Pin
Mycroft Holmes23-Feb-09 15:57
professionalMycroft Holmes23-Feb-09 15:57 
QuestionHow to place the text at cursor position in vb.net textbox Pin
dilipmca0423-Feb-09 3:39
dilipmca0423-Feb-09 3:39 
AnswerRe: How to place the text at cursor position in vb.net textbox Pin
Dave Kreskowiak23-Feb-09 4:28
mveDave Kreskowiak23-Feb-09 4:28 
GeneralNew features in VB 10 Pin
Kevin McFarlane23-Feb-09 2:23
Kevin McFarlane23-Feb-09 2:23 
QuestionHow save a playlist in vb.net Pin
akosidandan23-Feb-09 2:03
akosidandan23-Feb-09 2:03 
AnswerRe: How save a playlist in vb.net Pin
Dave Kreskowiak23-Feb-09 4:27
mveDave Kreskowiak23-Feb-09 4:27 
QuestionEXCEL-How to trigger a function with the keyboard enter key Pin
Anoop Brijmohun23-Feb-09 2:01
Anoop Brijmohun23-Feb-09 2:01 
AnswerRe: EXCEL-How to trigger a function with the keyboard enter key Pin
Dave Kreskowiak23-Feb-09 4:26
mveDave Kreskowiak23-Feb-09 4:26 
Questioncould some one help me how save ms access database using vb 2008 Pin
akosidandan23-Feb-09 1:55
akosidandan23-Feb-09 1:55 
AnswerRe: could some one help me how save ms access database using vb 2008 Pin
Dave Kreskowiak23-Feb-09 4:17
mveDave Kreskowiak23-Feb-09 4:17 
QuestionEncrypt Stored Procedure Pin
trushitshah22-Feb-09 23:22
trushitshah22-Feb-09 23:22 
AnswerRe: Encrypt Stored Procedure Pin
Dave Kreskowiak23-Feb-09 4:14
mveDave Kreskowiak23-Feb-09 4:14 
Question"Sending SMS CMS ERROR: 301" [modified] Pin
scothyhut22-Feb-09 23:14
scothyhut22-Feb-09 23:14 

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.