PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Stephane Fonteyne on November 25, 2005, 07:01:37 PM

Title: Get /set text from or to Textboxes.
Post by: Stephane Fonteyne on November 25, 2005, 07:01:37 PM
Paul

Can you please help me how I can get text from een textbox, then using operations en then if the user click the button, that the textbox sets the results.

Thats the main:

The user enter the value, the program calculate the results en then if the user click the button, the result put in the textbox (set the results in the textbox.

Can you give me in source an short program how I can do that.


Thanks
Title: Get /set text from or to Textboxes.
Post by: Haakon Birkeland on November 26, 2005, 12:56:24 AM
Is this a joke??
not even amusing.

Bert
Title: To Bert
Post by: Stephane Fonteyne on November 26, 2005, 04:31:58 AM
It's not an joke I can't this , okay?

Help me please....

I can't to this clear in my application, I'm student electronics ICT
Title: To Bert
Post by: Stephane Fonteyne on November 26, 2005, 04:32:22 AM
It's not an joke I can't this , okay?

Help me please....

I can't to this clear in my application, I'm student electronics ICT
Title: Get /set text from or to Textboxes.
Post by: Haakon Birkeland on November 26, 2005, 01:54:44 PM
What you are asking is so basic that with your experience with PB you should be able to do it with your eyes closed.

Bert
Title: Get /set text from or to Textboxes.
Post by: Marc Van Cauwenberghe on November 26, 2005, 02:14:13 PM
And then you have your basic basic:

FF_TextBox_SetText ' Sets the text in a TextBox control

and

FF_TextBox_GetText ' Gets the text from a TextBox control

from Paul's help file. How basic can it get!
Title: Get /set text from or to Textboxes.
Post by: Haakon Birkeland on November 26, 2005, 02:29:06 PM
It is not OOP enough for stephane.

Bert
Title: Get /set text from or to Textboxes.
Post by: Roger Garstang on November 26, 2005, 02:44:49 PM
Next he'll ask for sample code on how to make the window for the textboxes.  He seems to work his projects backwards.  Instead of having an idea and creating it, he creates it with no idea and works his way back.
Title: Example
Post by: tom cone jr on November 26, 2005, 03:19:02 PM
Stephane,

Assume your form has a textbox called "Text1".  Here's a code snippet that will "get" the text in the textbox, reverse it, and then put it back.  It is assumed the code is for a button called "Command2" on the same form.

Function FORM1_COMMAND2_BN_CLICKED ( _
                                  ControlIndex     As Long,  _  ' index in Control Array
                                  hWndForm         As Dword, _  ' handle of Form
                                  hWndControl      As Dword, _  ' handle of Control
                                  idButtonControl  As Long   _  ' identifier of button
                                  ) As Long
Dim vc_Curr_String As String  : vc_Curr_String = ""
Dim vc_New_String As String   : vc_New_String = ""  
                                 
vc_Curr_String =  FF_TextBox_GetText( HWND_FORM1_TEXT1 )  'assign text to variable
vc_Curr_String = Trim$(vc_Curr_String)
If Len(vc_Curr_String) <> 0 Then
For counter& = Len(vc_Curr_string) To 1 Step -1
vc_New_String = vc_New_String + Right$(Left$(vc_Curr_String,counter&),1)
Next counter&
FF_TextBox_SetText( Hwnd_Form1_Text1, vc_New_String) 'assign variable to textbox
End If

End Function