Add-In Express for IE forms

Add-in Express™ Support Service
That's what is more important than anything else

Add-In Express for IE forms
 
Carl Wuensche




Posts: 50
Joined: 2008-11-07
Hi,

I'm trying to make a login form for my toolbar to access a database. Whenever I use showdialog or show(), it always says it points to a null reference.

Try
LoginForm.ActiveForm.Show()
Catch ex As Exception
MsgBox(ex.Message)
End Try

Any ideas on how to add forms for IE Toolbars? This is VB .NET
Posted 07 Nov, 2008 01:31:46 Top
David Thompson


Guest


I usually use

[FONT=Courier]
Using dlg As New LoginForm
   If dlg.ShowDialog() = DialogResult.OK Then
      ' login succeeded
   Else
      ' login failed
   End If
End Using
[/FONT]
Posted 07 Nov, 2008 01:37:21 Top
Carl Wuensche




Posts: 50
Joined: 2008-11-07
Thank you for the quick response, I just figured out the problem.

I do have another question though,

how can I get cookie information? What I want to do, is send the username/password information to a website, and if those things are true... it will set a cookie (or there maybe be a cookie already set), and then fetch the information needed.

I might not need to do that though, I can probably just send the username/password combo to the database... and if that works display a logged in successful dialog?


Any better suggestions?
Posted 07 Nov, 2008 01:39:34 Top
Eugene Astafiev


Guest


Hello Carl,

You can use the cookie property of the mshtml.HTMLDocument class.
Posted 08 Nov, 2008 10:07:22 Top
Carl Wuensche




Posts: 50
Joined: 2008-11-07
Now I decided the quickest way to do it is to use a MySQL connector connection.

I'm having problems finding out how to check the database rows against the username/password though.

This is all the code I have so far, I'm playing around with the code to try and get it to work. Don't mention my if statement for Username because I already know that won't check the database.

I'm trying to figure out how to write code to check the username row in my database against the textbox.


    Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
        Try
            Dim check As New newhomes_coreDataSetTableAdapters.membersTableAdapter
            Dim conn As New MySqlConnection
            Dim md5 As New MD5CryptoServiceProvider
            Dim myQuery As New newhomes_coreDataSetTableAdapters.membersTableAdapter
            Dim query = New MySql.Data.MySqlClient.MySqlCommand

            Dim dr As Data.DataRow

            If UsernameTextBox.Text Then
                MsgBox("accepted")
            Else
                MsgBox("failed")

            End If


        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        

        '        Me.Close()

    End Sub
Posted 11 Nov, 2008 03:49:54 Top
Eugene Astafiev


Guest


Hello Carl,

You can use the following code:

If UsernameTextBox.Text = "name" Then
' accepted
Else
' failed
End If
Posted 11 Nov, 2008 09:27:55 Top
Carl Wuensche




Posts: 50
Joined: 2008-11-07
Thanks for the reply

That doesn't work because it pulls up information from the database for different users already in the database.

So that wouldn't really be a login solution, just something hard coded.
Posted 11 Nov, 2008 16:03:36 Top
Eugene Astafiev


Guest


Carl,

Sorry, it is beyond the scope of our support service. Please have a look at the following http://msdn.microsoft.com/en-us/library/h43ks021(VS.71).aspx.
Posted 11 Nov, 2008 16:30:51 Top