Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Delphi image and form components

Featured Replies

Hi all.

Question 1

I'm in the middle of creating a simple Delphi game, and am having a little trouble with the TImage component. Can't its shape be changed? I don't want to see a silhuette surrounding my character when he moves about on the screen. (E.g. when he moves onto a green surrounding, you can make out the rectangle black surounding him.)

My character's a little bitmap image.

Is there no component that can solve this problem? I.e. surround itself around the bitmap?

Question 2:

HOw do I load an image onto the form?


  • Author

Well, I happened to stumble upon this code on the internet:

Declare a TBitmap variable, initialise it during the form's creation, then set its parameters with the X, and YCoORds in the Form, and the name of the file I want.

private

Bmp: TBitmap;

public

{ public declarations }

end;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);

begin

Bmp := Bitmap.Create;

end;

// The rest deals with HInstance, handles, etc. which I dont understand..

// Needless to say, the code isn't working on my computer... Hmm, this is

// Windows API programming apparently

  • Author

I've finally managed to get the image on the form.

Anyway, here's how I did it:

Instead of directly loading the image on the form, I first saved it as a .res file in the Image editor, then used it in the program code...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.