Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
Go Back  Xtreme Visual Basic Talk > > > > Making Custom Prompt Forms like MessageBox


Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2004, 01:33 PM
Iceplug's Avatar
IceplugMaking Custom Prompt Forms like MessageBox Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Lightbulb Making Custom Prompt Forms like MessageBox


Here are some sample VB.NET form classes for making prompts in your program.

In each .vb file, you will find the Form class is not shown directly, but is shown by the second class, making a .ShowDialog call to the Form class:
Code:
Public [COLOR=Blue]Overloads Shared [/COLOR] Function Show() As Integer Dim NB As NumberBox Dim X As Integer NB = New NumberBox 'Instantiates the prompt numberbox 'If OK was pressed, there's something waiting for me in the .MyValue property. If NB.ShowDialog() = DialogResult.OK Then 'Shows the form. X = NB.MyValue 'Get it. Else X = -1 '-1, the default value. End If 'Return the value that we get. Return X 'You might find the other show functions are very similar to this one. 'Also, the other classes have show functions similar to this. 'Good luck. End Function
So, for each .vb file:
There is a class with multiple Shared Show functions.
These show the prompt form, using the New constructor to initialize the form (we do provide parameters for those multiple Shared Show functions, so they must be passed to the form)
The DialogResults are set for the OK and Cancel Button...
When the OK button is pressed, the prompt form data is written into RetVal (get this using .MyValue from the multiple Shared Show functions)
and from the Show function, the result is returned.

Enclosed are the NumericBox (selecting a number from a prompt),
the ArrayBox (selecting an array member from a prompt),
and the StringBox (like the InputBox where you type in a string from the prompt).
Good luck and enjoy!
Attached Files
File Type: zip Prompts.zip (15.2 KB, 222 views)
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making forms dockable newhere19 Interface and Graphics 1 01-14-2003 06:11 AM
making forms move Jonny2002 General 3 07-10-2002 04:02 AM
Making NEW and DELETING OLD forms kwijibo General 12 06-17-2002 04:11 PM
Making forms relative to worksheets? rimpet Word, PowerPoint, Outlook, and Other Office Products 3 04-14-2002 05:48 PM
making resolution-free forms ionutdinulescu General 3 03-21-2002 09:35 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
 
Making Custom Prompt Forms like MessageBox
Making Custom Prompt Forms like MessageBox
 
-->