| View previous topic :: View next topic |
| Author |
Message |
KeyMistress Advanced Cheater
Reputation: -1
Joined: 27 Mar 2010 Posts: 52 Location: Australia
|
Posted: Wed Apr 07, 2010 12:52 pm Post subject: How can I fix this error? - Win32 Unhandled |
|
|
Hi, so i'm using VB2008 express edition and I want to put up a linklabel
using this code
| Code: | Public Class Form1
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
System.Diagnostics.Process.Start("url")
End Sub
End Class |
and when I start debugging it I get something about the win32 exception is unhandled. any help please?
|
|
| Back to top |
|
 |
Polynomial Grandmaster Cheater
Reputation: 5
Joined: 17 Feb 2008 Posts: 524 Location: Inside the Intel CET shadow stack
|
Posted: Wed Apr 07, 2010 3:54 pm Post subject: |
|
|
You're trying to start a process called "url". Change "url" to a valid address, e.g. http://www.somesite.com/
If you want to have it link to the link you specified in the properties, do this:
System.Diagnostics.Process.Start(CType(e.Link.LinkData, String))
_________________
It's not fun unless every exploit mitigation is enabled.
Please do not reply to my posts with LLM-generated slop; I consider it to be an insult to my time. |
|
| Back to top |
|
 |
KeyMistress Advanced Cheater
Reputation: -1
Joined: 27 Mar 2010 Posts: 52 Location: Australia
|
Posted: Thu Apr 08, 2010 11:37 am Post subject: |
|
|
| The process is a valid address I just can't post URLS yet so I had to put URL in.
|
|
| Back to top |
|
 |
SF I'm a spammer
Reputation: 119
Joined: 19 Mar 2007 Posts: 6028
|
Posted: Thu Apr 08, 2010 12:47 pm Post subject: |
|
|
Moved to programming.
_________________
|
|
| Back to top |
|
 |
Polynomial Grandmaster Cheater
Reputation: 5
Joined: 17 Feb 2008 Posts: 524 Location: Inside the Intel CET shadow stack
|
Posted: Thu Apr 08, 2010 1:54 pm Post subject: |
|
|
You need to specify http:// in front of the URL for it to recognise it properly. If it's still throwing errors, it may be that you don't have permissions to launch the browser process. Have you tried running "notepad.exe" in the same way?
_________________
It's not fun unless every exploit mitigation is enabled.
Please do not reply to my posts with LLM-generated slop; I consider it to be an insult to my time. |
|
| Back to top |
|
 |
KeyMistress Advanced Cheater
Reputation: -1
Joined: 27 Mar 2010 Posts: 52 Location: Australia
|
Posted: Fri Apr 09, 2010 8:02 am Post subject: |
|
|
I tried it with h t t p : // and still get the error...however the notepad.exe did work.
( I can't post URL yet I didn't do spaces in actual code )
Thankyou for helping me out with this.
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Fri Apr 09, 2010 8:11 am Post subject: |
|
|
| VB lets you create a URL as a process, wat?
|
|
| Back to top |
|
 |
KeyMistress Advanced Cheater
Reputation: -1
Joined: 27 Mar 2010 Posts: 52 Location: Australia
|
Posted: Fri Apr 09, 2010 8:22 am Post subject: |
|
|
| Apperently..I've never used a linklabel before so i'm not entirely sure how to use it to open web pages but it says I can on youtube videos...when I try it myself I keep getting an error.
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Apr 09, 2010 3:33 pm Post subject: |
|
|
| Noz3001 wrote: | | VB lets you create a URL as a process, wat? |
it's probably the equivalent of trying to type a url into the run prompt. your default browser will open
|
|
| Back to top |
|
 |
KeyMistress Advanced Cheater
Reputation: -1
Joined: 27 Mar 2010 Posts: 52 Location: Australia
|
Posted: Sat Apr 10, 2010 3:18 am Post subject: |
|
|
| Doesn't anybody know how to help me?
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Apr 10, 2010 3:36 am Post subject: |
|
|
http://msdn.microsoft.com/en-us/library/53ezey2s.aspx
note the exception remark, | Quote: | | An error occurred when opening the associated file. |
sure enough...
| Code: | | System.Diagnostics.Process.Start("google.com"); |
will raise that exception
the solution? prefix the url with http://
that's it.
|
|
| Back to top |
|
 |
KeyMistress Advanced Cheater
Reputation: -1
Joined: 27 Mar 2010 Posts: 52 Location: Australia
|
Posted: Sat Apr 10, 2010 4:07 am Post subject: |
|
|
I tryed that and I still get the error, I also tryed
System.diagnostics.process.start("Iexplorer.exe", "URL WITH H T T P : //")
still get errors...Btw i'm using vista could it be my os? What the hell is win32?
or could it be that my default browser is Opera?
thanks for any help.
EDIT TOPIC REQUEST LOCKED
DEFAULT BROWSER WAS THE PROBLEM DOWNLOADED FIREFOX AND WALA WORKS : ) Thanks for the help.
|
|
| Back to top |
|
 |
|