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. Removing selected text

Removing selected text

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorialquestion
19 Posts 2 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.
  • C compukeith

    Very cool! It worked perfect (with a few mods so it works with my code). Can you test it out now? I'm including a link to download a zip file which contains the app plus source. I also have another thing i'd like to do. I have it setup so that the button "Go" is not the default because if it is, then the Google: search feature doesn't work if you hit return. I am trying to fix that by adding code that will capture if a user presses the Return key and it will then call the function "cmdGo_click". It's explained more in the source. [Source and App](http://members.csinet.net/keithmcdermott/work quick access.zip) Thanks, Keith

    S Offline
    S Offline
    skrtbh
    wrote on last edited by
    #4

    The following code should work: Private Sub Form_KeyDown(Keycode As Integer, _ Shift As Integer) If Keycode = vbKeyReturn Then cboChoose.SelLength = 7 cmdGo_Click End If End Sub But there's still another problem: Your application only works with English Windows versions. I use Windows XP Home German, and the program crashed because the name of the 'Program Files' directory is translated into the OS' language. :(

    C 1 Reply Last reply
    0
    • C compukeith

      Very cool! It worked perfect (with a few mods so it works with my code). Can you test it out now? I'm including a link to download a zip file which contains the app plus source. I also have another thing i'd like to do. I have it setup so that the button "Go" is not the default because if it is, then the Google: search feature doesn't work if you hit return. I am trying to fix that by adding code that will capture if a user presses the Return key and it will then call the function "cmdGo_click". It's explained more in the source. [Source and App](http://members.csinet.net/keithmcdermott/work quick access.zip) Thanks, Keith

      S Offline
      S Offline
      skrtbh
      wrote on last edited by
      #5

      One important thing that I forgot in the message above: Make sure the form's KeyPreview property is set to true!

      C 1 Reply Last reply
      0
      • S skrtbh

        The following code should work: Private Sub Form_KeyDown(Keycode As Integer, _ Shift As Integer) If Keycode = vbKeyReturn Then cboChoose.SelLength = 7 cmdGo_Click End If End Sub But there's still another problem: Your application only works with English Windows versions. I use Windows XP Home German, and the program crashed because the name of the 'Program Files' directory is translated into the OS' language. :(

        C Offline
        C Offline
        compukeith
        wrote on last edited by
        #6

        Well, the application was designed for in-house use at the company I work for, but I can see that it will be cool to release. So, what directory is equivelent to "Program files"? I know that there's a system command that can be used as the root folder (like Windows is %sysdir% or something like that. Anyone know that command? I'm releasing another version that incorporates the above code (i put it in cboChoose instead of Form so it'll work). Yet another version Thanks again M_M_G

        1 Reply Last reply
        0
        • S skrtbh

          One important thing that I forgot in the message above: Make sure the form's KeyPreview property is set to true!

          C Offline
          C Offline
          compukeith
          wrote on last edited by
          #7

          I forgot it and changed it and it doesn't seem to matter either way. Odd thing, it won't do the Google: feature the very first time i press enter. I have to close the IE windows that comes up and press enter in my app again for it to correctly search Google. The program works perfectly for all features when just pressing the cmdGo button manually.

          S 1 Reply Last reply
          0
          • C compukeith

            I forgot it and changed it and it doesn't seem to matter either way. Odd thing, it won't do the Google: feature the very first time i press enter. I have to close the IE windows that comes up and press enter in my app again for it to correctly search Google. The program works perfectly for all features when just pressing the cmdGo button manually.

            S Offline
            S Offline
            skrtbh
            wrote on last edited by
            #8

            I don't really know why , but I finally got it to work the first time I press enter. This is what I changed: Dim GoogleCheck GoogleCheck = Left(go, 7) If GoogleCheck = "Google:" Then [...] I don't know how to get the name of the program files directory. This would be MUCH easier when using VB.NET!

            C 1 Reply Last reply
            0
            • S skrtbh

              I don't really know why , but I finally got it to work the first time I press enter. This is what I changed: Dim GoogleCheck GoogleCheck = Left(go, 7) If GoogleCheck = "Google:" Then [...] I don't know how to get the name of the program files directory. This would be MUCH easier when using VB.NET!

              C Offline
              C Offline
              compukeith
              wrote on last edited by
              #9

              Holy crap! It works! :-D:cool: Thanks a ton M_M_G. I'll have to start coding in VB.NET so I can actually get this to work right. If you want, send me the directory that's equivalent to "Program Files" in the german version of windows and I'll write in a if then statement to determine which version the user's using.

              S 1 Reply Last reply
              0
              • C compukeith

                Holy crap! It works! :-D:cool: Thanks a ton M_M_G. I'll have to start coding in VB.NET so I can actually get this to work right. If you want, send me the directory that's equivalent to "Program Files" in the german version of windows and I'll write in a if then statement to determine which version the user's using.

                S Offline
                S Offline
                skrtbh
                wrote on last edited by
                #10

                Cool... :-D The German name of the directory is: C:\Programme\Internet Explorer . Will it be possible to download the final version from your website?

                C 2 Replies Last reply
                0
                • S skrtbh

                  Cool... :-D The German name of the directory is: C:\Programme\Internet Explorer . Will it be possible to download the final version from your website?

                  C Offline
                  C Offline
                  compukeith
                  wrote on last edited by
                  #11

                  Cool. Yeah - I'll post a final version later tonight. What sites do you want in there? The ones that are in there now are just for work purposes, so if you give me a list of some popular sites, I'll enter them in place of what I currently have in there. Thanks again. Keith

                  1 Reply Last reply
                  0
                  • S skrtbh

                    Cool... :-D The German name of the directory is: C:\Programme\Internet Explorer . Will it be possible to download the final version from your website?

                    C Offline
                    C Offline
                    compukeith
                    wrote on last edited by
                    #12

                    OK - I added in an error handler so it will catch your directory. [Here's](http://members.csinet.net/keithmcdermott/work quick access.exe) the newest version - complete with a "working" Google: search tool, direct website access via combo box, and by typing in the address. I personally will modify mine to be my most used sites and will take it with me on a flash drive. Again, thanks a ton for your work on this. I'm going to clean up the code and post a zip file soon with complete source available. If you post it though, I can recompile it with a list with whatever you want. Just tell me how you want it to look in the combo box and what sites you want listed. (ex: in my combo box, i have every categorized). -Keith

                    S 1 Reply Last reply
                    0
                    • C compukeith

                      OK - I added in an error handler so it will catch your directory. [Here's](http://members.csinet.net/keithmcdermott/work quick access.exe) the newest version - complete with a "working" Google: search tool, direct website access via combo box, and by typing in the address. I personally will modify mine to be my most used sites and will take it with me on a flash drive. Again, thanks a ton for your work on this. I'm going to clean up the code and post a zip file soon with complete source available. If you post it though, I can recompile it with a list with whatever you want. Just tell me how you want it to look in the combo box and what sites you want listed. (ex: in my combo box, i have every categorized). -Keith

                      S Offline
                      S Offline
                      skrtbh
                      wrote on last edited by
                      #13

                      Thanks for this offer, but I don't know which sites to include at the moment. Please post a link to the source code .zip file, so I can modify the program on my own.

                      C 1 Reply Last reply
                      0
                      • S skrtbh

                        Thanks for this offer, but I don't know which sites to include at the moment. Please post a link to the source code .zip file, so I can modify the program on my own.

                        C Offline
                        C Offline
                        compukeith
                        wrote on last edited by
                        #14

                        No problem. Here's a link to the source and program. I've added a "about" form that describes how to use the app and it also gives you credit for the Google stuff. If you just alter the "goasp" variable to point to just IE instead of also referencing a specific site, it can get to your list correctly. -Keith

                        S 1 Reply Last reply
                        0
                        • C compukeith

                          No problem. Here's a link to the source and program. I've added a "about" form that describes how to use the app and it also gives you credit for the Google stuff. If you just alter the "goasp" variable to point to just IE instead of also referencing a specific site, it can get to your list correctly. -Keith

                          S Offline
                          S Offline
                          skrtbh
                          wrote on last edited by
                          #15

                          The about form looks really good! :-D Well, I've still got another question: May I translate this app into German and offer the executable (or a setup program) on my web site? Possibly I'll also make a .NET version. This would be really cool! :cool:

                          C 1 Reply Last reply
                          0
                          • S skrtbh

                            The about form looks really good! :-D Well, I've still got another question: May I translate this app into German and offer the executable (or a setup program) on my web site? Possibly I'll also make a .NET version. This would be really cool! :cool:

                            C Offline
                            C Offline
                            compukeith
                            wrote on last edited by
                            #16

                            Sure! All I ask is that you mention me somewhere - even if it's just in the source. Post a link once you're done. I'd like to see it in .NET!

                            S 1 Reply Last reply
                            0
                            • C compukeith

                              Sure! All I ask is that you mention me somewhere - even if it's just in the source. Post a link once you're done. I'd like to see it in .NET!

                              S Offline
                              S Offline
                              skrtbh
                              wrote on last edited by
                              #17

                              I've just finished work at Quick Access.NET version 1.0! I added some new features: - a 'notify icon' that is displayed in the systray. Double-click it and Quick Access will open. You can also right-click the icon to bring up a context menu. - AutoComplete function for the ComboBox - Support for WinXP look-and-feel You can download the MSI package here: www.madcode.net/download/quickaccess/quickaccess_setup.msi[^] If you want something changed or if I shall send you the source code via email, please contact me: webmaster@madcode.net

                              C 1 Reply Last reply
                              0
                              • S skrtbh

                                I've just finished work at Quick Access.NET version 1.0! I added some new features: - a 'notify icon' that is displayed in the systray. Double-click it and Quick Access will open. You can also right-click the icon to bring up a context menu. - AutoComplete function for the ComboBox - Support for WinXP look-and-feel You can download the MSI package here: www.madcode.net/download/quickaccess/quickaccess_setup.msi[^] If you want something changed or if I shall send you the source code via email, please contact me: webmaster@madcode.net

                                C Offline
                                C Offline
                                compukeith
                                wrote on last edited by
                                #18

                                Cool! I really like it. That makes me really want to start learning .NET. Cool and thanks for the really good update!

                                S 1 Reply Last reply
                                0
                                • C compukeith

                                  Cool! I really like it. That makes me really want to start learning .NET. Cool and thanks for the really good update!

                                  S Offline
                                  S Offline
                                  skrtbh
                                  wrote on last edited by
                                  #19

                                  I'm pleased that you like it. I'll provide some updates in future, just check: www.madcode.net/download/quickaccess from time to time. [This site isn't available at the moment, but it will be soon!]

                                  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