Msgbox function :D (not finished)
Posted: Sun Aug 29, 2010 10:34 pm
Here you can finish my little project i dont wanna finish it :P
its a little messy
please donate ! << contains just the debug folder , no useful information ( if you want useful information , go to agust1337
)
its a little messy

Code: Select all
you can extend whatever you want this is the basic thing written by me Public Enum StyleCol
RightToLeft
Normal
YesNo
YesNoCancel
End Enum
Public Function Msg(ByVal text As String, Optional ByVal Title As String = "", Optional ByVal icon As Boolean = True, Optional ByVal style As StyleCol = StyleCol.Normal) As Form
Dim formx As New Form
Dim lbl As New Label
Dim buttonyes As New Button
Dim buttonno As New Button
Dim buttoncancel As New Button
Dim buttonok As New Button
buttonok.Text = "&Ok"
buttonno.Text = "&No"
buttoncancel.Text = "&Cancel"
buttonyes.Text = "&Yes"
formx.Text = Title
lbl.Text = text
formx.Controls.Add(lbl)
formx.Size = New Size(240, 110)
If icon Then
formx.ShowIcon = True
Else
formx.ShowIcon = False
End If
formx.ShowInTaskbar = False
formx.TopMost = True
formx.MinimizeBox = False
formx.MaximizeBox = False
lbl.Location = New Point(10, 20)
formx.Icon = Me.Icon
Select Case style
Case StyleCol.Normal
formx.Controls.Add(buttonok)
buttonok.Location = New Point(73, 35)
Case StyleCol.RightToLeft
formx.RightToLeftLayout = True
formx.Controls.Add(buttonok)
buttonok.Location = New Point(73, 35)
Case StyleCol.YesNo
Case StyleCol.YesNoCancel
End Select
formx.Show()
End Function

please donate ! << contains just the debug folder , no useful information ( if you want useful information , go to agust1337
