473,667 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple Input Dialog

Hi again all,

I was wondering if there was a simple built in dialog box that contained
only a textbox and an ok button? Just like the MessageBox.Show (...)
class/method.

Or do I have to make it "old school" and create it myself?

Does anyone have a premade simple one? or link to one?

Thanks heaps in advance.
Nov 17 '05 #1
1 34577
You have to create your own form and put a textbox and button in it.
and use ShowDialog() to display the form;

Example:
//assume the simple form class you created is called InputDialog
//and it has a property TextInput return what user enter in the text box
//create a instance of the form
InputDialog inputDialog = new InputDialog();
//display the form as a dialog of the main form
inputDialog.Sho wDialog(this);
string userInput = inputDialog.Tex tInput;

cheers,
Ivan Wong

"James Alba" wrote:
Hi again all,

I was wondering if there was a simple built in dialog box that contained
only a textbox and an ok button? Just like the MessageBox.Show (...)
class/method.

Or do I have to make it "old school" and create it myself?

Does anyone have a premade simple one? or link to one?

Thanks heaps in advance.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
21609
by: Basil Fawlty | last post by:
I need help and suggestions on how to modify the below program to get two numbers from user input using a input dialog box. B/c I'm a total newbie with next to no programming experience, I'm not sure where to insert the additional code. I'm using Forte for Java 3.0 CE. The below code does compile and run. Please advise. import javax.swing.*; // Make Swing available public class sum2 extends java.lang.Object { public sum2() { ...
0
1412
by: tkailler | last post by:
Hello, I've created a dialog by creating a class in which Instead of calling wx.Dialog.__init__ I precreate the dialog and then I create the GUI dialog using the Create method. When I create the dialog's class from another class, I don't know how to retrieve the dialog input. I have a few text fields and can't reach them. I don't mind changing what I already did - I just want it to work. If anyone has an example of how it is done -...
10
4217
by: Fred | last post by:
Hi all ! Newbie in C programming needs help please ... I have a Windows console application written in C who ask a password on the command line . I want to change the original code to ask the password with a password dialog box . ----------------------- |
7
2249
by: Sam | last post by:
I have a Microsoft Access report which I have automated using C#. When the report opens (via DoCmd.OpenReport) I am confronted with several prompts for parameters (example: "Please enter today's date"). What I would like to do is handle each and every one of these prompts programmatically with C#. Modifying the original Access report (with its related queries, etc.) is not an option. I just want to send values from my C# app to the MS...
3
8415
by: june | last post by:
Hi, I am coding for an application with dialog window. I need intercept mouse input. I need catch raw input, pretty much everything for WM_INPUT: such as Left/Middle/Right button down/up, srcoll/wheel, pull and drag, device source. I checked SetWindowsHookEx, it seems it can't catch so much infor, only LButton RButton Down/Up? What function should I use or maybe I should ask how to hook Dialog box message Proc? Thanks
1
1760
by: Mr Roboto | last post by:
Folks: I've already searched the group and have determined there *are* char I/O based input systems, ala NCURSES, that are Python-compatible (ie. PyNCurses, UrWid, etc.) What I *need* is something that does simple dialogs under char-I/O Win32 and DOS w/ very little fuss or muss. At most, I need one or two dialog boxes to boot my little app/util *AND* hope upon hope I don't need port something (which would take more days than I have...
3
31852
by: oopaevah | last post by:
I want to have a separate button which invokes the "browse" button on an input type=file. In internet explorer the following code works ok, in firefox nothing happens. All I do is call click() for the input control. Do you know how to make this work in firefox? Thanks
3
3060
by: Ant | last post by:
Hi, I'm using a modal dialog box to input data. I have created properties on the dialog form to capture the data so that it might be read from the main form via the dialog form. This approach encapsulates the data & I can implement the business logic in the dialog form. This leaves me with the quiestion. There is no Class representing the data I'm capturing, (say, it's a customer) apart from the dialog form class. The form now...
2
4041
by: Glen | last post by:
Hello, I've written a script in python and put together a simple QFrame with a QTextBrowser with Designer. I've translated the C++ into python using puic4. The .py file is called outputWin.py. My Script and its functions are in cnt.py. Finally, my main is in pball.py which follows here: import sys from PyQt4 import Qt, QtCore from outputWin import * from cnt import *
0
8458
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8366
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8565
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.