You are not logged in.

Blue Blazes

Beginner

  • "Blue Blazes" started this thread

Posts: 15

Date of registration: Aug 14th 2009

  • Send private message

1

Monday, August 17th 2009, 2:06am

Quick question: Form Load()

Hello! At Form Load() time, I am able to change the properties of many controls on the form. However, I am not able to change the Form1.Caption. In fact, the form does not display, but I don't receive an error message.
Also should Form Activate() automatically follow Form Load()? I tried to set Form1.Caption in there, as well, but it doesn't happen.
Does anyone know what I am doing wrong?
Thank you.

OlimilO

Intermediate

  • "OlimilO" is male

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

2

Monday, August 17th 2009, 10:08am

inside Form the Form is Me

quick answer

Jabaco Source

1
2
3
4
5
6
Public Sub Form_Load()
   'use
   Me.Caption = "Caption"
   'instead
   'Form1.Caption = "Caption"
End Sub

Blue Blazes

Beginner

  • "Blue Blazes" started this thread

Posts: 15

Date of registration: Aug 14th 2009

  • Send private message

3

Monday, August 17th 2009, 12:44pm

Thank you for the help. :)

Manuel

Administrator

  • "Manuel" is male

Posts: 256

Date of registration: Jul 16th 2008

Location: Erlangen, Germany

Occupation: Software Developer

Hobbies: Jabaco, game theory, text-mining

  • Send private message

4

Monday, August 17th 2009, 7:33pm

Quoted

However, I am not able to change the Form1.Caption. In fact, the form does not display, but I don't receive an error message.
Just for information: Form1 is a global static field. You should use "Me" within the load-process.

Blue Blazes

Beginner

  • "Blue Blazes" started this thread

Posts: 15

Date of registration: Aug 14th 2009

  • Send private message

5

Monday, August 17th 2009, 8:00pm

Thank you, Manuel, and I have a related followup question ...
with VB6 I was able to set the form Me.Left and Me.Top in the Form Load() process (with StartupPosition = Manual). I wasn't successful doing this with Jabaco. Is something else required?

Rate this thread
WoltLab Burning Board