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 used by
people categorizing thousands of images.
The problem I have is that both the picture control, and the image
control seem unable to open certain jpg images for an unknown reason.
The error message simply states "Invalid Picture". I can open these
problem picturesin MS Paint or any other photo editor and the images
works fine - the problem with the file seems to be limited to the vb6
controls.
Has anyone else had this problem?
I have made a duct tape solution by identifying what the native jpg
program is on the user's machine, but can't yet figure out how to run
that program and load the trouble picture into it. ie: if paint.exe
is the program associated to .jpg extensions, then open the problem
image's path in paint.
Does anyone know what the syntax/commands are to do such a thing?
Thanks!!
Trevor 3 13881 tr*****@e-crime.on.ca (Trevor Fairchild) wrote in message news:<5b******* *************** ****@posting.go ogle.com>... 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 used by people categorizing thousands of images.
The problem I have is that both the picture control, and the image control seem unable to open certain jpg images for an unknown reason. The error message simply states "Invalid Picture". I can open these problem picturesin MS Paint or any other photo editor and the images works fine - the problem with the file seems to be limited to the vb6 controls.
Has anyone else had this problem?
I have made a duct tape solution by identifying what the native jpg program is on the user's machine, but can't yet figure out how to run that program and load the trouble picture into it. ie: if paint.exe is the program associated to .jpg extensions, then open the problem image's path in paint.
Does anyone know what the syntax/commands are to do such a thing?
Thanks!!
Trevor
Just a wild shot...
There are different JPG format out, and VB6 isn't exactly new, so it
could be that some newer formats are not supported (you can see the
same problems with some old paint programs).
In this case you might try it using API functions, although I can't
tell you exactly how to do it.
The problem with your "duct tape solution" is that the Shell command
can only run executables, but cannot simulate a double-click on the
file. I know no solution for that, sorry.
Robert
not really no Trevor,
What you can do in VB is concatenate quotes..such as
SHELL "C:\Windows \
Shell "C:\windows\sys tem32\mspaint.e xe " & chr(34) & "c:\my picture.jpg" &
chr(34)
this should open it fine...it has for me
--
Stéphane Richard
Senior Software and Technology Supervisor http://www.totalweb-inc.com
For all your hosting and related needs
"Trevor Fairchild" <tr*****@e-crime.on.ca> wrote in message
news:5b******** *************** **@posting.goog le.com... as*********@yah oo.com (Asperamanca) wrote in message
news:<3b******* *************** ****@posting.go ogle.com>... tr*****@e-crime.on.ca (Trevor Fairchild) wrote in message
news:<5b******* *************** ****@posting.go ogle.com>... 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 used by people categorizing thousands of images.
The problem I have is that both the picture control, and the image control seem unable to open certain jpg images for an unknown reason. The error message simply states "Invalid Picture". I can open these problem picturesin MS Paint or any other photo editor and the images works fine - the problem with the file seems to be limited to the vb6 controls.
Has anyone else had this problem?
I have made a duct tape solution by identifying what the native jpg program is on the user's machine, but can't yet figure out how to run that program and load the trouble picture into it. ie: if paint.exe is the program associated to .jpg extensions, then open the problem image's path in paint.
Does anyone know what the syntax/commands are to do such a thing?
Thanks!!
Trevor
Just a wild shot...
There are different JPG format out, and VB6 isn't exactly new, so it could be that some newer formats are not supported (you can see the same problems with some old paint programs). In this case you might try it using API functions, although I can't tell you exactly how to do it. The problem with your "duct tape solution" is that the Shell command can only run executables, but cannot simulate a double-click on the file. I know no solution for that, sorry.
Robert
Thanks, Robert. I was working on my 'duct tape' solution last night and found out that the following command:
Shell "C:\windows\sys tem32\mspaint.e xe c:\mypicture.jp g"
will load mypicture.jpg into MS Paint.
Unfortunately, this doesn't work if the path or file name of the jpg have a space in it.
Shell "C:\windows\sys tem32\mspaint.e xe c:\my picture.jpg"
doesn't work because the program is looking for c:\my.bmp...
Shell "C:\windows\sys tem32\mspaint.e xe 'c:\my picture.jpg'"
doesn't work either although I don't know why. I have tried square brackets, and parentheses, and nothing seems to work. Conversely,
c:\windows\syst em32\mspaint.ex e "c:\my picture.jpg"
will work when I go through the 'Run' Command of windows. For some reason the single quotes don't cut it in this case, perhaps another limitation of vb6...?
It worked exactly like it should! Thank you very much for your help.
"Stephane Richard" <st************ **@verizon.net> wrote in message news:<DQ******* **********@nwrd ny02.gnilink.ne t>... not really no Trevor,
What you can do in VB is concatenate quotes..such as
SHELL "C:\Windows \ Shell "C:\windows\sys tem32\mspaint.e xe " & chr(34) & "c:\my picture.jpg" & chr(34)
this should open it fine...it has for me
-- Stéphane Richard Senior Software and Technology Supervisor http://www.totalweb-inc.com For all your hosting and related needs "Trevor Fairchild" <tr*****@e-crime.on.ca> wrote in message news:5b******** *************** **@posting.goog le.com... as*********@yah oo.com (Asperamanca) wrote in message news:<3b******* *************** ****@posting.go ogle.com>... tr*****@e-crime.on.ca (Trevor Fairchild) wrote in message news:<5b******* *************** ****@posting.go ogle.com>... > 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 used by > people categorizing thousands of images. > > The problem I have is that both the picture control, and the image > control seem unable to open certain jpg images for an unknown reason. > The error message simply states "Invalid Picture". I can open these > problem picturesin MS Paint or any other photo editor and the images > works fine - the problem with the file seems to be limited to the vb6 > controls. > > Has anyone else had this problem? > > I have made a duct tape solution by identifying what the native jpg > program is on the user's machine, but can't yet figure out how to run > that program and load the trouble picture into it. ie: if paint.exe > is the program associated to .jpg extensions, then open the problem > image's path in paint. > > Does anyone know what the syntax/commands are to do such a thing? > > Thanks!! > > Trevor
Just a wild shot...
There are different JPG format out, and VB6 isn't exactly new, so it could be that some newer formats are not supported (you can see the same problems with some old paint programs). In this case you might try it using API functions, although I can't tell you exactly how to do it. The problem with your "duct tape solution" is that the Shell command can only run executables, but cannot simulate a double-click on the file. I know no solution for that, sorry.
Robert
Thanks, Robert. I was working on my 'duct tape' solution last night and found out that the following command:
Shell "C:\windows\sys tem32\mspaint.e xe c:\mypicture.jp g"
will load mypicture.jpg into MS Paint.
Unfortunately, this doesn't work if the path or file name of the jpg have a space in it.
Shell "C:\windows\sys tem32\mspaint.e xe c:\my picture.jpg"
doesn't work because the program is looking for c:\my.bmp...
Shell "C:\windows\sys tem32\mspaint.e xe 'c:\my picture.jpg'"
doesn't work either although I don't know why. I have tried square brackets, and parentheses, and nothing seems to work. Conversely,
c:\windows\syst em32\mspaint.ex e "c:\my picture.jpg"
will work when I go through the 'Run' Command of windows. For some reason the single quotes don't cut it in this case, perhaps another limitation of vb6...?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Chris |
last post by:
Hi,
I am trying to set the position of a picture inside a picturebox with the
folowing code:
pctOutput.Picture = LoadPicture(App.Path & "\picture.bmp", ,
, , )
I didn't know what to fill in at and so the result was:
|
by: Tom John |
last post by:
Hi
I am using Office Web Components to generate a GIF image, which i want
to display in a picture box.
However i am having a problem when i attempt to load the image into
the picture box. Firstly i was saving the image using the Chartspace
Export and passing the path to the PictureBox load, however i think
that the image is not saved properly before the picturebox attempts to
load it.
|
by: Dean Slindee |
last post by:
I have looked everywhere I can think of for the .exe name of the Windows
Picture and Fax Viewer. Anybody know what it's named?
Thanks,
Dean Slindee
|
by: Jim Carlock |
last post by:
I have over a hundred pictures I would like to present.
Is it practical to create and parse an array of pictures,
picture paths, et al using server-side scripting to
accomplish this?
I created an array already, and whereby, the HTML and Javascript
currently used amount to about 14KB for each of four different
pages, the PHP page I started working on is already over 35KB in
size (most of it is server side processing creating the array...
|
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, which
becomes invalid when the user installs the database (ie: c:\devpath\
becomes c:\program files\mydbapp, but the .Picture property still
points to c:\devpath\) The problem is that I don't *know* what
installation path the user will select,...
| |
by: tamasumalta |
last post by:
I have done some code to load a picture in an array of bytes. The data
is saved in a file in the Hard drive. There is also another piece of
code to display the image. My issue is that I need to unload the
picture before the user press the button to refresh and therefore
reload the image. Generally I would have an error when I try to
download the file and save it. I will have an error that the file is
being used by another process. Noticed...
|
by: blazingmavrick |
last post by:
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...
|
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 box.
using this code:-
'opens file dialog box to load selected jpeg into picture box
OpenFD.InitialDirectory = "C:\My Documents\My Pictures"
OpenFD.Title = "Open a JPEG file"
OpenFD.Filter = "JPEG...
|
by: raghunadhs |
last post by:
hi all!
i have a picture box, in that picture box, there is a picture asume it as "pic1.bmp".. now i have made some changes in that picture.
Now i want to load a picture to a image( my form consists of a picture box and a image also).
like image1.picture=loadPicture(picture1.picture) ...
but i know that this statement is invalid....
how can i do it? actually.. yesterday i learned how to make changes on a picture and how to save a...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |