- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 2
- Posts with Downvotes
- 1
- Downvoting Members
- 2
8 Posted Topics
Re: [CODE]Private Sub autonum() Call main() Con.Open() Dim UserSelect As SqlCommand Dim myreader As SqlDataReader Dim sql As String Dim sum As Integer Dim no As Integer sql = "select max(work_order) from DOpwo" UserSelect = New SqlCommand(sql, Con) myreader = UserSelect.ExecuteReader If (myreader.Read = True) Then If txt1.Text = "" Then … | |
Re: try this code from sql server - vb.net [CODE] Private Sub loddatagrid() Call main() Con.Open() DataAdapter1 = New SqlDataAdapter("SELECT [ID],[type],[lot],[loc],[meas],[units],[pounds] FROM [dbo].[Inventory] where [rcvandwork]='" & txt1.Text & "'", Con) DataSet1.Clear() DataAdapter1.Fill(DataSet1, "Table1") grid1.DataSource = DataSet1 grid1.DataMember = "Table1" grid1.Refresh() Con.Close() End Sub private sub form.... loddatagrid() txtno.DataBindings.Add("Text", DataSet1, "Table1.ID") xt1.DataBindings.Add("Text", … | |
Re: [CODE]Private Sub datagridview1_RowPostPaint(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowPostPaintEventArgs) Handles grid1.RowPostPaint Dim strRowNumber As String = (e.RowIndex + 1).ToString Dim size As SizeF = e.Graphics.MeasureString(strRowNumber, Me.Font) If grid1.RowHeadersWidth < CInt((size.Width + 20)) Then grid1.RowHeadersWidth = CInt((size.Width + 20)) End If Dim b As Brush = SystemBrushes.ControlText e.Graphics.DrawString(strRowNumber, Me.Font, b, … | |
Private Sub autocus() Call main() Con.Open() Dim cmd As New SqlCommand("SELECT cust_order FROM Inventory", Con) Dim ds As New DataSet Dim da As New SqlDataAdapter(cmd) da.Fill(ds, "My List") 'list can be any name u want Dim col As New AutoCompleteStringCollection Dim i As Integer For i = 0 To ds.Tables(0).Rows.Count … | |
Re: [CODE]Imports System.Net.Mail Public Class FrmMailSystem Dim SmtpServer As New SmtpClient() Dim mail As New MailMessage() Sub sendEmail() Try SmtpServer.Credentials = New Net.NetworkCredential(Trim(txtID.Text), Trim(txtPassword.Text)) SmtpServer.Port = txtport.Text SmtpServer.Host = txthost.Text mail.From = New MailAddress(Trim(txtID.Text)) mail.To.Add(Trim(txtTo.Text)) mail.Subject = Trim(txtSubject.Text) mail.Body = Trim(txtBody.Text) SmtpServer.Send(mail) MsgBox("Mail Sent", MsgBoxStyle.Information, "Mail Sent") Catch ex As Exception … | |
Re: [CODE]If Textbox1.Text = "" Then GoTo ex Else If IsNumeric(Textbox1.Text) Then GoTo ex Else MsgBox("You cannot add alpha characters, please input the Integer or numbers !", vbCritical) Textbox1.Text = "" searchback() End If End If ex: Exit Sub[/CODE] | |
Re: [CODE]Imports System.Data.SqlClient Module ConnectionUsingIP Public Con As SqlConnection Public cons As String Public usertype As String Public Sub main() cons = "Data Source=127.0.0.1,49166;Network Library=DBMSSOCN;Initial Catalog=packwelldata;User ID=sa;Password=bedarsi;Trusted_Connection=False;" Con = New SqlConnection(cons) Try Con.Open() 'MsgBox("Server Connection is Open ! ") Con.Close() Catch ex As Exception MsgBox("Sorry Can not open connection ! ") … | |
Re: [COde]Option Explicit On Option Strict On Imports System.Runtime.InteropServices Imports System.Windows.Forms Imports System.Runtime.InteropServices.ComTypes Module Module2 Public Class iCam #Region "Api/constants" Private Const WS_CHILD As Integer = &H40000000 Private Const WS_VISIBLE As Integer = &H10000000 Private Const SWP_NOMOVE As Short = &H2S Private Const SWP_NOZORDER As Short = &H4S Private Const WM_USER … |
The End.