Results 1 to 8 of 8

Thread: Back to Basics...

  1. #1

    Thread Starter
    Fanatic Member LITHIA's Avatar
    Join Date
    Dec 2002
    Location
    UK, England
    Posts
    575

    Unhappy Back to Basics...

    Hi everyone,

    I was just wondering if anyone could please tell me where I could go to learn the absolute basics for VB.Net which have been changed from VB6, because I cant do something so simple anymore.

    The actual problem I got which is so simple is that I cant make a form visible or invisible using code.

    VB Code:
    1. Form1.Visible = True
    2. Form2.Visible = False

    Thats obviously how you would do it in VB6, but even that wont work in VB.Net now! The method used after an upgrade of a vb6 program to vb.net doesnt work either. It uses some sort of DefInstance (if thats right, cant remmeber).

    Also about Unloading a form, thats changed aswell.
    I dont know what parts in my books has this info so i need to ask here.

    Thanks very much,

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Visable works......

    But if you want to hide and show a form, it's exactly like VB6. form1.hide() form2.show() (though you have to declare form2 as a new form in order to use the show() function)

    For unloading, just use form.close() and I think someone here said the memory gets unallocated faster if you put the Keyword "End" in the closing event.

  3. #3

  4. #4
    New Member
    Join Date
    Oct 2003
    Location
    Oklahoma City
    Posts
    1

    visual basic 6

    Hello everybody

    Please help me you with this function...I have a problem with the VBA...Can someone tell me how to write the array function number and swith it number ?...example 1 2 to 2 1...thank you
    tt

  5. #5
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: visual basic 6

    Originally posted by tuantran
    Hello everybody

    Please help me you with this function...I have a problem with the VBA...Can someone tell me how to write the array function number and swith it number ?...example 1 2 to 2 1...thank you
    wrong forum

  6. #6

    Thread Starter
    Fanatic Member LITHIA's Avatar
    Join Date
    Dec 2002
    Location
    UK, England
    Posts
    575
    I have found you need to include a .ActiveForm after it, so now it goes

    Form1.ActiveForm.Visible = True

    unless you declare you form,

    Dim Form1 As Form (somet like that)

    Then you can use Form1.Visible = True

  7. #7
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    i think you can simply use
    me.visible=true
    istead of
    Form1.ActiveForm.Visible = True

  8. #8

    Thread Starter
    Fanatic Member LITHIA's Avatar
    Join Date
    Dec 2002
    Location
    UK, England
    Posts
    575
    try that on another form, lol

    You cant use 'me' if your starting the code from a different form or want to make a different form visible or not visible

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