Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Get a input string from user


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-31-2007, 07:11 PM
Junior Member
 
Join Date: Aug 2007
Posts: 16
Question Get a input string from user

There are a function to get a string from user like InputBox or I need to create a form do do this task?
Reply With Quote
  #2 (permalink)  
Old 08-31-2007, 11:44 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,008
Default

Usually we use a panel with a label describing/asking an input and a textbox for the user to input and a button to trigger the input action....but its also simple to create a custom control (dll) with this function...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #3 (permalink)  
Old 09-01-2007, 04:56 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 352
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Quote:
Usually we use a panel with a label describing/asking an input and a textbox for the user to input and a button to trigger the input action
For what Cableguy describing above look at this thread Input Panel

Quote:
....but its also simple to create a custom control (dll) with this function...
Hello Cableguy,

It won't be difficult to create a clone of your AboutPanel library (named for example InputBox and using .ShowDialog) to act like a modal InputBox. Think about it, no hurry at all, we all can wait until... this evening

Cheers
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #4 (permalink)  
Old 09-01-2007, 08:18 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,008
Default

will do!!!
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #5 (permalink)  
Old 09-01-2007, 08:22 AM
taximania's Avatar
Senior Member
 
Join Date: May 2007
Posts: 189
Default

Quote:
Originally Posted by dzt View Post
no hurry at all, we all can wait until... this evening
ha ha ha
__________________
Avoiding lawyers

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
Reply With Quote
  #6 (permalink)  
Old 09-01-2007, 07:30 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,008
Default

"Your system will melt down in 10....9...8....7..."


Well, almost.....Got a virus and had to re-install my system.....

That part is done, now I have to re-install and configure all the other apps, including b4ppc and sharpdevelop....

Hopefully I'll have all working by tomorow and start on the imput panel....

In the meantime, please provide some props/features that you would like to see in an input panel, and if possible, a graphical example of how it would look....
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #7 (permalink)  
Old 09-03-2007, 06:14 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,008
Default

InputPanel is now in its coding stage, but a doubt has rised....

I learned how to manage button click events inside the class, but how can I pass it to b4ppc?

I have contructed the click event....what do i put inside it? a simple get/set?
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #8 (permalink)  
Old 09-03-2007, 06:22 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 352
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Take a closer look at previously posted libraries, inluding ScrollBar at "How to create a Basic4ppc library" thread.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #9 (permalink)  
Old 09-03-2007, 06:33 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,008
Default

Code:
'btn1 is the OK button, so it should pass the textbox(txt) value....
private void btn1_Click(System.Object sender, System.EventArgs e)
		{
			get{ return txt.text;}
		}
'btn2 is the Clear button, so it should Clear the textbox(txt) value....
private void btn1_Click(System.Object sender, System.EventArgs e)
		{
			txt.text=""
		}
Would this be correct???

When validating user input, whats the best form of action, to hide the panel or to dispose of it?
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #10 (permalink)  
Old 09-04-2007, 11:24 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 352
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Hello,

To show a modal dialog use .showdialog

Code:
public string Show()
{
  frmInputBox.ShowDialog();
 
  return StringTypedByUser;
}
And to close your InputBox...

Code:
private void btnOK_Click(System.Object sender, System.EventArgs e) 
{
  frmInputBox.Close();
}
__________________
Dimitris Zacharakis
http://www.terracom.gr

Last edited by dzt : 09-04-2007 at 11:33 AM.
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
A bot as a User? Cableguy Forum Discussion 2 05-24-2008 03:23 PM
Returning subroutine error - Input string was not in the correct format HarleyM Questions & Help Needed 4 10-20-2007 06:45 AM
Input String is wrong format lairdre Questions & Help Needed 2 05-22-2007 07:43 PM
Old user won't find the new forum, because... sloopa Forum Discussion 0 05-02-2007 04:56 AM


All times are GMT. The time now is 04:03 AM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0