Getting the default icon from a filepath even if the file isn't available - vb.net

I'm trying to get the associated icon for a file so I can display it in a ListView in my VB.Net code.
However, I can't use the ExtractAssociatedIcon function that all the Googling I've done points me to, because this is for a cataloguing function and the original file is not accessible, so all I have is the file path as a string (from which I can extract just the extension if necessary).
Is there a way I can get the default icon for a particular file extension, even if the file's unavailable?
Thanks

Related

Always show the file extension inside the folder using vb.net

Currently, I am working on an application that will need to always show the file extensions of the files inside the folder.
Example:
I have a folder named Awards and the Contents are Images.
Contents:
As you can see, the file extension is hidden.
But when you click the options red boxed on the image. the file extension will be shown.
My question is, Is there a way to check the checkbox on the Image using vb.net? If it is possible? How??
Thank you and Regards,

Print button didn't save the PDF file at a shared path, and no error logged

I have an Excel macro that uses SAP for printing data in pdf format.
Steps:
it access the SAP transaction which provides a table with the necessary information
it press Print button (from the Menu Bar of SAP)
then Print window appears (from here it is selected Microsoft Print To PDF option and then it is pressed OK button)
Save As window appears (complete the path and filename: \S\BC....\outputName)
then Save button it is pressed
then no error happens
But if I access the path folder "\S\BC....", nothing happen, there is no file saved. BUT, if we look in "Date modified" property of the folder, it is modified in accordance with the last saving time.
Also, I mention that if I'm trying to write the pdf file on local folders, not network shared folders (example: a desktop folder: C:\Users\mariah\Test), macro works.
Also, I mention that user can Read&Write at the shared path \S\BC....\
Please help me to find the cause of this issue.
A VBA macro only does what you are allowed to do manually. Can you manually save the file in the shared path without the macro?
Is the common path really \S\BC...\ or \ \S\BC...\ ?
Regards,
ScriptMan
Solution proposed by the OP in this comment:
IT WORKS if I save the file on "C:\Users\UserName" and then cut it to shared path "S\BC...". So I've implemented code that saves the file in a path and then copy it to another path and then I deleted it from the first path (such that user never knows that I copy the file in other destination than desired destination).

Saving a text file from external source to my app Objective C

Abstract Question here I guess
I have an idea for an app that parses .txt files and outputs info based on what is contained in the file. My question is how would I go about getting the text file into my app for example if the text file was attached to an email?
This is the only hurdle I have to get clear in my mind before I begin.
So here's a real life scernaio -
I have email with text file, I want to open my app and say import file.
I need to get that text file from my email into the app so I can manipulate it.
Not sure this is possible, hopefully somebody can let me know or suggest a workaround.
Thanks in advance!
Register your app to open a particular file type and ensure the attached file is identified as one of these file types (i.e. using mime type). You will probably want to use a unique file extension, other than .txt.

Select a file and get its path and filename

Using VS 2013 and vb.
I have a web page and on a button click i would like file explorer to open so the user can navigate to a folder location and highlight a file. The web application will then get the path and filename of the file. Just to be clear I dont want to open the file I just want the details.
I cant seem to find a way of doing this, can you help?
UPDATE
Apologies perhaps I havent explained my self very well.
This is so a user can reference a document saved on a file share with a particular audit (the web page is for recording audits). Therefore they will click a button and file explorer will open. They will navigate to a folder (will be different everytime) and select a file. File explorer will then close and the web application will know the path of the file and its name. I can then use this to create a link on the web page to that document.
For getting directory path use; System.IO.Path.GetDirectoryName(path)
For file name System.IO.Path.GetFileName(path) or System.IO.Path.GetFileNameWithoutExtension(path)
more info is available at http://www.dotnetperls.com/path
Use path.getFullPath() method to get the file path as a string.
If you want to get the file name only use path.getFileName() method.

Edit .blend file's Text only

http://www.blendswap.com/blends/view/73614
I have downloaded this and want to use my own text on it using Blender (or another program). It is not used for commercial purpose. When I open it, I get no option to edit text. I tried edit external and GIMP which failed.
the .blend file is binary and can only be opened inside of Blender, When you create text objects they are displayed as objects inside blender. You should be able to find the object by using the object browser section inside blender and changing it there. You may have to recreate the text object depending on how the author did the original.