I am working on silverlight application and I want to save my file in a particular folder through savefile dialog box. But I am not able to save it.
And also I want to open it, let's say through open - dialog box.
How can I do it?
Thanks..
You can open/save files using the open/save file dialogs even outside the isolated storage for the application. Search "silverlight savefiledialog" and you'll find many examples.
Related
I have a treeview control based on the file system and I would like to implement functionality exactly like windows file explorer whereby a user can click on a file and it would display a preview in the preview windows/pane
I have already managed to do this for files such as images and PDF's with a web browser control but I'm struggling with Office files (xlsx, docx, pptx) as it opens the files in their respective applications rather than the preview window.
I've seen quite a few articles like this but can't find a working, or even semi-working example! Any help would be appreciated.
When I open a certain pdf file on SharePoint, I wish to see the Bookmarks Navigation tab open by default. I can do this manually by File > Properties > initial View and changing the Navigation tab to "Bookmarks Panel and Page".
I need to do this with hundreds of pdf files and then upload them to SharePoint.
I am using VBA. I don't mind using other forms of automation.
Currently, I have AVDoc (CAcroAVDoc) and can open the Bookmarks Pane but it's not changed in the settings.
AVDoc.SetViewMode 3
I tried PDDoc.SetInfo etc but nothings changing the "settings".
Any suggestion will be appreciated.
I am running a lot of code in Excel VBA, that does a lot of pdf manipulation. The only thing that remains is to change the settings.
With Acrobat as the runtime, there is no scriptable interface to the initial view settings. However, you can easily use any of several .NET PDF libraries to make this change. A Google search for ".NET PDF Library" will yield both free and commercial varieties. You'll need to research which one is best for your task and skill set.
I want to copy some files to specified folder by NSOpemPanel.
The source file is reading from XML and show to list in NSTable.
I can copy file by copyItemAtPath.
But now my app will turn to sandbox, then I can’t copy the file by copyItemAtURL.
How do I copy the file in sandbox mode?
I was looked over a lot of post. And I think the Security-scoped Bookmark may be a solution for this.
But I can’t create "Security-scoped Bookmark" from XML inside the path (the path was convert to NSURL ready).
I was setting to sandbox.entitlements but it's not clear this problem.
Is there any way for this?
Develop in macOS10.12 and Xcode8.3.3
Thanks
How do I copy the file in sandbox mode?
It is unclear what your current code is doing, but the rules under the sandbox are simple: To read or write a file located outside of an application's own container (which is hidden away under the Library folder) your application must either:
Use NSOpenPanel to obtain a URL from the user for the file path; or
Use NSOpenPanel to obtain a URL from the user for one of the ancestor folders of the file.
The second option gives access to a whole folder, including any sub-folders; i.e. the whole file/folder subtree rooted in the folder.
As you want to copy "some files" it sounds like asking the user for permission for the folder is appropriate. You can customise the NSOpenPanel to be a "request permission" dialog. If you are requesting a specific folder you can also have the dialog open in it's containing folder and only have the specific folder enabled for selection by the user.
Once you have the URL for the folder from NSOpenPanel you can create a security scoped bookmark for it and save that in your app's preferences or other configuration file (stored within the app's container). Doing this enables your app to regain access to the folder on subsequent executions without asking the user again.
If after investigating this issue and writing some code you hit an issue ask a new question, showing your code, and explaining the problem. Someone will undoubtedly help you with the next step.
HTH
I have an application which displays help to user using webbrowser control. Now i'm able to display HTML correctly but If i try to display mht file (which contains images). It throws System.NullReferenceException. Both files are located at same location.
Lot of folks are deploying mht file to isolatedstorage and then reading it from there. Is there easy way todo this?
I've created my own application in VB.NET that saves its documents into a file with it's own custom extension (.eds).
Assuming that I've properly associated the file extension with my application, how do I actually handle the processing of the selected file within my application when I double click on the file in File Explorer?
Do I grab an argsc/argsv variable in my Application.Load() method or is it something else?
Try this article but short answer is My.Application.CommandLineArgs