Easy way to open IE:

  • BlueHat
  • Banned
  • Banned
  • User avatar
  • Posts: 589
  • Loc: Cyprus

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Posts: 279
  • Loc: Buenos Aires, Argentina

Post 3+ Months Ago

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
  • Posts: 401
  • Loc: Scorpion Hole

Post 3+ Months Ago

_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
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

I just made Firefox my default browser yesterday :D
  • BlueHat
  • Banned
  • Banned
  • User avatar
  • Posts: 589
  • Loc: Cyprus

Post 3+ Months Ago

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
  • Posts: 279
  • Loc: Buenos Aires, Argentina

Post 3+ Months Ago

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
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

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
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

I normally click the icon in my quick launch :P
  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Posts: 279
  • Loc: Buenos Aires, Argentina

Post 3+ Months Ago

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
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

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 129 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.