Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Help me please... TextBox Control

Help me please... TextBox Control

Scheduled Pinned Locked Moved Visual Basic
tutorialcsharphelp
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FeRtoll
    wrote on last edited by
    #1

    My school ends 04.03.2006 and i need to make some application for end... i started to do text editor and i want when some of text starts with example("!") then the combobox apears with items that you can insert example _______________________ | ("!Insert string") | | ("!Insert picture") | | ("!Todays Date") | | ("!Smiles") | | ("!End all") | ----------------------- and other thing: How to when the other form dialog apears and when i click insert on it i want that it inserts a text buth in position where was the (Ibeam). example _________________________________ | Form1 - Text editor | |--------------------------------| | Some text bla bla balsa ssfj | | Other one texttatdigfjl a | | | | More tegjkabsdfn čkssa | | | ---------------------------------- now i click on insert new and the new forma apears like dialog __________________________________ | Form2 - Insert text to Form1 | |--------------------------------| | | |Type text to insert: | ||==================| | | | | Cancel | Insert| ---------------------------------- i pres insert and i want that the text what i typed is inserted in Form1 - TextBox1 - Selected start where was the (Ibeam). Please help meeeeeeeeeeeeeeeee... :( Thanks Plus i didnt sleep 2 days... :( so please help me! :zzz: FeRtoll Software.net -------------------- I fertoll@net.hr I --------------------

    U 1 Reply Last reply
    0
    • F FeRtoll

      My school ends 04.03.2006 and i need to make some application for end... i started to do text editor and i want when some of text starts with example("!") then the combobox apears with items that you can insert example _______________________ | ("!Insert string") | | ("!Insert picture") | | ("!Todays Date") | | ("!Smiles") | | ("!End all") | ----------------------- and other thing: How to when the other form dialog apears and when i click insert on it i want that it inserts a text buth in position where was the (Ibeam). example _________________________________ | Form1 - Text editor | |--------------------------------| | Some text bla bla balsa ssfj | | Other one texttatdigfjl a | | | | More tegjkabsdfn čkssa | | | ---------------------------------- now i click on insert new and the new forma apears like dialog __________________________________ | Form2 - Insert text to Form1 | |--------------------------------| | | |Type text to insert: | ||==================| | | | | Cancel | Insert| ---------------------------------- i pres insert and i want that the text what i typed is inserted in Form1 - TextBox1 - Selected start where was the (Ibeam). Please help meeeeeeeeeeeeeeeee... :( Thanks Plus i didnt sleep 2 days... :( so please help me! :zzz: FeRtoll Software.net -------------------- I fertoll@net.hr I --------------------

      U Offline
      U Offline
      united18
      wrote on last edited by
      #2

      pls can u tell step by step what exactly u want? Regards, uni

      F 1 Reply Last reply
      0
      • U united18

        pls can u tell step by step what exactly u want? Regards, uni

        F Offline
        F Offline
        FeRtoll
        wrote on last edited by
        #3

        I need that when i type in textbox... if text starts with "<" then i get combobox with items for html tags... buth annywhere in textbox if i type i get thet... Get it now? :( The other question is how can i bring string from other dialogform to first one in textbox buth in the place where was the cursor (Ibeam) the | when you type the text... Ohhhhhhh sorry i am from croatia i dont know english good. Buth please help me... Thx FeRtoll Software.net -------------------- I fertoll@net.hr I --------------------

        U 1 Reply Last reply
        0
        • F FeRtoll

          I need that when i type in textbox... if text starts with "<" then i get combobox with items for html tags... buth annywhere in textbox if i type i get thet... Get it now? :( The other question is how can i bring string from other dialogform to first one in textbox buth in the place where was the cursor (Ibeam) the | when you type the text... Ohhhhhhh sorry i am from croatia i dont know english good. Buth please help me... Thx FeRtoll Software.net -------------------- I fertoll@net.hr I --------------------

          U Offline
          U Offline
          united18
          wrote on last edited by
          #4

          "I need that when i type in textbox... if text starts with "<" then i get combobox with items for html tags... buth annywhere in textbox if i type i get thet... Get it now?" in the key press event of the textbox u can check for < or .......if(textbox1.text="<") then u can either i) create a combo box or u can set the visible property of a combo box to true --- (combobox1.visible=true) sorry can't get ur second ques - is it that u wanna fetch a value from a dialogbox and use it in a textbox???

          F 1 Reply Last reply
          0
          • U united18

            "I need that when i type in textbox... if text starts with "<" then i get combobox with items for html tags... buth annywhere in textbox if i type i get thet... Get it now?" in the key press event of the textbox u can check for < or .......if(textbox1.text="<") then u can either i) create a combo box or u can set the visible property of a combo box to true --- (combobox1.visible=true) sorry can't get ur second ques - is it that u wanna fetch a value from a dialogbox and use it in a textbox???

            F Offline
            F Offline
            FeRtoll
            wrote on last edited by
            #5

            yea in key press event... so it will be like: Private Sub TextBox1_TextChange 'this event If textbox1.text.startswith("<") then combobox1.visible=true else combobox1.visible=false End if End Sub buth i dont need that becose i need that it always check if the "<" is typed annywhere... Should i try like this? Private Sub TextBox1_KeyDown if e.keys="<" then combobox1.visible=true else combobox1.visible=false End Sub

            The other question is:

            I have Form1 and Form2 on form1 i have textbox1 and now i type text in textbox something like this: _____________________________ | shdkashlčj ljsl jlj aćdsk | | jsahkldhsačklh aslč jda l | | sjdaskd <-"Here is Ibeam" | | jsd d ashkld ahs dkas s | | sdjahdla čsdčk ashčfač f | ----------------------------- ^-this is TextBox :laugh: and now i click in menu insert new... the form2 shows like dialog you select text to insert in textbox and click on btn_insert and now i want that the text that was selected in list box on form2, that that text goes to form1/textbox1 thats easy buth i need that text goes to the place of Ibeam not on the end of text box. Thanks again FeRtoll Software.net -------------------- I fertoll@net.hr I --------------------

            U R 2 Replies Last reply
            0
            • F FeRtoll

              yea in key press event... so it will be like: Private Sub TextBox1_TextChange 'this event If textbox1.text.startswith("<") then combobox1.visible=true else combobox1.visible=false End if End Sub buth i dont need that becose i need that it always check if the "<" is typed annywhere... Should i try like this? Private Sub TextBox1_KeyDown if e.keys="<" then combobox1.visible=true else combobox1.visible=false End Sub

              The other question is:

              I have Form1 and Form2 on form1 i have textbox1 and now i type text in textbox something like this: _____________________________ | shdkashlčj ljsl jlj aćdsk | | jsahkldhsačklh aslč jda l | | sjdaskd <-"Here is Ibeam" | | jsd d ashkld ahs dkas s | | sdjahdla čsdčk ashčfač f | ----------------------------- ^-this is TextBox :laugh: and now i click in menu insert new... the form2 shows like dialog you select text to insert in textbox and click on btn_insert and now i want that the text that was selected in list box on form2, that that text goes to form1/textbox1 thats easy buth i need that text goes to the place of Ibeam not on the end of text box. Thanks again FeRtoll Software.net -------------------- I fertoll@net.hr I --------------------

              U Offline
              U Offline
              united18
              wrote on last edited by
              #6

              1)yes u should try the keydown() 2)to replaceonly a part of a textbox u should use replace func. :- TextBox1.Text = TextBox1.Text.Replace("IBeam", "new text")

              1 Reply Last reply
              0
              • F FeRtoll

                yea in key press event... so it will be like: Private Sub TextBox1_TextChange 'this event If textbox1.text.startswith("<") then combobox1.visible=true else combobox1.visible=false End if End Sub buth i dont need that becose i need that it always check if the "<" is typed annywhere... Should i try like this? Private Sub TextBox1_KeyDown if e.keys="<" then combobox1.visible=true else combobox1.visible=false End Sub

                The other question is:

                I have Form1 and Form2 on form1 i have textbox1 and now i type text in textbox something like this: _____________________________ | shdkashlčj ljsl jlj aćdsk | | jsahkldhsačklh aslč jda l | | sjdaskd <-"Here is Ibeam" | | jsd d ashkld ahs dkas s | | sdjahdla čsdčk ashčfač f | ----------------------------- ^-this is TextBox :laugh: and now i click in menu insert new... the form2 shows like dialog you select text to insert in textbox and click on btn_insert and now i want that the text that was selected in list box on form2, that that text goes to form1/textbox1 thats easy buth i need that text goes to the place of Ibeam not on the end of text box. Thanks again FeRtoll Software.net -------------------- I fertoll@net.hr I --------------------

                R Offline
                R Offline
                Roy Heil
                wrote on last edited by
                #7

                FeRtoll wrote:

                and now i want that the text that was selected in list box on form2, that that text goes to form1/textbox1 thats easy buth i need that text goes to the place of Ibeam not on the end of text box.

                By Ibeam, do you mean cursor? If so, try using SelectedText, like this: textbox1.SelectedText = listbox.text This will insert the text from form2 listbox into the text in form1 textbox, at the location of the cursor. Roy.

                F 1 Reply Last reply
                0
                • R Roy Heil

                  FeRtoll wrote:

                  and now i want that the text that was selected in list box on form2, that that text goes to form1/textbox1 thats easy buth i need that text goes to the place of Ibeam not on the end of text box.

                  By Ibeam, do you mean cursor? If so, try using SelectedText, like this: textbox1.SelectedText = listbox.text This will insert the text from form2 listbox into the text in form1 textbox, at the location of the cursor. Roy.

                  F Offline
                  F Offline
                  FeRtoll
                  wrote on last edited by
                  #8

                  Roy Heil wrote:

                  By Ibeam, do you mean cursor? If so, try using SelectedText, like this: textbox1.SelectedText = listbox.text This will insert the text from form2 listbox into the text in form1 textbox, at the location of the cursor.

                  lol Roy. you think that the question is that easy... you think i didnt tried that? :| I tried everithing its not that easy... I need to save focus but how... You didnt helped me buth, Thx man for traying annyway... FeRtoll Software.net -------------------- I fertoll@net.hr I --------------------

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups