Results 1 to 1 of 1

Thread: Problems w/ creating form...[RESOLVED]

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Posts
    16

    Question Problems w/ creating form...[RESOLVED]

    Okay what I have is a nice little program going, but I need it to make a copy of the form I just clicked, I can get it to do that and even move the form my problem is that when the copy is made, it doesn't seem to have the timer or the event for the timer on the one I made. Here is my click code, maybe you can tell me the "why" and I can figure out the rest.

    Code:
    
    Dim blah As New Form1 'declare a var filled with Form1
    blah.Show 'show the new form
    blah.Left = 0  'place it at 0, 0 on screen
    blah.Top = 0 
    blah.Timer1.Enabled = True 'tried to maybe start timer
    blah.Timer1.Interval = 1 'this way, didn't work
    Thank you for any help you provide to the obviuos I overlooked

    edit
    ----

    I sat down yesterday and figured out the obvious I overlooked, and I should have realised sooner, do to the nature of the C++ way of doing it.

    My problem was here:

    Dim blah As New Form1

    I now have a form1 named blah, and the timer's instructions were to change properties of Form1 and not blah, so to solve the problem the easiset way I used Me.Property instead of Form1.Property and all windows now behave properly.

    Now its time to unload all these duplicates o.0
    Last edited by Xelen; Nov 24th, 2003 at 10:36 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width