Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to view JPEG/JPG files in FoxPro 2.6 for DOS?

Status
Not open for further replies.

proscoop

Programmer
Feb 6, 2002
16
JM
Dear Fellow Professionals:

I am unable to make the transition to OOP techniques in any visual language mainly because I have been out of professional programming for approx. twelve years.
I developed an extensive network-ready integrated inventory, accounting, POS, payroll, contact manager, receivables/payables program written and compiled in FoxPro 2.6 for DOS and running over a Novell Netware network for the past 12 years without any problems. I would really like to add the capability of viewing my .JPEG/.JPG photos of my stock items by hitting a hotkey that would invoke a call to a small utility via the RUN command or any other method that would open the file in a window assuming that I saved the .JPEG file with the same name as the stock SKU#. My workstations are all running Windows 98 or 98SE using Client For Netware to log onto the Novell Netware server.
Do you remember anyway that I can accomplish this without having to re-write the program in a Visual Language (I honestly do not have a clue about programming in VFP). Your advice would be greatly appreciated. Thanks
 
Proscoop,
Well, I sympathize with your plight. I too, have been struggling with the leap to VFP, having been a Fox 2.x developer for over 10 years. BUT, this year, I decided to do what it takes to make the leap. I'm still not there after about 3 months, but I am making GREAT strides, especially in the last couple of weeks. (This stuff clicks eventually...) I would recommend playing with VFP from time to time to begin to get a feel for it. I can see that in the grand scheme of things, it will be great for my development. A good headstart in the VFP arena is to get a CBT course. I just completed AppDev's VFP 11 CD course (about $600), and it was excellent. It's made the world of difference, and only took me about 2 weeks to get through. If you are a hardcore Fox developer, you'll catch onto this stuff in no time.
Now, to your question, there is a package that I worked with in the past, I belive called DGE Graphics library. I actually still have it, but I just moved, and it is in transit, so I can get your further information about it when it arrives. It has been about 5 years since I used it, but it's purpose in life is to add grpahics to the DOS based Fox Pro. The one thing you may need to do though, is convert your .jpgs to .bmps. I don't know if it will support the .jpg format, being as old as it is. But, at least it's a possibility.
Another thing you can do, if you have another program that runs as a viewer of JPGs in DOS, you could call the program from within Fox, and have it run until terminated. The down side to this is, it must load and unload everytime you want to view an image. Assuming you have the fully qualified path and filename for the image stored in some field in your inventory table, you can do this:

M.IMAGEVIEW = INVENTRY.IMAGEFILE

RUN <jpgviewer> &IMAGEVIEW

This assumes that your JPG viewer can be passed a file name as a parameter. I'm sure there must be some DOS based JPG viewer that will do that.

Sorry for my unsolicited editorial... but I think in the long run, painful as it may be, it's worth the move to VFP. I have started, and stoped on many occasions since VFP 3.0 was released, but I decided with 7.0, I was going to stick to it, even if it means starving for a while. I can already see the benifit of the labor.

Thanks,
-Scott

s-) Please let me know if this has helped s-)
 
Dear Scott (TheManiac):
I have tried to locate the DGE Graphics Library that you metioned in your reply, but most of the sites that I was referred to including Hallogram, has discontinued this product. In addition, I have converted some of my .JPEGs to .BMP as you had suggested, but each resulting picture that I recreated takes up approx. 2MB of space where the original .JPEG was approx. 100KB. I have in excess of 3,000 stock items...do you envision me having any problems with these larger files.
Scott, I downloaded a DOS JPEG viewer called SEA to experiment with an invoked call RUN Sea <filename.jpg>. It works well under plain DOS and my very old Dbase program but freezes the machine when I try to call it through FoxPro 2.6 for DOS. Please Scott (or any other fellow professionals) can you help me solve this problem ... I am at my ends wit.
I must congratulate you on your move to VFP 7.0 as it is a hurdle in my life that I would love to conquer ... but it is giving me nightmares. I have been a linear structured logical programmer for all my life and the idea of classes, methods, objects, events, properties and forms just makes me completely lost. Thank you very much for your suggestions so far. I am still hoping that someone, somewhere will have the remedy for me. Continue the good work you all have been doing.
 
