rvalkass
Mar 11 2006, 06:48 PM
I downloaded Microsoft's Visual Studio Express suite a few months ago, but only recently got around to installing it. I have been practising with Visual Basic and making some rather basic programs and utilities, but they contain most of the basic concepts. This tutorial will explain how to create a basic image viewer, and I will try to explain each step from beginning to end as clear as I can. To start you will need: - Microsoft Visual Studio
- About 10-20 minutes free time
OK, first open up the Visual Basic part of the Studio. I am using the 2005 Express version, so some features may differ between versions, but most stuff should be relatively similar. Once it's loaded click File > New Project (or press Ctrl + N) to get the New Project dialog. Make sure you have Windows Application selected, and give the project a sensible name, then click OK.  Now the screen will show you a blank form. This is the basis of your application where all of your controls, buttons etc will be placed, and represents exactly what your end user will see. Click on the Toolbox button on the left hand side of the screen, and make sure you are viewing the All Windows Forms section. This pane lists all of the possible controls you can put into your application. Drag the one called PictureBox onto your form, and position it in the top left hand corner, like this:  Also drag a Button onto the form, and position it near the bottom border, roughly in the middle. Finally, drag on an OpenFileDialog, and position it anywhere on your form. You will notice that it doesn't appear in your application, but in a separate pane at the bottom of the screen. This pane contains all of the elements of your form that are not visible until you call them, or are permanently invisible, such as counters and timers. You now have all of the elements for your application, so you just need the code. Double click on the button you dragged on earlier. The view switches to the programming view, as opposed to the designer view. A command is created that will be run when the button is clicked, and your cursor positioned ready to type the code. Copy or type the code below where the cursor is: CODE OpenFileDialog1.ShowDialog()
This will cause your dialog box to display when the button is clicked. Now we need the picture box to display your chosen image. Right click in the code view, and select View Designer. Then double click the OpenFileDialog1 button at the bottom of the screen, and put this code where the cursor is. CODE path = New Bitmap(OpenFileDialog1.FileName) PictureBox1.Image = path
We have now defined path as the filename chosen in the dialog box, and have set the picture box to display that image. Notice that the word path has been underlined in blue? This is similar to the spelling and grammar mistakes in Word, and shows that you have failed to define something or have spelt something wrong. This is because we haven't defined path. At the top of the code view you will notice the following line: CODE Public Class Form1
Below it, add this line: CODE Private path As Bitmap
We have now created a bitmap ready to display your image, and the blue underlines should disappear. Your project will now work, but if you click the little green Start Debugging 'play' button on the toolbar, and click your button to load an image you will notice a number of faults. Firstly, your Picture Box is far too small to display an image. Secondly the button is labelled Button1 and finally, the application is titled Form1. This shall all be fixed, along with a few extras. Close your application, or click the Stop button, and then flick back to design view and click on the button we added earlier. Make sure you can see the Properties window, which is normally a panel on the right hand side. If not, push F4 and it should appear.  This Properties pane shows all of the settings and choices you can make concerning your button. If you scroll towards the bottom of the list you should see a property called Text. With virtually all of the controls you can add, Text is the text displayed on it, so with your button change this property so it says something like Load Image... and push enter. Click on the title bar of your form and change the text property again to something more logical than Form1, perhaps Image Viewer. Now, to get your images to display properly within your picture box, we need to change some other settings. I will just list them here, but you can read up about them in more detail in the help section if you wish. - Anchor: Top, Left, Bottom, Right
- BorderStyle: Fixed3D
- SizeMode: Zoom
Finally we just need some positioning. Click on the picture box and drag it so it fills most of your form, leaving space at the bottom for the button. Then click on your button and resize it so that it displays all of your text, then click Format > Center In Form > Horizontally . Finally set the Anchor property of the button to Bottom. Now click the Start Debugging button and there should be a vast improvement  To turn your application into a working, distributable .exe file, click on Build in the toolbar at the top, and then Build (Your Project Name). You have now created a .exe file, which can normally be found at the following path: QUOTE C:\Documents and Settings\Your Username\My Documents\Visual Studio 2005\Projects\Your Project Name\Your Project Name\bin\Release
Here is my finished product: 
Reply
Cena_54
Mar 12 2006, 02:01 PM
Thanks for this man, I have created a viewr using Delphi 7, and it is a very similar way in which you have performed this. I will post my tutorial also for Delphi users when I have the time to install Delphi again. Is it easy to transfer from Delphi to Visual Basic, as I want to learn how to code in VB? Thanks.
Reply
Dawiss
Mar 12 2006, 08:03 PM
Nice thing.. but only problem I have in this tutorial I don't have such program called Microsoft Visual Studio  .. Is there any way to download it for free.. because maybe some computers alredy have this program in but mine is pretty old junk*  .. But nice tutorial and useful thing that could help out a lot  .. GooD JoB.. keep it up  ..
Reply
Mortanis
Mar 14 2006, 11:30 PM
Yeah the version he/she (I'm not sure) is using is free from microsoft.com (or at least it was for me And nice tut  . It's so rare to find one for express edition
Reply
iGuest
Oct 5 2007, 01:51 PM
Very helpful page indeed :) Thanx -Deepak Ramdas
Reply
Recent Queries:--
back box image viewer tutorial - 2.24 hr back. (1)
-
image folder with database vb - 3.14 hr back. (1)
-
simple vb image viewer - 4.42 hr back. (1)
-
creating an image viewer using javascript - 6.20 hr back. (1)
-
image viewer dynamic bar - 19.05 hr back. (1)
-
developing a image viewer with visual basic - 30.48 hr back. (2)
-
image viewer using css - 32.01 hr back. (1)
-
vb.net captcha viewer - 43.58 hr back. (1)
-
creating basic image viewer - 57.59 hr back. (1)
-
a basic image viewer - 57.64 hr back. (1)
-
only syntax for create database in vb 6.0(just for image) - 58.79 hr back. (3)
-
create simple javascript upload image to folder - 67.05 hr back. (1)
-
code to create our own image viewer - 71.79 hr back. (1)
Similar Topics
Keywords : creating, simple, image, viewer, visual, basic, 2005, express, edition
- Create Dynamic Html/php Pages Using Simple Vb.net Code
Taking your application data, and creating a webpage for others to vie (1)
How To Start Your First Game Project
The first steps to creating your own game! (0) Ok, I see alot of questions around the game development forums of people wanting to make their first
game, but they don't know where to start. So, I decided to write this tutorial, having been in
the same situation before. NOTE: This Tutorial: -Is meant to help you get past that initial bout of
developer's block -Does not teach you how to make a game, just help you start -Cannot help you
if you cannot answer the questions asked So, let's get to it, shall we? How to start
your first game project: --So, the first thing you need to make sure yo....
Get Back Lots Of Disk Space
Windows XP/Vista MCE (Media Centre Edition) (7) So, some of you might know about this already but, anyways... The other day I was trying to install
a game but did not have the necessary disk space, so I deleted files that I will not use, and other
files that I do not need... I compressed some files that I might use later in the future... And just
doing that got me back around two to three gigabytes of free hard disk space... But that's not
enough, the game needed 6 gigabytes of free disk space! So what did I do next? I ran CCleaner...
It took a while yes, but soon it free'd another 2 gigabytes... ARRGH&....
Getting Started With Mysql
creating tables and insert data into them. (2) Hi in this tutorial you will learn how to create tables and insert items into them. First steps are
to create the database - go into your cpanel and mysql databases, from there make an account and a
database and then attach them together with all priviliges, call the database test and the account
admin, with the pw as pass - or any other password. We need to connect to the database so first in
your php file (probably named index.php) - this is how to do it. CODE
mysql_connect("localhost", "admin", "pass") or
die(mysql_error(&....
Ftp In Visual Basic 6.0
Start making your FTP client using VB6 (1) Recently, I had a need to make a FTP client, since our webhosting FTP server was kind of exotic, and
very restrictive, and most of uploads, even though they reach 100% would crash... File would be
uploaded to a server, but FTP clients just froze upon completion, waiting for the 226 (OK) from FTP
server... So, I had to make my own, one who would not wait for 226, but instead, watch the file
pload progress... This tutorial is not fuly complete, in the sense that it does not offer COMPLETE
FTP client functionality (for example, I ddn't write the code for FTP download, ....
Creating Navigation For Html Websites
Have a common navigation menu for the whole website! (12) Pre-requisite: HTML, inline frame tags 1 Attachment(.zip) included. Updates : 29-12-07: Doctype
added in example files (Advised by jlhaslip) Designing a whole website takes a lot of planning
and organization. Designing a proper navigation system is a basic step in building your website. If
you are developing webpages in html you would have observed that as you go on creating pages it
becomes difficult to maintain the links to the pages. This article will guide you in developing a
common navigation menu for your website. It describes three ways, so if you don'....
Background Image Swap Script
Change a Background Image based on clock time (15) Background Image Changer Script To swap the background image from your CSS file according to the
Server Clock Time. 1.) In your CSS file, add the following rule: CODE body {
background: url(time.png); } 2.) Create a "folder" named time.png. 3.) Into the
folder, place three images named morning.png, day.png, night.png. 4.) Also, in the same folder,
create an index.php file and copy/paste the following script. CODE <?php $hour =
date('H'); if ($hour < 12 ) { $image =
"morning.png"; } ....
Image Rotator Script (another One)
easy to implement (0) In case you haven't noticed, I have a different Avatar display on the Forum each time the page
is refreshed. /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif"
/> For those of you who might want the script to do that, here is the one I am using: HTML
$filesp = glob('*.png'); if(empty($filesp)){ echo
'no images found...die br >'; die(); } else{ foreach ($filesp as
$file) { $img_array[] = trim($file); }....
Creating A Resume
10 Tips For Making A Resume (1) I've been working on my Resume for months now. Here is a summary of what I've learned: 1.
Avoid referring to yourself via 1st person or 3rd person terms. Rather than saying "I started this
job in" just say "Began job in"... Employers expect Resumes to be professional and avoid reference
to oneself; and instead speaking in an impersonal tone that presents
achievements/skills/experience/education without personalization. Avoid words like "I", "my", "he",
"she", etc. Leave out personal pronouns and only use the action words/verbs. This also includes
your Ob....
Programming In Glut (lesson 4)
Creating 3D objects (0) Lesson 4 of 6. I hope you are enjoying them /laugh.gif" style="vertical-align:middle"
emoid=":lol:" border="0" alt="laugh.gif" /> . QUOTE Hello, in this tutorial we will be creating
a 3D pyramid. We are building this tutorial from Lesson 3, but I took out the 2D objects and placed
a 3D pyramid in there instead. The 3rd axis for drawing can be a litle confusing, but after you get
the hand of it you'll do fine. Now when you are setting a 3D vertex just remember that the
camera is on the positive end of the z axis. So things that have a more positive z axis va....
Programming In Glut (lesson 1)
Creating a windwo (0) This is the first of six lessons I am transferring from Astahost for programming in GLUT, and after
the six I hope to make more, I hope you enjoy. QUOTE Hello, I'm starting a series on how to
program in OpenGL using the OpenGL Utility Toolkit, a.k.a. GLUT. I chose GLUT because it is quick
and easy to write, and very easy to learn. In this tutorial I am going to teach you how to create a
basic window which we will build off of in later tutorials. Throughout the tutorial I will leave
notes to let you know what each command does, and how you can modify it to fit....
Math Captcha Image Validation
(1) This tutorial will show you how to make a basic math CAPTCHA validtion form. This requires that you
have the GD library for PHP installed to work. This tutorial requires 2 files, login.php and
action.php. The first step is to create a sub-folder to store the temporary images, for the
purposes of this tutorial,this folder should be called images. Now upload a image in there called
verify.php and chmod just that image(not the folder) to 777 so that image can change as our
functions generate new images. Ok, after you've done that, we can get to the code: in login.p....
A Simple Php Captcha - Image Validation
(21) OK, I recently had the need to create a PHP CAPTCHA system for a friend, and I am sharing this as a
tutorial with the good people here at Trap17. I am sure you have all seen a CAPTCHA before (although
you may not have known what it was called). They are the little codes you often have to enter when
you register with a site, to make sure you are a person and not an automated script. Some common
examples look something like this: My system doesn't really do anything as fancy, but I
think that it is slightly more readable that some of those that get generated. Every....
Image Gallery Tutorial Using Hoverbox
A php solution to coding the Hoverbox Image Gallery (14) As reported in another posting , there is an Image Gallery named Hoverbox from the Sonspring site
which is a pretty cool display method using CSS to have Thumbnail pictures double their size by
hovering over them. I liked the css included in the original Tutorial as found on the Sonspring
site , but I knew there was more than one use for the Hoverbox and took it upon myself to explore
the use of the Hoverbox on a site I webmaster. One thing that wasn't right was having to
hardcode the image tags, so the first version I wrote used php to fill the Hoverbox by rea....
Tutorial: Creating Custom Icons For Devices
Give that device a great icon every time you plug it in! (0) Ok for this tutorial I will use the PSP as an example of the device, this should work for every
device. (THIS WILL NOT HARM ANYTHING AT ALL!) First off, open notepad and type in:
ICON=ICONE.ICO Save that as AUTORUN.inf Now, find a picture you like.. make sure its dimensions
are 16X16 pixels. Put it in the main folder of the device, for example, my psp is located at
F:\, i would type in F:\ to the adress bar and put the picture in that folder, as it is
the folder your computer automatically reads, anyways, put your picture in there and name it: ICO....
How To Make Image To Highlight When It`s Mouseovered
(8) Place this code between and tags. CODE <script
language="JavaScript1.2"> <!-- function makevisible(cur,which){
strength=(which==0)? 1 : 0.2 if (cur.style.MozOpacity)
cur.style.MozOpacity=strength else if (cur.filters) cur.filters.alpha.opacity=strength*100 }
// --> </SCRIPT> Place the following code within all of the image tags you'd
like the effect to be applied. CODE
style="filter:alpha(opacity=20);-moz-opacity:0.2"
onMouseover="makevisible(....
Creating A Timer Program
Using Visual Basic 2005 (8) This tutorial will explain how to create a basic timer using Visual Basic Express 2005. If you
don't have it, it's free and you can dowload it from Microsoft's website. All you need
is a few minutes to sit down and read this and a version of Visual Basic. OK, so what will this
timer actually do? Well, you are able to enter a number of minutes and a message, and then click a
button. Once the timer is up, your message pops up and you are reminded! So, basically it's
a little reminder system. I use it to remind me when TV programmes start, when I have to....
Image Shack Mod
For Invision Power Board (2) Image Shack Mod For Invision Power Board ''These instructions will help you to install
'ImageShack on your Site' into the reply, quick-reply, and post-new-thread sections of your
Invision Power Board, thus giving your visitors the ability to upload images directly. After upload,
they may paste the images directly into their post box.'' CODE These instructions will
help you to install 'ImageShack on your Site' into the reply, quick-reply, and
post-new-thread sections of your Invision Power Board, thus giving your visitors the ability ....
How To Make A Web Browser
Visual Basic 6 (49) This is a simple and specific tutorial on how to make a basic web browser in Visual Basic 6. Steps
1-3 Create a new project, and then go to "Project" on the menu. Click components as shown in the
following image. Find the component "Microsoft Internet Controls," check it, and click "Apply" and
then "Close." Click the icon that was just added in the tools window, and draw a large sized
window with it. This is going to be where you view webpages through your browser, so don't make
it small, but leave room for buttons and other accessories. Steps 4-6 Make a t....
Getting Started With Amfphp And Rias
first steps in creating RIAs (2) AMFPHP in a short way is a library of php files that let u manage in JUST ONE FILE what u would do
in many files like for example queries to mysql. So u can have tons of queries to mysql and all of
them in just ONE FILE! so what is a RIA? a RIA is a Rich Internet Application commonly given
to flash applications, not the animations or presentations we see daily on the internet but very
useful and cool programs made in flash. the fisrt step u need to take is to download the AMFPHP
library directly from its site at www.amfphp.org, in some free hosted sites the latest....
Remove Outlook Express Splash Screen
(3) In order to remove the OE Splash screen you must edit your registry: 1. Run regedit 2. Go to the
key named something like
HKEY_CURRENT_USER\Identities\{EC7994FF-9DB7-4854-B5F1-C3D3956DED35}\Software\Mic
rosoft\Outlook Express\5.0 3. Add a new DWORD called "NoSplash" 4. Set it to "1" ....
Delete Files And Directories Using Php
following up from creating and writing (7) How To Delete Files and Directories follow up from creating them Hello all and
welcome to my second tutorial involving file management. In my previous tutorial , I explained how
to create, write and read files. In this tutorial I'll explain how to remove the files and
directories you took so long to create. I did not explain last time how to create directories as I
did not know, now I do, you can use the mkdir() function. Now with this tutorial.... Removing
Files Removing files can easily be done with the unlink() function: CODE <? un....
How To Stop Image Hot Linking
for a selected directory. (17) Those of you that don't know what is meant by 'hotlinking', it is when someone directly
links to an image on your site so it will display on their site. This is what is called
'bandwidth theft' and being as accounts here have a limit on bandwidth, your bandwidth limit
could be exceeded by someone else hotlinking to your images. As most users of cPanel will know,
there is an option to disable hotlinking of images in the "Site Management Tools" section.
However, this disables hotlinking to all directories, what if you only want to disable hotlinki....
Image Rollovers In Javascript
A Write-Once, Use-Anywhere Approach (11) Tutorial: Image Rollovers w/ Javascript, by Rob J. Secord, B.Sc. (SystemWisdom) See a
working Sample of this Script! Download a ZIP containing all working files in this
tutorial! Note: If you are not interested in reading this entire tutorial and/or have a basic
understanding of the underlying concepts, you may safely skip to the Implementation section to get
the code! Description : A Dynamic Image Rollover Script tested to work in 4 major internet
browsers: MSIE, FireFox, Netscape and Opera. Using only Javascript combined with regular HT....
Simple Login In Visual Basic 6
user interaction example trough login programm (6) First of all, I am NOT a programmer, this is something my friend taught me. It describes basic
interaction with the user, while showing basic functionality of this simple programm. So, without
further ado, we're off to the tutorial: First of all, start your visual basic, when prompted
for new project, select Standard Exe . Next, we need to open code window, so we can start typing
the program. This can be done in two ways, one is double clicking on the form, or selecting Code
from View menu. If you double clicked on the form, you will see following text: CODE ....
Image Preloader With Progress Bar Status
Pure Client-Side JavaScript tested in 4 Browsers! (23) Tutorial: Image Preloader with Progress Bar, by Rob J. Secord, B.Sc. (SystemWisdom)
Description : A Tutorial for a Client-Side Image Preloader with Dynamic Real-Time Progress Bar
Indicator written in JavaScript! Tested to work with 4 Major Internet Browsers: Firefox, MSIE,
Netscape, Opera (Complete sample solution provided at end of tutorial, just put it on your
web-server, add your images and go!) Intended Audience : Beginner to Intermediate Web
Developers. Although this tutorial will cover some advanced aspects of JavaScript, I will try to
explain....
Creating Your Own Icon
(23) It is easy to create your own icon, just pick a bitmap (.bmp) file and change its extension to .ico.
To do so, open the Windows Explorer, click on the View menu (or Tools in WinMe), click Folder
Options, click View tab, remove the check on the "Hide file extensions for known files types"
option, and then click OK. Select a bitmap file, press F2 key, and then change its extension to
.ico. Have fun learning:)....
A Little Introduction To 3d Studio Max
How to make a simple abstract image (9) This tutorial will teach you the basics of making abstract images in 3D studio max. In this example,
I used a simple sphere, and applied the “Noise” modifier. Then, I applied a transparent, blue,
plastic-like material to spice up the whole thing. Let’s start. First, make a sphere by selecting
the “Sphere” button in the “Standard Primitives” section, and draw somewhere in the center of the
perspective view. We will set the size of the sphere later on. The sphere I made looks like this,
yours can be different in size and color, but the only thing that is important is to....
A Guide To Css And Creating A Stylesheet
(15) Table of Contents: I. Introduction II. Starting your stylesheet --A. Starting syntax with
font-family --B. Defining classes --C. Using classes III. The STYLE tag IV. Comments in CSS V. The
"a" tag VI. A quick list of common attributes VII. Notes --A. Universal classes --B. Grouping --C.
Multiple instances VIII. Finding other attributes IX. Closing I. Introduction Firstly, to begin
using a stylesheet, you must have one. Open up your text editor and save as (something).css. I know
NotePad doesn't need quotes for a stylesheet, but I'm not sure about other progr....
[tutorial] Visual Basic 6
Closing Programs Right, Why END is bad (4) This tutorial applies to all those people who insist upon using "End" to close their programs: End
stops the program immediately without any thought as to what's going on - it's like a high
speed train hitting a brick wall. It can cause unwanted errors and is bad programming practice in
general. END gets rids of the form, but NOT its leftovers. This leaves a bunch of memory that will
still be in use even after your program has supposedly closed. An object or variable won't be
terminated properly - it's just not a graceful exit. The only time that it'....
Looking for creating, simple, image, viewer, visual, basic, 2005, express, edition
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for creating, simple, image, viewer, visual, basic, 2005, express, edition
*MORE FROM TRAP17.COM*
|
advertisement
|
|