8/08/2014

ใน Visual Studio ตั้งแต่ 2010  เป็นต้นไป  จะไม่มี Crystal Report ให้   ถ้าใครเปิดโปรแกรมมาแล้วหาไม่เจอไม่ต้องตกใจค่ะ  จะต้องติดตั้งเพิ่มเข้าไปถึงจะงานได้ค่ะ สามารถ Download  Crystal Report ได้ที่นี่ค่ะ  http://scn.sap.com/docs/DOC-7824 โดย Download >> Support Pack 10 (v.13.0.10.1385) จะได้ตัว CRForVS_13_0_10.exe...

Posted on Friday, August 08, 2014 by nuyingnaja

Public Class ThaiBath     Private suffix() As String = {"", "", "สิบ", "ร้อย", "พัน", "หมื่น", "แสน", "ล้าน"}     Private numSpeak() As String = {"", "หนึ่ง", "สอง", "สาม", "สี่", "ห้า", "หก", "เจ็ด", "แปด", "เก้า"}     Public Function ThaiBahtText(ByVal m As Double) As String         Dim s1 As String = ""   ' ---- ส่วนที่เกินหลักล้านขึ้นไป  (ล้าน)         Dim s2 As String = ""   ' ---- ส่วนจำนวนเต็ม                 (บาท)  ...

Posted on Friday, August 08, 2014 by nuyingnaja

7/29/2014

SqlConnection connection = new SqlConnection(Program.C); connection.Open(); string cmdText = "Update table1 set rate=@rate,qty=@qty,total=@total where id=@id"; SqlCommand command = new SqlCommand(cmdText, connection); command.Parameters.AddWithValue("rate", rate); command.Parameters.AddWithValue("qty", qty); command.Parameters.AddWithValue("total", total); command.Parameters.AddWithValue("id", id); command.ExecuteNonQuery(); connection.Clos...

Posted on Tuesday, July 29, 2014 by nuyingnaja

7/07/2014

Imports MySql.Data.MySqlClient Public Class clsConnecetion     Public ConMy As MySqlConnection = New MySqlConnection     'Dim Hostname As String = "172.00.00.000"     'Dim DBName As String = "XXX"     'Dim SID As String = "admin"     'Dim Password As String = "1234567890"     Public Sub ConnectOpen()         ConMy.Close()         Try             With ConMy                 If...

Posted on Monday, July 07, 2014 by nuyingnaja

6/10/2014

จัด format ตัวเลข Dim num As Integer = 10 Dim id As String =  num.ToString.PadLeft(5, "0") '  id = 00010 Dim num As Integer = 10 Dim id As String =  Microsoft.VisualBasic.Right("00001", 5) '  id = 000...

Posted on Tuesday, June 10, 2014 by nuyingnaja

6/09/2014

สร้าง Text Editor เอง ด้วย VB.Net หน้าจอหลักๆ ของ Text Editor ค้นหาคำ แสดงโค้ด HTML Download Semple Coding in vb.net Project ภาษา C# http://www.mediafire.com/download/r6k66lg6zol3jx1/TextControlSource.zip Credit by : www.codeproject.com ภาษา VB converse จาก C# http://www.mediafire.com/download/6do555ybq43gt01/Editor.zip Credit...

Posted on Monday, June 09, 2014 by nuyingnaja

6/03/2014

ตัวอย่างคำสั่ง SQL ที่ใช้ง่ายบ่อยๆ ตัวอย่าง database ดังนี้ Book_id Book_name Book_price 1 Vb.net 2008 50 2 Vb.net 2010 100 3 Vb.net 2011 200 4 Vb.net 2012 500 5 Vb.net 2013 500 1. คำสั่ง SQL นี้  ค้นหาข้อมูลง่ายๆ ที่ book_id  = 1 " SELECT * FROM  tbl_book  WHERE  book_id  = 1 " Book_id Book_name Book_price 1 Vb.net 2008 50 2. คำสั่ง SQL นี้  ค้นหาข้อมูล เรียงลำดับข้อมูล น้อยไปมาก "...

Posted on Tuesday, June 03, 2014 by nuyingnaja

4/03/2014

กำหนดให้ TextBox รับค่าจาก Keyboard เป็นตัวเลขเท่านั้น   Private Sub txt_price_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_price.KeyPress        Select Case Asc(e.KeyChar)            Case 48 To 57                e.Handled = False            Case 8, 3, 22  ...

Posted on Thursday, April 03, 2014 by nuyingnaja

Dim FtpHostname As String = '192.XX.XX.XXX' Dim FtpHostname As String = "172.16.80.185" Dim FtpUserName As String = "username"    Dim FtpPassWord As String = "password"    Dim FtpPort As String = "21" Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click       Dim response As Boolean        Dim folderServer As String = '/Newfolder/'        Dim pathFullName As String = 'D:\1234.jpg'       ...

Posted on Thursday, April 03, 2014 by nuyingnaja

4/02/2014

Private Sub btnRead_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRead.Click            Dim sContents As String = GetFileContents("C:\note.txt")         If sContents = "" Then             Return         Else             Me.txtUserName.Text = Mid(sContents, 1, InStr(sContents, "|") - 1)            ...

Posted on Wednesday, April 02, 2014 by nuyingnaja