Question

In VB.NET is there a library of template dialogs I can use? It's easy to create a custom dialog and inherit from that, but it seems like there would be some templates for that sort of thing.

I just need something simple like Save/Cancel, Yes/No, etc.

Edit: MessageBox is not quite enough, because I want to add drop-down menus, listboxes, grids, etc. If I had a dialog form where I could ask for some pre-defined buttons, each of which returned a modal result and closed the form, then I could add those controls and the buttons would already be there.

Was it helpful?

Solution

Why not create your own template? I've done that with several types of forms, not just dialogs. It is a great way to give yourself a jump-start.

Create your basic dialog, keeping it as generic as possible, then save it as a template.

Here is an article that will help you:

http://www.builderau.com.au/program/dotnet/soa/Save-time-with-Visual-Studio-2005-project-templates/0,339028399,339285540,00.htm

And:

http://msdn.microsoft.com/en-us/magazine/cc188697.aspx

OTHER TIPS

Do you need something more than what can be provided by MsgBox?

MsgBox("Do you want to see this message?", MsgBoxStyle.OkCancel + MsgBoxStyle.Information, "Respond")

Are you unable to use the MessageBox class?

Of course there's MessageBox (shorthand MsgBox in VB.Net) and also the windows common dialogs like Open File, Save File, Print, ColorPicker, etc.

However, none of those really qualify as templates.

I can sympathize with wanting a better message box from time to time. You might try code project: I'll bet you'll see a dozen...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top