Can someone please help me fix these codes?

Posts 1–13 of 13 · Page 1 of 1
Can someone please help me fix these codes?
I was trying to do a VB6 form function in a Modual, it is supposed to Declare Form2 to show if a textbox says "hi"

The code is

[php]
Module Module1
Dim PublicFirstform As Form1

Public Class firstform
Declare Function form1.textbox1.text = "hi"
End Class
End Module
[/php]

the error

Code:
"Lib" Expected
thanks for helping.
In what way isn't it working?

Post your full code?

Any errors?

Dude....should we have a guess?

Did you add a webbrowser?

Do you have the progress on the correct event?
[php] Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEven tArgs) Handles WebBrowser1.ProgressChanged
ProgressBar1.Maximum = Convert.ToInt32(e.MaximumProgress)
ProgressBar1.Value = Convert.ToInt32(e.CurrentProgress)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox3.Text <> Nothing Then
WebBrowser1.Navigate(TextBox3.Text)
End If
End Sub[/php]

/

We need more details...
Quote Originally Posted by master131backup View Post
[php] Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEven tArgs) Handles WebBrowser1.ProgressChanged
ProgressBar1.Maximum = Convert.ToInt32(e.MaximumProgress)
ProgressBar1.Value = Convert.ToInt32(e.CurrentProgress)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox3.Text <> Nothing Then
WebBrowser1.Navigate(TextBox3.Text)
End If
End Sub[/php]

/

We need more details...
i mean have it change to the webbrowser's url.
[php] Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEven tArgs) Handles WebBrowser1.ProgressChanged
ProgressBar1.Maximum = Convert.ToInt32(e.MaximumProgress)
ProgressBar1.Value = Convert.ToInt32(e.CurrentProgress)
End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs) Handles WebBrowser1.DocumentCompleted
TextBox3.Text = WebBrowser1.Url.AbsoluteUri
End Sub [/php]

It's not that hard is it?
[php]Dim test As String = WebBrowser1.Url.AbsoluteUri
Textbox1.Text = test[/php]

or else down ma source... got save history / not perfect but hey it works.
Quote Originally Posted by o0OpurezO0o View Post
thanks peopel.
Ya, but don't release that browser in the section. Add more features until you make something pretty cool !!
its to bad i cant port my code directly... hmm thinking about adding a C# to vb to the vb sources and release my projects so its actually in C# but still cant delete since its VB software >:3
Quote Originally Posted by Kuro Tenshi View Post
its to bad i cant port my code directly... hmm thinking about adding a C# to vb to the vb sources and release my projects so its actually in C# but still cant delete since its VB software >:3
Thanks for sharing this awesome tale with us. <3
[php]Module Module1
Dim PublicFirstform As Form1

Public Class firstform
Declare Function form1.textbox1.text = "hi"
End Class
End Module[/php]

What the fuck is this supposed 2 be?

That's absolute nonsense.

You declare a form in a module.
You declare a from1.textbox1.text = "hi" function.
You put a form in a module.

[php]Public Class firstform
private function settext
textbox1.text = "Hi"
end function
end class
[/php]

Start here:

**Correction

I added IF textbox1.text = "hi" then

not change the text.

ty for the code though. it will become usefull
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us