For this we'll need The client from above (the simple Client).
Then, double click on the Form (not the Webbrowser) and then you should see the Code, wich looks like this at the moment:
Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Now add this line of code under the Private Sub:
Code:
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
If you Compile it now (F5), you should only see the Webbrowser without the Form.
Now add this under the "Public Class Form1":
Code:
#Region "Formmove"
Dim Point As New System.Drawing.Point()
Dim U, N As Integer
#End Region
Now go back to the Form and resize the Webbrowser:
[IMG]https://i1115.photobucke*****m/albums/k543/dragoon_wuut/webresize.png[/IMG]
After this, search in the Toolbox for "Panel" and add it like this, you can also give it a custom background:
[IMG]https://i1115.photobucke*****m/albums/k543/dragoon_wuut/panel.png[/IMG]
Now search in the Toolbox for "Label" and it it on the Panel (this is going to be the name):
[IMG]https://i1115.photobucke*****m/albums/k543/dragoon_wuut/label.png[/IMG]
Then go back to the Code and add this under the "End Sub":
Code:
Private Sub Panel1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If e.Button = MouseButtons.Left Then
Point = Control.MousePosition
Point.X = Point.X - (U)
Point.Y = Point.Y - (N)
Me.Location = Point
End If
End Sub
Private Sub Panel1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
U = Control.MousePosition.X - Me.Location.X
N = Control.MousePosition.Y - Me.Location.Y
End Sub
Private Sub Label1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseMove
If e.Button = MouseButtons.Left Then
Point = Control.MousePosition
Point.X = Point.X - (U)
Point.Y = Point.Y - (N)
Me.Location = Point
End If
End Sub
Private Sub Label1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown
U = Control.MousePosition.X - Me.Location.X
N = Control.MousePosition.Y - Me.Location.Y
End Sub
Now add 2 Buttons from the Toolbox to the Label and name them "X" and "_" (Close and minimize) and change the Flatstyle to "Flat".
[IMG]https://i1115.photobucke*****m/albums/k543/dragoon_wuut/buttonz.png[/IMG]
Doubleclick at the "X"-Button and add this:
Now doubleclick on the "_"-Button and add this:
Code:
Me.WindowState = FormWindowState.Minimized
Then Compile it again and you should have a full working Ruenscape Client with your own Form!
Here's The Full Code if you are having problems:
Code:
Public Class Form1
#Region "Formmove"
Dim Point As New System.Drawing.Point()
Dim U, N As Integer
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
End Sub
Private Sub Panel1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If e.Button = MouseButtons.Left Then
Point = Control.MousePosition
Point.X = Point.X - (U)
Point.Y = Point.Y - (N)
Me.Location = Point
End If
End Sub
Private Sub Panel1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
U = Control.MousePosition.X - Me.Location.X
N = Control.MousePosition.Y - Me.Location.Y
End Sub
Private Sub Label1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseMove
If e.Button = MouseButtons.Left Then
Point = Control.MousePosition
Point.X = Point.X - (U)
Point.Y = Point.Y - (N)
Me.Location = Point
End If
End Sub
Private Sub Label1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown
U = Control.MousePosition.X - Me.Location.X
N = Control.MousePosition.Y - Me.Location.Y
End Sub
'The Close Button:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End
End Sub
'The Minimize Button:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.WindowState = FormWindowState.Minimized
End Sub
End Class