I'm embarrassed. I suddenly realized that not in any of my programs scrollbars show when they should, despite visible is set to True. I am not able to fix it!
Can someone please tell the secret?

When you say your scroll bars arent showing, under what circumstance are they not showing..

For the form itself to have scrollbars, controlls would need to be below or to the right of the visible edges of the form.

The code below describes a new project with just a form with a button. The button is placed so it is partly outside the visible form and I expect to get scrollbars, but I don't. despite running several different programs (most of which come from a Delphi 6 environment) I have under NO circumstances been able to see any scrollbars on a form in Delphi 2007.

object Form1: TForm1
  Left = 0
  Top = 0
  Caption = 'Form1'
  ClientHeight = 227
  ClientWidth = 319
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 288
    Top = 176
    Width = 75
    Height = 25
    Caption = 'Button1'
    TabOrder = 0
  end
end

I think it could be considered a bug in D2007, I havent looked in 2009 to see if its still there, but you should probably report it in QC.

You can work round it by setting the range of the scrollbars

Thanks for you takning your time.
This makes a big difference:

object Form1: TForm1
  Left = 0
  Top = 0
  Width = 328
  Height = 306
  AutoScroll = True
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 264
    Top = 264
    Width = 75
    Height = 25
    Caption = 'Button1'
    TabOrder = 0
  end
end
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.