Saving a file from an URL with WebBrowser with VB6 - vb6

I have a project with VB6.
I need download a file from an URL. Then I use WebBrowser:
WebBrowser.Navigate "www.miurl.com/mifoto.jpg"
I need save mifoto.jpg directly to my path, I don't need any question about where I save it.
But WebBrowser always asks me to save it.

check this link it may be what you're looking for... I'd expect something like this may be best to do through the Windows API:
http://vbnet.mvps.org/index.html?code/internet/urldownloadtofile.htm
if you want to use the WebBrowser control I think there are a few properties that may help: Silent and Theater

Related

force download file with a download box using ActiveXObject("WScript.Shell")

could anyone please give me an example on how to force to show the save box using ActiveXObject("WScript.Shell"), without php or other stuff !?
i would like to allow to download some mp3 file, instead those are being opened directly in the windows media player..
i just want to give the user the chance to choose whether download them or just open them
thanks a lot in advance
You need to use the Content-Disposition HTTP header in your web page. It's the cross-browser supported method for forcing a SaveAs dialog to appear.
http://www.jtricks.com/bits/content_disposition.html

How to customize the windows shell to display files from a remote source and allow custom drawing?

Is it possible, (via some shell extension or similar) to customize the Windows shell (explorer.exe) to accomplish the following?
Make it, upon navigating to a predefined path:
draw over its surface - custom background, or even add custom forms for data input
display custom listview items based on the "virtual" path provided (something analogous to what explorer is doing when browsing a FTP repository - the items shown are not contents of a local folder, but rather some "virtual" items physically located on the FTP server)
The idea is to reuse the visage and navigation elements of Explorer without re-implementing the whole functionality and make it look native on all Windows versions for a remote file browser (file lists+files alone served by a custom web service).
I think you need to implement a Explorer Namespace Extension. There is some good information floating around on codeproject etc that you will probably need since the official documentation is not the best.

Winform usercontrol in WebForm

I want to display a "folderview" which I can drag and drop files into but via WebForm. I am doing this via a webbrowser control pointing at local drive. The code works in a win form user control but what I want is to embed this control in web form. This is an intranet so security etc is less of an issue. However when I add things like AllowDrop or the webbrowser control to my control it stops working - I get the image placeholder which I take to mean an error. Can anyone give me an idea what is wrong or perhaps suggest a different solution.
Hi I figured it out when you deploy a new version of your user control you need to clear the GAC download cache - gacutil /clc but I think versioning your dll may work. I don't think web browser control work at all but I may be wrong. I've managed to drag and drop msg files with Outlook Automation see http://bytes.com/groups/net-vb/527320-drag-drop-outlook-vb-net-richtextbox

How do I write a custom start page for VS 2008?

I've looked around, and not found much documentation on this, so I thought I'd ask where all the experts hang out.
I would like to create a new start page, with bug tracking and source control interfaces, rather than the standard MSDN feed. I seem to remember that one can do more than just supply a different URL, but can actually implement a component to run as the start page, which needn't use web content. I may be wrong. Can anyone please give me some tips?
You can do is to create a DTE ToolWindow (read: Creating a ToolWindow hosting a .NET user control) and host your controls there, then its pretty easy to create an addin that will show the tool window as a document at runtime. (The same way that the start-up page looks)
Go to Tools > Options > Environment > Startup and put your RSS URL in the Start Page news channel field.
That should give you enough, but if you want to do more you can select open home page in the at startup dropdown and point it at a URL with the appropriate content. If you use an intranet with Windows authentication you could display user specific stuff.
This will be completely customizable in VS 2010. You'll be able to do anything you want to on the start page.

Can I get the current page sourcecode from a firefox extension?

Can this be done? How?
I want to write my own extension. Can Get the current page sorcecode in my own extension?
As Rich says, adding view-source in front of the URL will give you the current page's source code. A keyboard shortcut for this is Ctrl+U.
I want to write my own extension.
There are a number of existing Firefox extensions that fetch a page's source code and apply some action to it (colour-coding, syntax-checking, etc). Downloading them and looking at how they handle it may be a good place to start!
7 Firefox extensions to explore source code
View Formatted Source extension
If you're new to Firefox extension development, this article at Lifehacker is an excellent primer in how to start, and will give you an idea of where to look in the above linked extensions for tasks that may be similar to your own.
Sure, just add view-source: in front of the URL.
view-source:http://stackoverflow.com/posts/edit/145419
Will show the source of this page for instance - try it in the address bar.

Resources