Results 1 to 2 of 2

Thread: help to login to that website

  1. #1
    .NET Framework
    .NET 4.5
    Join Date
    Aug 2018
    Posts
    2
    Reputation
    0

    help to login to that website

    hey guys i am new here just a beginner in vb.net i have a question i made a login form for a browser game but i am stuck on how to go forward to seconde load game .. vb.net web-game (www.darkorbit.com) username =strikerII password = 1236987

    windows form application with :

    2 textbox
    1 web-browser
    3 buttons

    PublicClassForm1
    Dim didWeNavigated? AsBoolean = False
    Dim gottheserver? AsBoolean = False


    PrivateSub Button1_Click(sender AsObject, e AsEventArgs) Handles Button1.Click
    WebBrowser1.Navigate("http://www.darkorbit.com")
    didWeNavigated = True
    EndSub


    PrivateSub WebBrowser1_DocumentCompleted(sender AsObject, e AsWebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
    If didWeNavigated = FalseThen
    Exit Sub
    EndIf
    If didWeNavigated = TrueThen didWeNavigated = False
    Dim username AsString = TextBox1.Text
    Dim password AsString = TextBox2.Text
    WebBrowser1.Document.GetElementById("bgcdw_login_form_username").SetAttribute("Value", username)
    WebBrowser1.Document.GetElementById("bgcdw_login_form_password").SetAttribute("Value", password)
    Dim Html AsHtmlElement
    ForEach Html In WebBrowser1.Document.GetElementsByTagName("input")
    If Html.GetAttribute("type") = "submit"Then
    Html.InvokeMember("Click")
    EndIf
    Next
    EndSub

    *****till here all work fine ******


    PrivateSub Button2_Click(sender AsObject, e AsEventArgs) Handles Button3.Click
    WebBrowser1.Document.GetElementById("header_start_btn").InvokeMember("click")

    EndSub
    ?*****the problem is here when i click button 2 it popup I.E page with error and i want to popup in the same web-browser1
    dunno how to make it i tried to find in google but nothing*******



    ?


    PrivateSub Button3_Click(sender AsObject, e AsEventArgs) Handles Button3.Click
    Me.Close()
    EndSub
    EndClass

    any idea ??!!!
    best regards

  2. #2
    .NET Framework
    .NET 4.5
    Join Date
    Aug 2018
    Posts
    2
    Reputation
    0
    even with
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    If WebBrowser1.Url.ToString = "https://fr1.darkorbit.com/indexInternal.es?action=internalStart&prc=100" Then
    WebBrowser1.Navigate("https://fr1.darkorbit.com/indexInternal.es?action=internalMapRevolution")
    End If
    and still not working

Similar Threads

  1. Question auto Login To Website Programmatically?
    By TagLife in forum VB.NET General Discussion
    Replies: 1
    Last Post: 08-07-2015, 10:36 PM
  2. login to a website with webbrowser?
    By willstaa in forum Windows Forms
    Replies: 0
    Last Post: 12-11-2013, 12:02 PM
  3. Question Problem with login to website
    By Bauhaus in forum Net / Sockets
    Replies: 1
    Last Post: 07-22-2009, 3:33 PM
  4. programmatically login to secure website
    By varvar in forum Net / Sockets
    Replies: 11
    Last Post: 02-28-2007, 6:31 AM
  5. Login to website programically
    By vinnie881 in forum Web Forms
    Replies: 1
    Last Post: 09-06-2006, 12:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •