Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class frmMain
- Dim WithEvents WB As New WebBrowser With {.ScriptErrorsSuppressed = True}
- Dim WithEvents Timer1 As New Timer
- Dim TheText As New TextBox
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- ProgressBar1.Style = ProgressBarStyle.Blocks
- WB.Navigate("https://privnote.com/")
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- TheText.Text = TextBox1.Text
- WB.Document.GetElementById("note_raw").SetAttribute("value", TheText.Text)
- WB.Document.GetElementById("encrypt_note").InvokeMember("click")
- TextBox1.Enabled = False
- Button1.Enabled = False
- ProgressBar1.Style = ProgressBarStyle.Marquee
- Timer1.Start()
- End Sub
- Private Sub WB_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WB.DocumentCompleted
- End Sub
- Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
- TextBox2.Text = WB.Document.GetElementById("note_link_input").GetAttribute("value")
- If TextBox2.Text = Nothing Then
- WB.Document.GetElementById("note_raw").SetAttribute("value", TheText.Text)
- WB.Document.GetElementById("encrypt_note").InvokeMember("click")
- Else
- Button1.Enabled = True
- TextBox1.Enabled = True
- ProgressBar1.Hide()
- TextBox1.Clear()
- WB.Navigate("https://privnote.com/")
- Timer1.Stop()
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement