Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Visual Basic Expert

MODELESS DIALOG

The Dialog boxes are either modal or modeless. The modal dialog box should be closed (Unloaded or hidden) before you can continue the working with the rest of the application. For illustration, the dialog box is modal if it needs you to click OK or Cancel before you can switch to the other form or dialog box.

The About dialog box in the Visual Basic is modal.

Dialog boxes: That displays the significant messages which should always be modal - that is, the user should always be needed to close the dialog box or respond to its message before proceeding.

Modeless dialog: let you move the focus between the dialog box and the other form without having to close the dialog box. You can carry on working elsewhere in the present application while the dialog box is exhibited. The Modeless dialog boxes are rare. Through the Edit menu, the Find dialog box in the Visual Basic is an illustration of a modeless dialog box. The use the modeless dialog boxes to display the frequently used commands or information.

The steps shown below should be following to create a modeless dialog.

1. Build a SDI application.

2. Build a global variable m_dlg of the CDialog type. To generate a global variable click the class tabpage. Now choose the view class. Right click and select the add member variable.

3. Build a dialog resource using the resource editor.

To produce the dialog resource, click on the resource tabpage.

Expand the dialog resources.

Choose the dialog option.

Right Click it and select insert from the pop up menu.

Select the resource type as the dialog

Click new to create the new dialog (IDD_DIALOG1) given in the constructor.

4. Initialize the dialog resource in the view constructor which is as shown below:

CModalessView::CModalessView()

{

m_dlg.Create(IDD_DIALOG1,this);

}

The Create function in the constructor assign the dialog to the m_dlg CDialog object.

5. Handle the message WM_LBUTTONDBLCLK for the object id CModalessView and type the coding as shown beow in the handler.

void CModalessView::OnLButtonDblClk(UINT nFlags, CPoint point)

{

m_dlg.ShowWindow(SW_SHOW);

}

The Show Window is used for displaying the modeless dialog.

6. Construct and execute the project.

7. Whenever the left button is double clicked, then the window is displayed.

8. You can continue the working with the other windows.

9. The modeless dialog will minimize whenever you work with the other windows.

10. On clicking Alt + Tab key concurrently the modeless dialog is displayed.

Visual Basic, Programming

  • Category:- Visual Basic
  • Reference No.:- M9510972

Have any Question?


Related Questions in Visual Basic

Assignment frans virtual fruit standfrans virtual fruit

Assignment: Fran's Virtual Fruit Stand Fran's Virtual Fruit Stand is an online store that sells several types of dried fruit. Based on the needs of Fran's Virtual Fruit stand, you must design a flowchart using Visual Log ...

Please show how to do the belowvisual basic net application

Please show how to do the below: Visual Basic .NET Application - Coding Exercise 1 (Exercise 13, Zak, 2016, p. 347) For this coding exercise, write the Visual Basic code for a pretest loop that uses an Integer variable n ...

Assignment virtual storeuse the concepts and scenario from

Assignment: Virtual Store Use the concepts and scenario from Assignment 1 to help "Your" Virtual Business to increase the functionality of its online shopping cart. When a customer checks out, the shopping cart must stor ...

Pitch amp game design documentthe assignment is about

Pitch & Game Design Document The assignment is about educational driver for teenagers Assignment Brief: In groups you will: - present a pitch and produce a one sheet - provide a demonstration of your game - produce a hig ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As