?
Solved

How to check if a datafield does contain a picture (Bmp) or is empty?

Posted on 2004-11-29
3
Medium Priority
?
207 Views
Last Modified: 2010-04-05
When loading my form, I need to adjust the size of the picture to the size of the TdbImage on the form.
But when I try to do that on a empty datafield it gives an errormessage.

So I have to check if the datafield does contain a picture (Bmp) or is currently empty before calling the resize procedure?
How can I do that?

Thanks Stef
0
Comment
Question by:Stef Merlijn
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
esoftbg earned 200 total points
ID: 12694474
Hi Stef,
I am doing this kind of verification before adjust the size:

  if (FormCatalog.DBImageItem.Picture.Width>0) then
  begin
    //  adjust the size of the picture ....
  end;
0
 

Author Comment

by:Stef Merlijn
ID: 12694556
Thank you Emil.
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 12694588
You are welcome Stef.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question