Question about Microsoft Computers & Internet

1 Answer

How to disable command button in visual basic

Posted by on


1 Answer

  • Level 1:

    An expert who has achieved level 1.


    An expert that gotĀ 5 achievements.


    An expert whose answer gotĀ voted for 20 times.


    An expert who has answered 20 questions.

  • Contributor
  • 30 Answers

  • tep 1 Open Visual Basic and select "Standard Exe" to create a new project.
  • Step 2 Add a button by clicking the square button tool on the right, and then clicking and dragging in the main window.
  • Step 3 Click the button once to open the "Properties" window on the right. Select the "(Name)" property, and type "myCmdButton" as the name.
  • Step 4 Double-click the button to open up the code-view window. Type the following in the white space under "Private Sub myCmdButton_Click()":
    myCmdButton.enabled = False;
  • Step 5 Click the blue "Run" button on the top toolbar of Visual Basic. Because you set enabled to "false" in the previous step, you will see your button grayed out, and nothing will happen when you click it.
  • Posted on Jul 23, 2010


    2 Suggested Answers

    • 2 Answers

    SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

    a 6ya expert can help you resolve that issue over the phone in a minute or two.
    best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
    the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
    click here to download the app (for users in the US for now) and get all the help you need.

    Posted on Jan 02, 2017

    • 53 Answers

    SOURCE: in visual basic how will we change the backcolor of the form randomly when we click the command button?

    Paste this code on you button. This generates a random color.

    Red = Int(Rnd * 255)
    Green = Int(Rnd * 255)
    Blue = Int(Rnd * 255)

    Form1.BackColor = RGB(Red, Green, Blue)

    Posted on Oct 11, 2008

    Add Your Answer

    Uploading: 0%


    Complete. Click "Add" to insert your video. Add



    Related Questions:

    1 Answer

    Can give an example of search command code?in visual basic 6.0

    If you click on the following link you will find tutorial of Visual Basic and You will als so find example commands including some examples for parameter searches

    hope it helpss rick

    May 18, 2011 | Computers & Internet


    Make Windows XP smooth as Windows 7 part-1

    If Windows XP works smoothly on the latest equipment, it can be trolling on an older machine or with economic components. For example Netbooks or nettops are not really swift and have limited disk space. If you start to open multiple applications simultaneously, you will soon experience slowdowns. 
    You can customize Windows to your material by removing or disabling everything that is unnecessary. You'll save responsiveness. Here are some of the tasks that you need to work on, just go through it:

    Limit the Visual Effects:

    Many visual effects adorn the Windows interface. You can disable to improve responsiveness. Below is how to do the same:
    Click the right mouse button on the My Computer icon located on the Desktop and select the Properties command. 

    Open the Advanced tab. 

    Click the Settings button under Performance. 

    Then select the option Adjust for best performance. All visual effects are disabled. 

    Note that you can manually activate an effect that is important to you by ticking the box. Then press OK twice.

    Rediscovering the classic theme:

    The interface of Windows XP with all its colors and visual effects is consuming system resources. You can not keep clean and perfectly functional and interface. 
    Click the right mouse button on an empty space of desktop and choose the Properties command. 

    Scroll down and select Theme Windows Classic. 

    Click OK. 

    The theme of Windows XP Lite is immediately applied.

    on May 19, 2010 | Computers & Internet

    1 Answer

    How to use adodb connection in visual basic version 6?

    To use Connection String, we have to set the Connection String to a valid Connect String and then calling the Open method we can open the Connection by passing the connection string as first argument. Now a command object is created with Record set Open method that is given as argument. Then command is executed by command.Execute metod and resulting amswer is saved in recordset created.

    Jun 28, 2010 | Microsoft Step by Step Visual Basic 6.0...

    1 Answer

    I want the code to open the following files(.jpg,.bmp.doc.ppt) using the command button in vb 6.0 can any one help me?

    Are you looking for Open Dialog box options?
    Then this can help you...
    even look at this too..

    Oct 19, 2009 | Microsoft Visual Basic 6.0 for PC

    1 Answer

    I want to open a jpg and doc file through command button in vb6

    try to convert it to vb6 file and open it via vb6.... heres the link >>>>

    Feb 28, 2009 | Microsoft Visual Basic 6.0 for PC

    1 Answer

    Give me a codes of visual basic in converter measurement,,like area,weight,distance,volume,temperature,speed...

    You should know first the value needed to convert- eg 1Liter = 1000ml

    this code may be paste on command button or keypress on the text box.

    Text2=val(text1) * 1000

    Jan 14, 2009 | Computers & Internet

    1 Answer

    In visual basic how will we change the backcolor of the form randomly when we click the command button?

    Paste this code on you button. This generates a random color.

    Red = Int(Rnd * 255)
    Green = Int(Rnd * 255)
    Blue = Int(Rnd * 255)

    Form1.BackColor = RGB(Red, Green, Blue)

    Oct 06, 2008 | Computers & Internet

    1 Answer

    Visual Basic

    Hi Buddy,

    Create 2 buttons for previous and next in a form(say, current_form). take the previous form as 'prev_form' and next form as 'next_form' then
    write a code in the previous button command click event as


    write a code in the next button command click event as

    Please let me know if you have any concerns

    Sep 02, 2008 | Computers & Internet

    2 Answers

    Visual Basic code to paste all items from Office Clipboard into Excel spreadsheet

    This may sound like a **** solution, but sometimes SENDKEYS can come in handy for situations like this instead of messing with with more advanced solutions. Also you can try to use win32API calls

    Jul 12, 2008 | Microsoft Office Standard for PC

    Not finding what you are looking for?
    Computers & Internet Logo

    Related Topics:

    103 people viewed this question

    Ask a Question

    Usually answered in minutes!

    Top Microsoft Computers & Internet Experts

    micky dee

    Level 3 Expert

    2780 Answers

    Piyal Perera
    Piyal Perera

    Level 3 Expert

    528 Answers

    Les Dickinson
    Les Dickinson

    Level 3 Expert

    18394 Answers

    Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

    Answer questions

    Manuals & User Guides