vba - How to run a web process without opening web browser in VB6 -
i want run web process without opening web browser. want update entry when click button dont want open web page. did in c# need in vb6.0
example:
on button click
uri myuri = new uri("http://example.com/_change_status.php? id=67&new_status=2") webrequest mywebrequest = webrequest.create(myuri) webresponse mywebresponse = mywebrequest.getresponse()
set reference microsoft xml 6.0
, :
sub webquery() dim strurl string dim strresponse string dim xmlhttprequest xmlhttp strurl = "http://example.com/_change_status.php? id=67&new_status=2" set xmlhttprequest = new msxml2.xmlhttp xmlhttprequest.open "get", strurl, false xmlhttprequest.setrequestheader "content-type", "text/xml" xmlhttprequest.send strresponse = xmlhttprequest.responsetext set xmlhttprequest = nothing end sub
Comments
Post a Comment