you can try a something a little differnt
*code to call internet explorer to open a jpeg file
!explorer filename.jpg

i dont know if you will like the results and may need more
details.

the first time i found out you could do this sort of thing i jumped out of my chair and ran around the room!

dont forget about macro substiturtion

varible = &quot;!explorer filename.jpg&quot;
&varible
 
What Infinitelo mentions will work, if you're running your DOS application on a Windows machine, but will not work if your running say, DOS 6.22, or any version of strict DOS.

My stuff arrived today, once I get to my DGE books, I'll post more information on it's capabilities. I've also got some suggestions for your .BMP images, and how you can make it work, which I'll post at that time as well.

Thanks,
-Scott

s-) Please let me know if this has helped s-)
 
Dear Scott (TheManiac) & Infinitelo:
Thank you very much for all your concern and effort in helping me to overcome this hurdle. With respect to Infinitelo's post: I have tried using iexplorer as suggested but it is awfully slow and shells from a full-screen DOS window in which my application is running back into the Windows environment before loading the image in explorer. It definitely is too slow, clumsy and I think not practical when considering that I have approx. 3000 stock items to view.
Just a little update for everyone since I last posted on Feb. 9, 2002. As mentioned in that thread I downloaded a DOS JPEG Viewer called SEA that was not working from within my program ... but it led me to the idea that there must be another one out there that would work well within my application. I stumbled across a DOS Viewer called QPEG (apparently now known as QPV). I downloaded the shareware version and tried it, and to my utter surprise it is super quick, works well within my environment, handles many different picture compression formats, easily customizable, and takes parameters with macro substitutions from within FoxPro 2.6. Exactly what I was looking for. However, it is a shareware version, apparently written in 1992-1994 and displays a spash and registration reminder screen requesting <Press space to continue...>. I am having difficulties registering my copy as I think it is no longer supported by the author, Oliver Fromme in Germany. I have sent two e-mails but no reply as yet. Will keep you posted, but do suggest that you try it for yourselves ... you too will be amazed with its speed and pretty decent quality. To get there, type ...QPEG JPEG Viewer... in Yahoo's search engine.
Scott, as a last favour, could you give me a brief idea as to the meaning of Classes, Methods, Events, Procedures, Properties and Objects as used in VFP and if possible what are their equivalents in FoxPro 2.6 DOS. I have taken your advice and started to mess around with VFP ... even designed a simple project with one table and one form with an OLE BOUND CONTROL frame for my pics, but I do not know where to write the programs (.PRGs) to control the event processing.
Sincere thanks to all.
 
Proscoop,
Hi. Please e-mail me at scottvpayton@hotmail.com, and we can discuss this off the forum line (if you don't mind). I'm MORE than happy to help you thourgh this, as it was one of the &quot;Big Leaps&quot; I've just fully grasped myself in the last couple of weeks.
Cheers

Thanks,
-Scott

s-) Please let me know if this has helped s-)
 
Hey! Maybe you guys could start a new forum called &quot;Transition from DOS to Win&quot; :) I've been using on and off Foxpro for DOS ever since 2.5 was out and I'm still having a heck of a good time using it. It seems that support for it as greatly disappeared, except for furums like these, where you'll have a mixture of messages from DOS/Win environments. Nevertheless, I still enjoy reading about people's tips and tricks...

So Scott, you starting that forum? :)
 
have you heard of the free dos project?? simualar to the lynux project and free bsd. lots of work to be done.
 
Proscoop & Realm174,
Well, I am always willing to help! Especially to those trying to make the leap. While there isn't a specific &quot;Make the leap&quot; forum here at Tek-Tips, there is a VFP 3.0 and Higher forum here, where many, many great people are able to help with problems. I'd be happy to start/lead such a forum, though I don't know what it takes to get one &quot;Added&quot; to Tek-Tips, or if it is the appropriate place. Further, I don't know that I'd consider myself &quot;Fully Qualified&quot; to run such a forum, as I'm still making the transition myself. I've learned a lot, but I still have about 95% to go (I'd guess... :)).
That said, please don't hesitate to drop me a line, or put up a post. Do check out the other forums... you'll see lots of my &quot;Stupid Questions&quot; there as well!

Cheers

Thanks,
-Scott

s-) Please let me know if this has helped s-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top