If I put a shape on an Excel Spreadsheet and run this VBA code:
Sheets("Sheet1").Shapes("myShape").Fill.UserPicture "http://maps.googleapis.com/maps/api/streetview?&location=51.499473,-0.12902&size=256x256&heading=0&sensor=false"
Then a streetview Image shows immediately in the shape.
Now, fast forward to me trying to do the same in MS Access - I put an Image control on an Access form and run this:
Me.myImage.Picture = LoadPicture("http://maps.googleapis.com/maps/api/streetview?&location=51.499473,-0.12902&size=256x256&heading=0&sensor=false")
I get an error:
Microsoft Access can't open the file [then shows URL as above]
I can't seem to use an unbound Object frame either, and various permutations of the URL don't help.
I know that I can use the Access Web Browser control, but I don't want to do that.
I also know how to download the image to a temp file on the C drive, and then load it into the image control. But I'd like to know if possible how to do it in 1 step (avoiding the temp file.
So, any ideas on how to load the streetview image directly into an Image control on an Access form?
Thanks heaps
The problem is you are using the wrong control. use a WebBrowser control and it should work for you. In Access 2007 + :
Related
I have a basic file upload widget which works fine in almost all cases but have just noticed that it seems to handle shortcuts differently to all other file types.
So for example the current issue is that when a user clicks to upload directly with the file upload and you give it a shortcut, it automatically resolves the underlying file the shortcut points to, everyone is happy.
However if you were to instead drag and drop the file onto the control it sends through the underlying .lnk shortcut file, so just wondering why there is different behavior here and if there is anything I am doing wrong here or if because the browser interprets these 2 things as different interactions it is correct in not following the shortcut in the drag and drop scenario.
The file data is resolved as:
var files = fileSelectionEvent.target.files || fileSelectionEvent.dataTransfer.files;
As both the file input and the drag and drop end up pointing to the same function with the js event just being captured and passed through.
While you click the upload button, it shows a system-provided file chooser. When you select a shortcut file (*.lnk), Windows will automatically replace it to the real file which the shortcut points to.
While you drag and drops files, Windows doesn't handle them. So the shortcut files are received by browser directly.
Basically what the title says. I have an ImageList control in my Access project. When I try to add this certain image, I get an "Invalid Error" popup message and then Access proceeds to crash and I need to restart it. The image is getting added in design time in the ImageListCtrl Properties window.
The image I am trying to upload is a .bmp just like all of the others I have. The only difference with this one is that I had downloaded it as a different file type and used an online converter to make it a .bmp (not sure if that would change anything).
I am using Access 2010.
Hi I'm brand new to programming and I'm trying to program a sight reading app using pygame. I'm on a mac. I just need somewhere where I can download or create and save images onto my computer that can be manipulated using pygame. I've spent 3 days so far just trying to get something that resembles a note or bars that I can save in a file and load into a pygame window without success. I tried drawing it out on gimp, downloading premade stuff online (which my computer cant open for some reason even though its downloaded in files in my finder), and using a few different applications that have to do with creating sheet music. Basically my problem is that I have no idea how all the different types of files work and my computer just doesn't even open 99% of what I download or save, it just opens up an app, "File into Professional" and then gives me a window with a bunch of gibberish and apparently that has to do with the file I'm trying to open. Any advice is appreciated, obviously I have no idea what I'm doing.
When opening a 'image file' (.jpg,.png,etc) with some program, and it ends up opening with gibberish, that means that that file type is not supported by that program and it just defaulted to opening the binary of the file.
When opening image files (I'm assuming that is what you are using for your assets), you can just use the default 'photos' app. You can right click and select 'open with' if double click is not opening with photos.
I would suggest saving your gimp images as .png files (remember you need to export as .png or save as .png, not just rename the files after saving them).
What types (in terms of file extensions) are you trying to open and having difficulty?
Working on an old MS Access 2000 database I didn't create. Has a working "projects report" which the client wants to send to prospects as a PDF document, replacing the currently-text-only project title with a title that is also a hyperlink linking to a web page (we can generate the URL programmatically).
Note: Access 2000 does not have a built-in "hyperlink" object for its reports as far as I know -- not sure if newer versions do or not.
Any ideas re: the best/quickest way to go about this? Development time/cost is a concern/constraint, but it's a long enough project list they'd rather not have to export the report to Word or something and manually create the URL links, exporting to PDF as a third step.
Check out this for creating the PDF.
http://www.lebans.com/reporttopdf.htm
As for having a URL in the PDF...I don't think it can be done. But I would wait for others to comment to be sure.
Seth
I'm trying the following code http://code.google.com/apis/ajax/playground/#change_the_playing_video
It works well when runned from the playground page. But if I create a new localfile with the source code provided as sample I get the following error:
ytplayer is not defined
at line 40:
if(ytplayer) {
ytplayer.loadVideoById(videoID);
}
It looks like for some reason I don't get access to some part of the javascript needed by the sample.
Is it just me? Or sample code don't run outside the playground page?
Pretty sure it's a security problem with flash. When I try to load it locally, I get the following popup, but it works fine on my server.
(source: fullahead.org)
If you check out the Developers section in the following Adobe reference, you should be able to get it working.
This has to do with same-domain restrictions in Flash. Local files trying to access resources on the internet counts as "cross-domain" access. To whitelist your local file, add it's location to the global security settings. Click on "Edit locations..." and then "Add location...".