Question about Microsoft Windows XP Professional

1 Answer

How to do Undo and Redo in Visaul Basic Project ? I wanna do in my application(Project). Suggest me Code for it .

Posted by on


1 Answer

  • Level 1:

    An expert who has achieved level 1.


    An expert whose answer got voted for 2 times.

  • Contributor
  • 4 Answers

Undo command: if you want an undo command, the best way to do it is to 'send' key strokes to the textbox that you want to use. You will need to send Ctrl+Z. You can do this with this code:
'General Declarations
Private Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const KEYEVENTF_KEYUP = &H2
Private Sub Command1_Click() 'The procedure that will run the undo command
Text1.SetFocus 'The textbox that you want to 'undo'
'Send Ctrl+Z
keybd_event 17, 0, 0, 0
keybd_event 90, 0, 0, 0
'Release Ctrl+Z
keybd_event 90, 0, KEYEVENTF_KEYUP, 0
keybd_event 17, 0, KEYEVENTF_KEYUP, 0
End Sub

Another way to do this is to use the SendKeys statement. However, the API function gives you more control.
Private Sub Command1_Click() 'The procedure that will run the undo command
Text1.SetFocus 'The textbox that you want to 'undo'
'Send Ctrl+Z
SendKeys "^Z"
End Sub

Posted on Apr 22, 2009


1 Suggested Answer

  • 2 Answers

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

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this 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.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017


Add Your Answer

Uploading: 0%


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



Related Questions:

1 Answer

Codes of c++

Microsoft Visual C++ 6.0 is an integrated development environment, or IDE, released by Microsoft in 1998. An IDE allows the user to create a computer application by using pre-designed functions, tools and other resources. Microsoft Visual C++ 6.0 features a source code editor, a compiler, a debugger and graphical user interface.

Install Microsoft Visual C++ 6.0 on your computer. The installation process is fairly simple. Just follow the prompts. Run the program. A window will appear asking you to create a new application. On the "Project" tab, choose "Win32 Console Application." This means that you will create an application with an EXE file extension that can work with 32-bit Windows operating systems after compiling the project. Also, specify the project's name and the location where it will be saved. Click "OK." Click"OK" in the dialog box that will appear next. You will choose to start an open project. Double-click on the form in the center of the screen. Type: #include <iostream.h> int main() { cout <<"This is my first project!!! Hello everybody! \n" return 0; } Press "F5." This will build and run the project. Microsoft Visual C++ 6.0 will compile your project into an EXE file. Then it will open this file. You will see a new window open in which you'll see your greeting, " This is my first project!!! Hello everybody!" Press any key to exit the application.

Feb 03, 2013 | Microsoft Visual Basic 6.0 for PC


How Do I Reactivate The "Undo" Function In Ms Word?

It is possible to redo, undo and repeat a plethora of actions in Microsoft Excel, PowerPoint, and Word. It is possible to do changes after saving and you can again save after that. It is possible to do it till you are in the undo limits. The Redo and Undo features are helpful in rectifying the mistakes without any hassles. You can also make use of the function for experimenting with a wide array of data mapping and routing decisions. Undo helps in reversing the last performed action whereas Redo is helpful in undoing the last Undo action. The Undo command present in Microsoft Word is helpful in undoing anything you have typed in the Word Document. This is inclusive of deleting and typing text, moving the blocks, formatting of texts. There are primarily two ways in which you can utilize the Undo command. You can do so by pressing the Command+Z button as well as by clicking the Undo command button present on the Quick Access toolbar.

Undoing with Command+Z

Command+Z for Mac is considered to be the keyboard shortcut for the Undo function. This will help in saving the Microsoft word files from unintentional formatting and accidental deletions. The Command+Z is considered to be the shortcut option for the Undo function. For undoing the most recent change, it is recommended to opt for Command+Z option. For undoing a plethora of actions, you need to press the Command+Z in a repeated manner till the action you are willing to do has been undone. You require clicking the arrow present to Undo option on the Quick Access toolbar and choose the design change which you wish to undo. You should undo all the chosen changes in the design. You will gain success in undoing the actions in the similar order of occurrence. For instance, you should be undoing the first recent action for undoing the next most recent activity.

Undo Command Button

An added benefit of the Undo command button is that it helps in sporting the drop down menu which is helpful in reviewing the several things which you have done in the past and that can be undone. However, you are not allowed to pick or choose from the drop-down menu of the Undo command button. It is possible to undo the multiple instances of different things at just one time. The Undo Command functions at times sporadically. Word will issue a warning before it happens. The Undo Command will not work if there is nothing you can do or in case you cannot undo something simply. For instance, it is not possible to undo the saved document.

Redoing, The Undo-Undo Command Present In Word

In case you accidentally undo something which you are not meant to, you should utilize the Redo Command for setting things in a previous way. You will have primarily two choices which include Pressing the Command+y and clicking the Redo command button present on Quick Access Toolbar. When there is nothing left which can be done by the Redo Command, it is capable of changing functions and turning into the Repeat Typing Command. After typing something and pressing the Command+Y and selecting Repeat Typing command button present on the Quick Access Toolbar, Word is able to repeat the few last things which you have typed. In case you required pressing the Backspace key for backing up as well as erasing, the Command+Y is known to repeat from the specific point only. It is possible to redo the different actions in the similar order in which they were undone. For instance, for redoing the next most recent undone function, you require redoing the very recent undone activity.

Repeating The Action

For repeating anything like the paste operation, you need to press F4 or Command+y. If you find that F4 is not working, you may require pressing Fn key, Flock key, and F4 after this. In case you prefer using the mouse, you should be clicking Repeat present on the Quick Access Toolbar.

