Topic: Just basic programing
Niceladyrealy's photo
Mon 03/26/12 01:26 AM
How do i add a picture into a program?

funhippy's photo
Mon 03/26/12 10:22 AM
A common question. Unfortuneately you need more details to get a relevant answer.

1) what program?

2) where are inserting the item.

Those two will help narrow your answer.
glasses

no photo
Mon 03/26/12 10:53 AM
In what language are you writing the program?

Totage's photo
Mon 03/26/12 10:56 AM

How do i add a picture into a program?


Depends on the program.

no photo
Mon 03/26/12 11:10 AM
wow, what a question.

Need more input.


oldhippie1952's photo
Tue 03/27/12 03:27 PM
If it is BASIC like the title says I would have to say being out of VB programming for the last 10 years means I forgot! oops

Mirage4279's photo
Tue 03/27/12 07:48 PM
There are two languages that I know how to display images on HTMOL/XHTML - Java Script and Java. For a web- page it is a little bit easier.

HTML/XHTML - JavaScript goes like this

<body>
<img src="locationOfImage/asAStringArgument.jpeg" height="100" width="100" />
</body>

in Java there are a number of ways but I only know one off the top of my head.
import javax.swing.*; //<----before the class


ImageIcon entityRefrence = new ImageIcon(getClass().getResource("locationOfImageAsARelativePath/nameOfImage.jpeg"));

Mirage4279's photo
Wed 03/28/12 02:12 AM
Unfortunately it is a little more technical then you would like for it to be. It varies from language to language and you'll need to know some basics of programming in order to do it. On my response above it assumes you know some Java basics. If it was written in Java I could possible do it. Jar files (commonly used files when written in Java as they sit in permanent storage) are similar to zip files (almost exactly the same) so you must extract the .java files (class files) which contain the actual code which many programmers do not know how to do unless they are experienced (extracting the clas files from the jar/zip files). Then you would open the class file in an editor such as NetBeans or you could even do it with simply notedpad that comes standard with Windows. Then you would add code similar to the code I added (although I think a different method would work as well that might suit this situation better) for applying your personal image to. Not really really easy as you might think that it is. You need a programmer that knows the language the program is written in.

RainbowTrout's photo
Wed 03/28/12 07:43 AM
<iframe src=”http://dl.dropbox.com/u/133108/lubuntu/widget.html” style=”width:180px; height:150px; border:0px;”>There was an error loading the countdown.</iframe>

Niceladyrealy's photo
Wed 03/28/12 10:22 AM
I got a program called "jus basic version 1.01 i load it onto win7, the help menus does not work: i added loadbmp athe begining ofthe program, it doesnt load anything. My program run,yet the picture doesnt show on screen.

Totage's photo
Wed 03/28/12 11:25 AM
Is it compatible with Windows 7? Sounds like a software issue, have you contacted their support for help?

Are you trying to write your own program in a BASIC language? If so, they may have a community or website with help resources, tutorials, etc.

Niceladyrealy's photo
Wed 03/28/12 11:55 AM

Is it compatible with Windows 7? Sounds like a software issue, have you contacted their support for help?

Are you trying to write your own program in a BASIC language? If so, they may have a community or website with help resources, tutorials, etc.
ive tested ,loadbmp on win7 and xp, doesnt work,maybe ineed more code? Im trying to load a simple bmp(picture file)inside a "just basic"program. Its the first line of code to add a picture background to the program, the rest ofthe program works. I dönt know how to display a picture with the "just basicomand syntax" i could not find a manual for this program.

Niceladyrealy's photo
Wed 03/28/12 11:57 AM

Is it compatible with Windows 7? Sounds like a software issue, have you contacted their support for help?

Are you trying to write your own program in a BASIC language? If so, they may have a community or website with help resources, tutorials, etc.

Totage's photo
Wed 03/28/12 12:03 PM
Ok, JustBASIC is the free version of LibertyBASIC.

Their commnity is at http://justbasic.conforums.com/

Try looking there and asking them, they should be able to help you out.

JustBASIC website: http://justbasic.com/index.html

Mirage4279's photo
Thu 05/03/12 02:29 PM
Edited by Mirage4279 on Thu 05/03/12 02:44 PM
To answer this question realistically is .... if it was written in Java and as a jar file or a web-page I possible could...otherwise it is more difficult than you might think...

If you have an executable and try to open it in an editor the code is completely ASCII type code... a ton of numbers and letters in a sequence where you can make out words by looking at every other letter or so.. this is not possible to place an image into it and re-package it as an executable or jar or what have you... (there is prolly a way to pick .exe's a part but I am unaware).. jar files are similar to zips and one quick look in their io section of my book and I can remove all the class files for adding code and images...html files (web-pages) usually reside on a server and manipulating these files is pretty much hacking them... however you can manipulate an html file very easily it will simply not effect the copy that resides on the server that you got it from..meaning you could change an image or add any code on an html file and keep your own copy of it.. all the links and everything else would still be good on your own personal copy of the html...

Now you mention Windows 7 and I imagine there is a way to do exactly that of what your asking... each image that is displayed is specified using a URL that specifies it location on your drive...every image icon that is pictured is located on your hdd and the location specifeid..somewhere somehow the program knows where to find it where the location of the image that is displayed is specified with a path such as C:/Program Files/image.jpeg

an example might be to right click on my photo..depending on which browser your using it will allow you to copy the images location..you can then erase all the text in the text field of the web browser and press control+V to paste your copied location .. then click it or hit return and you will be directed to a page that contains the photo..just the photo...almost all images work like this