473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

HELP ! Picture box problems

Hi

My problem consits of the following:-

i am creating mulitple picturebox's, when the user double clicks on the picture box it opens the opendialog box to load a picture (jpeg only) into the picture box.

When they have finished they press a button to save the picture's into certain files called Module1.jpeg, Module2.jpeg and so on. These files are created and saved automatically (i.e. not using the save dialog box).

When the whole application is open'd again the user presses a button to load all the save'd images into there picturebox's respectfully.

If the user then presses save again only changing one picture and the others are not changed then i get a ExtarnalException handler problem. i have caught the exception with (catch).

How do i do something with this (catch) how do i save the images that have been loaded inn so that the ExternalException goes away??

bit of a newb to this, any help in simple terms would be greatly apreciated :-)

thanks in advance
Feb 28 '07 #1
2 1149
radcaesar
759 Expert 512MB
Pass the user ID in session

Save the files with the user ID's Concatenated.

Don't use Open Dialog to save files.

Use file upload to do the same.

Retrieve the same files using the user ID (In the file name)

The other option is storing the same in the DB.

:)
Feb 28 '07 #2
thanks for the help but i think i may of post this thread in the wrong place im developing a form in vb 2005.

not sure what you mean by ID sessions.

sorry to be a pain but i am really new to this.

here is the problem code:-

Expand|Select|Wrap|Line Numbers
  1. Try
  2.             If PictureBox1.Enabled = True Then
  3.                 PictureBox1.Image.Save(FilePic1)
  4.             End If
  5.         Catch ex As NullReferenceException
  6.         Catch ex As Exception
  7.         End Try
this works first time around, it saves the image to the (filepic1) and when loaded back in by this code:-

Expand|Select|Wrap|Line Numbers
  1.  Try
  2.             Dim img1 As Image
  3.             Dim fs1 As New FileStream(FilePic1, IO.FileMode.OpenOrCreate)
  4.             img1 = Image.FromStream(fs1, OpenShare.Shared)
  5.             fs1.Close()
  6.             PictureBox1.Image = img1
  7.             PictureBox1.Refresh()
  8.         Catch ex As System.ArgumentException
  9.         Catch ex As IOException
  10.         End Try
it works fine. Its just when you press save again without changing the image(i.e. opening up dialog box and selecting new pic) it does not save anything !

close the programme and load the pictures back into there picturebox's respectfully and the one that was not changed(i.e. the one not saved) shows a blank picture box.

im really struggling with this :-(
Feb 28 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Trevor Fairchild | last post by:
I am making a program that categorizes pictures. The picture paths are stored in an Access Database, vb6 connects using adodc controls. This program works specifically with .jpg files. It will be...
0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
2
by: Bill N. | last post by:
Using VB .Net 2003 Standard Edition. This simple form has a "File in Use" problem while the executable is running. Created this simple program to make sure that I hadn't done something in my...
4
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property,...
14
by: Mat| | last post by:
Hello :-) I am learning XPath, and I am trying to get child nodes of a node whose names do *not* match a given string, e.g : <dummy> <example> <title>Example 1</title> <body>this is an...
1
by: blazingmavrick | last post by:
My problem consits of the following:- i am creating mulitple picturebox's, when the user double clicks on the picture box it opens the opendialog box to load a picture (jpeg only) into the picture...
1
by: basestring | last post by:
Hi, I need help for my program. I'm new With PHP but i have programming skills in VB so it's quit easy to understand this language, however. i got my self in some problems that i don't understand....
5
by: Werner Partner | last post by:
I thought about your suggestion to leave tbales and, instead o, work with css. The problem is, that I still don't know veray much about css, so I have some difficulites to understand...
4
by: =?Utf-8?B?Q2FybGFKYWRl?= | last post by:
Can anyone help me? I need to use picture it 2000 every day and use to use it on Windows XP and had NO problems at all. If I would open up windows explorer i could be in my folder that has all of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.