Adding image from resources to VB.Net - vb.net

I want to add an image from resources to a pdf file.
Tools used are - PDFSharp, MS Visual Studio Express 2012
Language - VB.Net
Currently I am trying to load an image from a drive location as shown below.
Logo = XImage.FromFile("D:\FullPDF.jpg")
But the image should be loaded from the available resources in the application itself.
Please give me a way to accomplish this.
Thanks for the help in advance.

Related

Create a gif from an array of bitmap vb.net (visual studio 2013)

My goal is to creat a gif from (42) images that I got (screenshots from a graphic after a small rotation).
I managed to find some ways to do it, but each time I must instal some package/component/library (I'm not familiar with those...)
A gif is a succession of images right? Isn't there a easy way to "stick" those image on after an other as a gif? Or there is nothing in visual studio for that (I found somewhere in the project tab ---> add a component ---> image.gif but i can't manage to do anything with it)

How can I display excel data with the .xlsx exstension in my windows application using data grid view?

I have an excel file that I would like to load into my form and display there. Is there any way to do this? Sorry I am fairly new at visual studio as well as visual basic. If anybody could help me out with this it would be great thanks.
There are several options - all involve some additional library:
OpenXML 2.0 (free library from MS) can be used to read/modify the content of an .xlsx so you can display it anyway you want (for example in a data grid view)
some (commercial) 3rd-party libraries come with grid controls allowing you to display excel files in your application (be it Winforms/WPF/ASP.NET...) like SpreadsheetGear, Aspose.Cells etc.

How to display an image in a SharePoint 2010 Web Part

I would like to know how to display a local image in my SharePoint 2010 Web Part. I don't really know which url to write in the css.
Add SharePoint "Images" mapped folder to the project in Visual Studio.
Create a WEB-PART-NAME folder inside (to keep related images together and not overwrite some other image by accident).
Place the image in this folder.
Use the following URL: /_layouts/images/WEB-PART-NAME/IMAGE-FILENAME.png

Change thumbnail size in Sharepoint 2010

I tried to find it using google, but there are only tips for 2007.
I want to change a few layout things, which are:
The thumbnail size of an image library
The thumbnail size in a slide library
I found this good explanation here:
http://vspug.com/keutmann/2007/01/27/how-to-resize-the-thumbnails-in-a-picture-library/
But I can't find the screenshot view (these nice options) anywhere inside my Sharepoint Designer. Its 2010, so maybe they moved it somewhere else. Anyone has an idea where to find this options tab from the screenshot?
Thanks a lot,
Chris
The linked article does not describe SharePoint Designer, but rather SharePoint Manager, which appears to be a third party tool created by the author.
You could give it a try. Like the U2U CAML Query Builder, it might still work for SharePoint 2010, especially if it uses web services to connect to the site.
But if it doesn't, you should be able to write a Feature Receiver that will accomplish the same thing by modifying the ThumbnailSize property. That has to be what the SharePoint Manager tool is doing.
Regarding changing the thumbnail size of the Slide Library (which you cannot use Sharepoint Manager to do unlike the picture library)
This worked for me to get a bigger thumbnail..
Note that the solution relies on having a naming convention for your files which you apply after you have loaded them up to the slide library eg ENG_02_0010, ENG_02_0020 rather than leaving them named as is when uploaded to Sharepoint.
Create another field called Preview say and make it a picture (format url as picture)
For each uploaded slide put the url link as http://siteName/slidelibraryName/_t/ENG_02_0010_pptx.jpg (same name as your slide with a _pptx.jpg extension)
Get rid of the standard thumbnail from your view and put this new column next to the selection box
Worked for me, much bigger and readable thumbnail!
PS
In SP designer you can find all the jpg thumbnails in the _t directory under the slide library
You can also use CSS on the page where you're displaying the thumbnail images. Here is an example:
<style type="text/css">
img[alt="Thumbnail"] {height:100% !Important;width:100% !Important;}
</style>
This looks for the images with an alt attribute of 'Thumbnail'. I successfully tested this with a Slide library in SharePoint 2013 using IE & Chrome.

Displaying a PDF in a control in Visual Basic 2010

I just installed Visual Basic 2010, went through some tutorials on how to display files, but can't find any material on how to select and embed existing PDF files into a form. Any suggestions or pointers in the right direction would be great, thanks!
Just embed a browser control in your form and navigate that to the PDF file. That should do the trick.
There aren't too many out of the box controls for that. Anyway, this guide might be helpful:
http://visualbasic.about.com/od/quicktips/qt/disppdf.htm
Disclaimer: I work at Atalasoft.
We make a GUI control that can load a bunch of image formats, and an add-on to turn PDF pages into images. The GUI control (ImageViewer) is part of our free SDK (DotImage Photo) and you can learn about the add-on here: http://www.atalasoft.com/products/dotimage/pdf-reader