CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2012
    Posts
    59

    [RESOLVED] Create Button On and Off

    Name:  Untitled.jpg
Views: 979
Size:  94.6 KB

    I need buttons on and off code.

    In picture you see 4 command buttons: On, off, skaičiuoti and išvalyti.
    I need with on button enable other programs buttons, and with off button disable them. If you dont press on button then you cant enter number and t.t.

    for example:

    Code:
    Button On_Click()
    Skaičiuoti, išvalyti = True
    End sub
    I think in desing time i need set button "skaičiuoti" value to false.
    Last edited by Halosar7; October 8th, 2012 at 08:39 AM.

  2. #2
    Join Date
    Oct 2012
    Posts
    59

    Re: [RESOLVED] Create Button On and Off

    I resolve my problem

    Code:
    Private Sub BOn_Click()
    Label8.Visible = True
    Label2.Visible = True
    Info1.Visible = True
    In30.Visible = True
    ijr.Visible = True
    Label3.Visible = True
    Lal4.Visible = True
    In25.Visible = True
    Label4.Visible = True
    Label5.Visible = True
    Label7.Visible = True
    inmk.Visible = True
    Label6.Visible = True
    Timer1.Enabled = True
    Command1.Visible = True
    apgs.Visible = False
    Command3.Visible = True
    išvl.Visible = False
    Apie.Visible = True
    Label1.Visible = True
    SDate.Visible = True
    tll.Visible = True
    jr.Visible = True
    dev.Visible = True
    Tal.Visible = True
    psavt.Visible = True
    psavn.Visible = True
    kri.Visible = True
    sns.Visible = True
    trm.Visible = True
    tp.Visible = True
    End Sub
    
    Private Sub BOff_Click()
    Label8.Visible = False
    Label2.Visible = False
    Info1.Visible = False
    In30.Visible = False
    ijr.Visible = False
    Label3.Visible = False
    Lal4.Visible = False
    In25.Visible = False
    Label4.Visible = False
    Label5.Visible = False
    Label7.Visible = False
    inmk.Visible = False
    Label6.Visible = False
    Timer1.Enabled = False
    Apie.Visible = False
    Label1.Visible = False
    SDate.Visible = False
    tll.Visible = False
    jr.Visible = False
    dev.Visible = False
    Tal.Visible = False
    psavt.Visible = False
    psavn.Visible = False
    kri.Visible = False
    sns.Visible = False
    trm.Visible = False
    tp.Visible = False
    Timer1.Enabled = False
    Timer2.Enabled = False
    Pauze1.Enabled = False
    Pauze2.Enabled = False
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text6.Text = ""
    Text7.Text = ""
    Text8.Text = ""
    Command1.Visible = False
    apgs.Visible = True
    Command3.Visible = False
    išvl.Visible = True
    Apie.Caption = ""
    Label1.Caption = ""
    SDate.Caption = ""
    tll.Caption = ""
    jr.Caption = ""
    dev.Caption = ""
    Tal.Caption = ""
    psavt.Caption = ""
    psavn.Caption = ""
    kri.Caption = ""
    sns.Caption = ""
    trm.Caption = ""
    tp.Caption = ""
    End Sub

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

Featured