cannot add jpg resources to my project
I have all jpeg resources in the project resources folder and when I am in my project preferences in the resources tab. I control '2' to look at images and I select the resources menu item at top and then select the new image item under that the JPEG item under that.
A dialog appears for ADD A NEW RESOURCE and it says please enter name of the new resource.
I type in the name and select the add button.
In my resource window a small rectangle now appears with the name I typed it and nothing else no graphic. If I double click on this the Paintbrush program opens with a small blank rectangle.
I go to the solution explorer on the right and there is a folder called resources with a plus sign beside it. I click on the plus sign once expanding the folder and there is an item listed below it called "XXXX.jpg".
I look at the properties window below the solution explorer and further down I find listed filename and path and it seems to be the correct name of the JPG file in the correct path to the resouces folder.
Why is everything blank?
What am I doing wrong?
What do I need to do right?
I can see things are different than in BETA 1.
I tried to find any helpful information in the resources window filtered by Visual Basic Express.
There is nothing there. I went through the list A to Z and tried to find anything that might help. Nothing even seems to provide the information that I need.
Michael
Could you tell me which version of the Visual Studio you are using? (You can find the version number on the "About" dialog.)
The new image created in the resource designer is empty. It is just a white block, and you need use the PaintBrush or another editor to draw something there. After you paint the graphic, you need save it, and the resource designer should show it on the tab.
If you have already had the JPG file, you might want to add it through "Add Existing File...", but not "Add New Image".
Thanks
Actually, all you did are right. The Visual Studio did create a JPG for you. However, the default JPG is a blank one -- a white box. It may confuse you. There is no JPG editor inside the Visual Studio. You would have to use other editor to edit the JPG file. What you can do is to double click the JPG object, and edit it with the Paintbrush program. (If you do have a better graphic tool on your machine, it might pop up rather than the default tool in the OS.)
In most case, you would want to import an existing JPG file to the project, but not to create a new one. To do that, you can drag the JPG file item from the windows explorer directly into the resource editor. You can also use the menu "Add Resource/Add Existing file..." on the toolbar on the top of the designer to add the JPG file to your project. The default name of the new resource item will be the same as the name of the file (unless it includes invalid characters for an identifier.) You can always change that to what you want later.
Hope it will answer your question.
Lifeng Lu MS