Search found 220 matches

by jornmo
Friday 8th September 2017 2:23pm
Forum: General
Topic: Program start
Replies: 19
Views: 20055

Re: Program start

For example:
Public Sub Form_Open()
  
  Dim siCount As Short
  
  FMain.Show
  
  For sicount = 1 To 6
    Button1.text = Str(siCount)
    Wait 0.1
  Next
  
  Button1.text = Rand(1, 6)
  
    
End
But, why?
by jornmo
Thursday 31st August 2017 6:56pm
Forum: General
Topic: Program start
Replies: 19
Views: 20055

Re: Program start

But, its still more of a hack than a proper understanding of the real problem. I think it has to do with in what order Gambas arranges the controls on the form. It might be that for some reason that is not clear, your subs are called in a different order than expected. You can try using breakpoints ...
by jornmo
Sunday 27th August 2017 7:24pm
Forum: General
Topic: Program start
Replies: 19
Views: 20055

Re: Program start

The 'bug' is a big mystery, but this 'solves' the issue: Remove the FMain's Arrangement from the BuildForm() sub, remove the trigger timer, and replace the BuildPlayArea() sub with this: Public Sub BuildPlayArea() hPlayAreaPanel = New Panel(Me) With hPlayAreaPanel .Arrangement = Arrange.Row .Expand ...
by jornmo
Sunday 27th August 2017 4:48pm
Forum: General
Topic: Program start
Replies: 19
Views: 20055

Re: Program start

I added this code into the top of your RebuildForm sub:
Debug "Rebuilding form", hPlayAreaPanel.W, hPlayAreaPanel.H
and it says you panel is 8x8. That's probably the problem. Now to find out why it does not fit the FMain's proportions :)
by jornmo
Saturday 26th August 2017 8:05pm
Forum: General
Topic: Program start
Replies: 19
Views: 20055

Re: Program start

I did not fully understand your code, but I tried to make a variant to what it seems you try to achieve:
JE15PuzzleGame-0.0.1.tar.gz
(11.59 KiB) Downloaded 491 times
by jornmo
Friday 25th August 2017 8:05am
Forum: General
Topic: Program start
Replies: 19
Views: 20055

Re: Program start

Have you uploaded the same version? The code you gave me calls BuildForm, which in turn calls AddTimer which again calles hTimer.Start...

Anyway... I still do not know why you want to avoid this? Can you tell me like I am five years old, haha :D
by jornmo
Thursday 24th August 2017 1:12pm
Forum: General
Topic: A challenge for you
Replies: 9
Views: 10419

Re: A challenge for you

I see!
by jornmo
Thursday 24th August 2017 1:11pm
Forum: General
Topic: Program start
Replies: 19
Views: 20055

Re: Program start

Line 30?
Public Sub BuildForm()                        'To add items to the Form
I do still not follow you friend :)
by jornmo
Wednesday 23rd August 2017 8:21pm
Forum: General
Topic: A challenge for you
Replies: 9
Views: 10419

Re: A challenge for you

You know you can get permalinks by clicking the "Gist" button at https://gambas-playground.proko.eu/ ? That way you can skip the "copy/paste" step.
by jornmo
Wednesday 23rd August 2017 3:52pm
Forum: General
Topic: Program start
Replies: 19
Views: 20055

Re: Program start

Can you elaborate on what it is you want to accomplish? Why is it that Form_Open() is not sufficient? You could call it from a different class or module if you make it public.

You can also call it at the constructor, a.k.a. _new() (probably _init() and _ready() as well).