opening a website using your default webbrowser

Use this board to post your code snippets - tips and tricks
9 posts Page 1 of 1
Contributors
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

hello guys ,

this will be a very simple thing for some experienced people but anyway i thought i should post this because most of begginers dont know this . i have to tell for all if this was posted already inform me ok .

if you want to open your website when a button or any events , tools used this is the way .

i use button here . insert a button and double click it and use this code
Code: Select all
system.diagnostics.process.start"http://www.codenstuff.com"
this can be used to open a program too !

i am sorry if theres any mistake in spelling or any other thing because i am posting this using my mobile .
hope this will be a useful snip
Last edited by Shim on Thu Apr 05, 2012 4:19 pm, edited 1 time in total.
Find my programs on Softpedia
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

sorry for the bb code upset ok because my mobile..
Find my programs on Softpedia
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

You can use edit button..
Code: Select all
process.start("http://www.codenstuff.com")
Also works
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

It is the same visioncr0, but you need to import System.Diagnostics first.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Skillful
Skillful Coders
Skillful Coders
Posts: 969
Joined: Tue Nov 16, 2010 10:07 am

Fix your code in the main post dude.
It should be -
Code: Select all
System.Diagnostics.Process.Start("http://www.codenstuff.com")
Instead of LOL use this -
LSIBMHBIWFETALOL

Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
User avatar
goldfox453
Just Registered
Just Registered
Posts: 9
Joined: Sun Nov 07, 2010 3:01 am

I just use
Code: Select all
Process.start("http://www.website.com")
wont that work for anyone ?
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

I never imported system.diagnostics. Process.Start alone works just fine ;)
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

It's because System.Diagnostics are 'pre-imported' as default unless you've changed that ;)
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

iw always used Process.start("blahblahblah")
Image
9 posts Page 1 of 1
Return to “Quick Snips”