473,387 Members | 1,379 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,387 software developers and data experts.

dynamic TImage component creation


(C++ Builder 6.0 enterprise)

I tried to create a TImage component by using this source code:

// ---

TImage *Image = new TImage (Application);

Image->Picture->LoadFromFile ("a.bmp");

// ---

There are no errors, but the image does not apear on the form. I also
tried setting properties, like: Left, Top, Height, Width, Visible, but
that didn't change anything.

Maybe I'm doing something wrong or I'm forgeting to do something. I
would be thankful for helping me out.

Maciej Bulaszewski, Poland
--
Posted via http://dbforums.com
Jul 19 '05 #1
2 9141
"macbul" <me*********@dbforums.com> wrote in message
news:33****************@dbforums.com...
(C++ Builder 6.0 enterprise)
Note: this is out of topic here.
Some will flame you for being OT, but most importantly
your chances of getting a helpful answer are much slimmer
than on a dedicated NG ( i.e. borland...., see their web site).
TImage *Image = new TImage (Application);

Image->Picture->LoadFromFile ("a.bmp"); .... There are no errors, but the image does not apear on the form. I also
tried setting properties, like: Left, Top, Height, Width, Visible, but
that didn't change anything.


You probably need to create the Image within a specific Form,
not as a child of the Application object...
Regards,
--
http://www.post1.com/~ivec <> Ivan Vecerina
Jul 19 '05 #2

"Ivan Vecerina" <ivecATmyrealboxDOTcom> wrote in message
news:3f******@news.swissonline.ch...
"macbul" <me*********@dbforums.com> wrote in message
news:33****************@dbforums.com...
(C++ Builder 6.0 enterprise)


Note: this is out of topic here.
Some will flame you for being OT, but most importantly
your chances of getting a helpful answer are much slimmer
than on a dedicated NG ( i.e. borland...., see their web site).
TImage *Image = new TImage (Application);

Image->Picture->LoadFromFile ("a.bmp");

...
There are no errors, but the image does not apear on the form. I also
tried setting properties, like: Left, Top, Height, Width, Visible, but
that didn't change anything.


You probably need to create the Image within a specific Form,
not as a child of the Application object...


Not sure about TImeage but most VCL visual stuff requires an owner and a
parent.
Also, LoadFromFile() probably throws on failure so you would need a
try/catch to handle
errors.

TImage *Image = new TImage (Application);
Image->Parent = this; // or wherever you want the bitmap
try{
Image->Picture->LoadFromFile ("a.bmp")
} catch(Exception &spoo) {
//whatever on failure
}

This is the wrong place for this question though. Try
newsgroups.borland.com and subscribe to
borland.public.cppbuilder.vcl.components.using
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: 4Space | last post by:
I've hit something of a snag. Problem: In a DSP application we have data profiles with a varying number of points. We have a number of Discrete Fourier transforms that are optimised for a...
0
by: DotNetJunkies User | last post by:
Hie, I create a dynamique HtmlTable, in each cell of this HtmlTable put a new control ( dropdownlist,label,..) and then want to create handler so that if i change the select item in the dop downlist...
4
by: Keith | last post by:
Can ASP VB create dynamic images of text? (ie. an image of a line of text) If so does anyone have any examples I could take a look at please. Thanks you
1
by: Jim Douglas | last post by:
I have a requirement to dynamically create a webProxy object in C#. I have created an instance of the webProxy and stored it within a hashtable then placing the hashtable in cache. When required I...
5
by: Tompa | last post by:
Hi, I would like to create images on the fly as a response to an http request. I can do this with PIL like this (file create_gif.py): from PIL import Image, ImageDraw print 'Status: 200 OK'...
0
by: Axel | last post by:
Hi, I am looking that components to rotate and crop Timage andmay be red eye fix. how i do find out! where from? thanks byes
0
by: todddeluca | last post by:
I am posting code for calling almost any python function from php, because it seems generally useful. Please feel free to suggest improvements or tell me this has already been done better...
0
by: Pascal Costanza | last post by:
Dynamic Languages Day @ Vrije Universiteit Brussel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monday, February 13, 2006, VUB Campus Etterbeek The VUB (Programming Technology Lab,...
1
by: cdmsenthil | last post by:
I have an Infragistics UltrawebGrid . Each Row in the grid is attached to a context menu using Infragistics CSOM Upon click on the menu, I am creating an Iframe dynamically which points to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
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...

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.