Easy way to open IE:

  • BlueHat
  • Banned
  • Banned
  • User avatar
  • Joined: Feb 29, 2004
  • Posts: 589
  • Loc: Cyprus
  • Status: Offline

Post April 17th, 2004, 7:31 pm

Easy way to open IE:

Shell ("C:\Program Files\Internet Explorer\iexplore.exe " + txtaddress.Text), vbMaximizedFocus

you can add a command button and put the above code behind it, u can also add a textBox and name it txtaddress, then type the address u want to connect to..

Have fun..
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post April 17th, 2004, 7:31 pm

  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Joined: Feb 17, 2004
  • Posts: 279
  • Loc: Buenos Aires, Argentina
  • Status: Offline

Post April 17th, 2004, 9:56 pm

Actually, there is a regitry key with the path to the preferred program for openning HTML files. You should use that value for taking in count the users preferences.
IE is not the only browser, it is just a bad one. :)
  • Scorpius
  • Proficient
  • Proficient
  • User avatar
  • Joined: Mar 20, 2004
  • Posts: 401
  • Loc: Scorpion Hole
  • Status: Offline

Post April 17th, 2004, 10:36 pm

_Leo_ does have a very good point. More and more users every day are getting smart and getting away from Internet Explorer and moving to Mozilla, like myself, or another similar browser. Internet Explorer has way too many flaws, and security bugs in it. :( Anyway, I've been with Mozilla for a nice long while now and I think that I'm going to stay with it. Its been good to me.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Mar 24, 2004
  • Posts: 1855
  • Loc: Uk
  • Status: Offline

Post April 18th, 2004, 12:26 am

I just made Firefox my default browser yesterday :D
CSS website design tutorials
  • BlueHat
  • Banned
  • Banned
  • User avatar
  • Joined: Feb 29, 2004
  • Posts: 589
  • Loc: Cyprus
  • Status: Offline

Post April 18th, 2004, 5:53 am

I even my self uses FireFox, but as u know most of the people around the world uses IE.
but still good point.
  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Joined: Feb 17, 2004
  • Posts: 279
  • Loc: Buenos Aires, Argentina
  • Status: Offline

Post April 18th, 2004, 8:13 am

In msdn.microsoft.com you can find information about which registry keys to read in order to get information about users preferences. And, hardcoding "Program files" isn't a good idea. Windows in other laguages than english use a translated directory name. In example, a Spanish windows will create "Archivos de programa" instead of "Program files". I don't know how did Bill Gates came out with taht wonderful idea :)

There is a registry key and an environment variable with that information too.

I recommend to read about registry key issues in MSDN site. It's a good way for avoiding common application bugs.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post April 18th, 2004, 10:42 am

I didn't test it, but if you do...

Shell (txtaddress.Text), vbMaximizedFocus

Won't it simply load it in the system default browser?

I often do Win+R (to run), type in a URL (like http://www.ozzu.com), hit OK, then up comes the browser with the URL loaded.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Mar 24, 2004
  • Posts: 1855
  • Loc: Uk
  • Status: Offline

Post April 18th, 2004, 10:55 am

I normally click the icon in my quick launch :P
CSS website design tutorials
  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Joined: Feb 17, 2004
  • Posts: 279
  • Loc: Buenos Aires, Argentina
  • Status: Offline

Post April 18th, 2004, 11:27 am

Axe wrote:
I didn't test it, but if you do...

Shell (txtaddress.Text), vbMaximizedFocus

Won't it simply load it in the system default browser?

I often do Win+R (to run), type in a URL (like http://www.ozzu.com), hit OK, then up comes the browser with the URL loaded.


Well, I gues it will work. But I think it may depend on some library of the development language you are using. I mean, it may no work on some versions of windows. But, you may neither find the registry key on those.

May be the answer is to read about Shell() function in MSDN for compatibility.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post April 18th, 2004, 11:58 am

As far as I'm aware, the shell function just says to the OS "Hey, run this"...

So, anything you could put in Start -> Run should work, and either run the app (if that's what it's pointing to) or load up the default applications (if it's pointing to a non-executabl file).

It's been a while since I coded windows apps, but it used to work this way in Delphi (maybe not this exact function name, but there is a function to do it this way).

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 119 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.