Hack Forums
[.NET] [vb.NET help please] How to check if username and password is valid - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [vb.NET help please] How to check if username and password is valid (/showthread.php?tid=137313)

Pages: Pages 1 2


- GoldStar - Sep 3, 2009

no delay is like guessing. what if connection is out??
you just add IF statment:
IF webbrowser.url = "the url if login is right" then
check the ID thing when the login is ok
else if webbrowser.url = "the url if login is wrong"
check for the ID of the element to see if the the site returns an error
end if

all that in the document_comlpited. this way when your webbrowser navigates the first site will not check html elements.


- Feminist - Sep 3, 2009

(Sep 3, 2009 05:32 PM)Miharbi Wrote:  no delay is like guessing. what if connection is out??
you just add IF statment:
IF webbrowser.url = "the url if login is right" then
check the ID thing when the login is ok
else if webbrowser.url = "the url if login is wrong"
check for the ID of the element to see if the the site returns an error
end if

all that in the document_comlpited. this way when your webbrowser navigates the first site will not check html elements.

that works too, but your using the wrong code, its
Code
If WebBrowser1.AbsoluteUri = "yourwebsitehere" then
msgbox("connected")
else
msgbox("not connected!")



- GoldStar - Sep 3, 2009

(Sep 3, 2009 06:39 PM)scriptkiddy Wrote:  that works too, but your using the wrong code, its
Code
If WebBrowser1.AbsoluteUri = "yourwebsitehere" then
msgbox("connected")
else
msgbox("not connected!")

yeah i don't remember the exact syntax, i'm too lazy to open up VB to check =)


- SgtPunishment - Sep 4, 2009

the delay again, does and doesn't work, it still says account not valid before it says account is valid and the

Code
If WebBrowser1.AbsoluteUri = "yourwebsitehere" then
msgbox ("connected")
else
msgbox ("Not Connected")

doesn't work it gives me this error

'AbsoluteUri' is not a member of 'System.Windows.Forms.WebBrowser'.

even if I put url, gonna try BlueMelon's method, see if I have any luck with that


- GoldStar - Sep 4, 2009

(Sep 4, 2009 03:26 AM)SgtPunishment Wrote:  the delay again, does and doesn't work, it still says account not valid before it says account is valid and the

Code
If WebBrowser1.AbsoluteUri = "yourwebsitehere" then
msgbox ("connected")
else
msgbox ("Not Connected")

doesn't work it gives me this error

'AbsoluteUri' is not a member of 'System.Windows.Forms.WebBrowser'.

even if I put url, gonna try BlueMelon's method, see if I have any luck with that

ok you should try to understand what 'im saying. i said a combination will be good.
Code
If WebBrowser1.AbsoluteUri = "yourwebsitehere" then
if element ID check is OK then
msgbox ("connected")
end if
else
msgbox ("Not Connected")



- MAD-DOG - Sep 6, 2009

hi there,
am trying to do the same thing but have it Connect to my forum and have staff and VIPs only can see my program aka my forms!
info
my forum its a vbulletin
and my Usergroups id number is 6,9,5

thanks.


- BlueMelon - Sep 6, 2009

Heh Wrong section... ^^^


- MAD-DOG - Sep 7, 2009

(Sep 6, 2009 07:58 AM)BlueMelon Wrote:  Heh Wrong section... ^^^

huh? what do you mean?