0

I want to shape my form around my PNG image i loaded into it so there only will be an IPhone on desktop not a border.

Its like this right now: enter image description here

jpfollenius
  • 16,456
  • 10
  • 90
  • 156
Daan Kleijngeld
  • 1,375
  • 2
  • 10
  • 13
  • Something like this http://stackoverflow.com/q/10532445/960757 ? – TLama Nov 28 '13 at 14:22
  • @TLama: no, I guess he wants his form to have a custom shape like an iphone... – jpfollenius Nov 28 '13 at 14:26
  • Some clues here, [`Irregularly shaped forms`](http://stackoverflow.com/q/3572342/576719). – LU RD Nov 28 '13 at 14:30
  • @jpfollenius Thats right. But didn't found a solve for it yet – Daan Kleijngeld Nov 28 '13 at 14:36
  • 2
    Try these articles [`Alpha Blended Splash Screen in Delphi - Part 1`](http://melander.dk/articles/alphasplash/1/), [`Alpha Blended Splash Screen in Delphi - Part 2`](http://melander.dk/articles/alphasplash2) – RRUZ Nov 28 '13 at 15:47
  • I haven't done anything with it, but I saw a demo of FM components, all of which have a Radius property. If your objects all have circular corners, perhaps this property would help? This is a rather crude approach, but thought I'd suggest it in case it was sufficient. – RobertFrank Nov 28 '13 at 18:28

1 Answers1

6

I really don't know what to make of your image. Either way you'll probably need to have a png that actually is transparent at the edges, I'll assume you do.

I have done this in VCL and FMX, in both approaches I placed a TImage on my form, set MyImage.Align := alClient; and MyForm.BorderStyle := bsNone;.

Using VCL, you can set the forms MyForm.TransparentColor := true;, MyForm.Color := clFuchsia; and MyForm.TransparentColorValue := clFuchsia; (or any color you would not normally use). In FMX you can set your MyForm.Fill.Color := claNull; and MyForm.Transparency := true;.

DNR
  • 1,619
  • 2
  • 14
  • 22