 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Alain R. Guest
|
Posted: Thu Jul 24, 2003 7:16 am Post subject: design of window |
|
|
Hi,
I would like to make the contents of my windows more graphical...
We can see since few months, some application integrating more and more
graphical items, like what we can find on some WEB page.
I don't want to override all component..it takes a long time and i'm already
doing this... but i would like to know if there's no other way to make a
simple form request (for example) more graphic ?
Some people told me that we can use XML for that...in which way is going to
help me this ?
XML is an extension of HTML...and if i need to use XML or HTML, is it
possible to hide from client's eyes the *.html files ?
i mean that i don't want to see user modify my html files because
application will not work after..
tia,
Alain
|
|
| Back to top |
|
 |
JD Guest
|
Posted: Thu Jul 24, 2003 4:10 pm Post subject: Re: design of window |
|
|
"Alain R." <no.valid (AT) email (DOT) com> wrote:
| Quote: | I would like to make the contents of my windows more
graphical...
|
There is TImage, TImageList and TBitmap that you can use and
there are several 3rd party components available that
support .gif files. What exactly did you want to accomplish?
| Quote: | [...] I don't want to override all component.. [...]
|
The components I mentioned natively support all kinds of
glyphs and would not require any special coding.
| Quote: | but i would like to know if there's no other way to make a
simple form request (for example) more graphic ?
|
The components I mentioned can be used on any form. As an
example, here's 2 ways to produce a wallpaper effect:
1) Drop a TImage on the form as the first component before you
add anything else. Set it's Align property to alClient to make
the image cover the entire client area of the form and so it
will resize as the form resizes. Then just load your image. If
you do it at design time, the exe will contain the image or
you can do it at runtime:
Image1->Picture->Bitmap->LoadFromFile( "someFile" );
2) Or You can draw the bitmap your self in the forms OnPaint
event:
//--- in the unit header private section
Graphics::TBitmap* WallPaper;
//--- In the forms constructor
__fastcall TForm1::TForm1(TComponent* Owner)// Constructor
: TForm(Owner)
{
WallPaper = new Graphics::TBitmap();
WallPaper->LoadFromFile( "SomeFile" );
}
//--- The forms destructor
__fastcall TForm1::~TForm1(TComponent* Owner)// Destructor
{
delete WallPaper;
}
//--- Paint the image
void __fastcall TForm1::FormPaint(TObject *Sender)
{
Canvas->Draw( 0, 0, WallPaper );
//or
TRect R = Rect( 0, 0, Width - 1, Height - 1 );
Canvas->StretchDraw( R, WallPaper );
}
| Quote: | Some people told me that we can use XML for that...
|
Who told you that (don't ask them again for advice). I suppose
that you could but why would you? It's like using a nuke to
kill a fly.
| Quote: | [...] is it possible to hide from client's eyes the *.html
files ? i mean that i don't want to see user modify my html
files because application will not work after..
|
You can always encrypt any file to prevent others from looking
at it but nothing will prevent them from modifying it if they
truely want to but you can make it more difficult by making
the files hidden and readonly. There are many encryption
widely available or you could use a simple scramble technique -
anything that changes the format of the file so that it's not
recognized as it's true file type.
~ JD
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|