Undoing Different Changes By Reopening The Document Manually

In case you have accomplished a lot of changes in the Microsoft Word document, using the shortcut or clicking the Undo icon is not going to help you. In such cases, you require reopening the document. You have to close the document and make sure not to save the changes. You should be clicking Don't Save as Microsoft word ensures that the operation is closed. After reopening the document, different changes which are done previously will be gone.

How Do Reactivate The Undo Function In Ms Word

on May 10, 2018 | Microsoft Word Computers & Internet

1 Answer

How to run vb

How to Run a Visual Basic Program on a PC By an eHow Contributor

Like C++, C Sharp and Java, Visual Basic (VB) is an object oriented programming language. Recently it was integrated to the Microsoft .NET Framework. The .NET Framework is a software infrastructure that speeds up program development. It is supported by the Microsoft Visual Studio Integrated Development Environment (IDE), Microsoft's chief programming environment, and that of SharpDevelop.
Difficulty: Easy Instructions Things You'll Need:

  • Visual Microsoft Studio and .NET Framework
  1. Launch your Microsoft Visual Studio. It is a "heavy" application so depending on how much RAM you have it may take a few minutes to load.
  2. Click the Project tab on the first screen. Notice two buttons at the bottom of the screen named "New Project" and "Open Project." Since the tutorial assumes that this is your first VB program, click the "New Project" button. If you worked on a project before, its name will appear in an area labeled "Open an Existing Project" with a hyperlink that opens the project.
  3. Select "Windows Application" in the "Visual Basic Projects" folder if you intend to run your end program on a computer running a Microsoft Windows operating system. Focus in the "Name" text box near the bottom. Change the name from the default to something more descriptive such as "MyFirstVBProgram." Leave the Location to the default value to save your project to the "My Documents" folder. Press OK.
  4. Concentrate on the grey square area with the arrays of dots. This is the "form." The pinboard shows where components like buttons and text boxes will be installed to make a complete graphic user interface (GUI). The purpose of the grid is to align the components.
  5. Run your program. Click "Debug" from the menu bar. Click "Start" from the drop down menu. Alternatively, you can press F5 on your keyboard.
  6. Enjoy your first Visual Basic program in its simplest form. It is identical to the form in Step 4 except that the dots are gone. What you are looking at is a stand alone program that exists as an ".exe" file having the same name as your project. You can find it under the MyFirstVBProgram folder by default.
  7. Understand the difference between the two distinct environments of the IDE, the Design Environment and the Debug Environment. You saw the Design Environment in Step 4 of this tutorial. That was the environment where you could design a GUI on the form using your mouse. The Debug Environment takes over during the compilation interval in Step 5. That is where you can insert break points in your source code so that you test the correctness of the program.

Read more: How to Run a Visual Basic Program on a PC '

Dec 09, 2010 | Computers & Internet

1 Answer

Suggest a Vb Project Topics


You can visit the below sites to get the complete code


Jul 07, 2010 | Microsoft Visual Basic 6.0 (361-00686) for...

1 Answer

Visaul basic coding for changing colour of buttons

Just click on button and change the property of backcolor or picture

My Name is Maulik Chauhan

And Your Self

My Orkut id is

Jul 10, 2009 | Microsoft Visual Basic Enterprise Edition...

1 Answer

Need help in running a software made in visual basic 6

if that program has an executable file then install it or click the exe file to run the program. If it has no exe file then install a visaul basic 6.0 to open it and makeit run using F5 button.

Jun 09, 2009 | Computers & Internet

1 Answer

I have a runtime error 9 subscript out of range, when i try to open a program

  1. Start the Visual Basic Editor (press ALT+F11).
  2. If Project Explorer is not visible, press CTRL+R to activate Project Explorer.
  3. Click to select the Visual Basic project that contains the module sheet that you want to copy.
  4. On the Tools menu, click References. Click to select the Microsoft Visual Basic for Applications Extensibility 5.3 check box, and then click OK.
  5. Click Module on the Insert menu.
  6. Type the following code into the module sheet: Sub CopyModule() Dim CodeLines As String Dim ModuleToCopy As VBComponent Dim NewModule As VBComponent ' Set a variable to the module to copy. ' Note: This assumes that the name of the module to copy is ' "module2". Replace "Module2" with the name of the module to copy. Set ModuleToCopy = _ Application.VBE.ActiveVBProject.VBComponents("module2") ' Get the Visual Basic code from the module. CodeLines = ModuleToCopy.CodeModule.Lines _ (1, ModuleToCopy.CodeModule.CountOfLines) ' Create a module sheet in another workbook. ' Note: You must refer to the name of the Visual Basic project. By ' default, the name of all new projects is "VBAProject". You may want ' to rename the project to which you are copying the contents of the ' module sheet. Set NewModule = Application.VBE.VBProjects("VBAProject") _ .VBComponents.Add(vbext_ct_StdModule) ' Add the Visual Basic code to the new module. NewModule.CodeModule.AddFromString CodeLines ' Rename the new module to the name of the previous module. NewModule.Name = ModuleToCopy.Name End Sub
  7. Run the CopyModule procedure.


Samson Ved

Dec 05, 2008 | Computers & Internet

1 Answer

I need a diagram of a refrigeratior for my sceince project. anyone wanna get me one or send me a link for one?

there's one link on basic refrigerator systems.

i hope this can be of any help.

Apr 21, 2008 | Refrigerators

Not finding what you are looking for?
Microsoft Windows XP Professional Logo

Related Topics:

102 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

3015 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18424 Answers

Alun Cox

Level 3 Expert

2678 Answers

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

Answer questions

Manuals & User Guides