公告版位
沒有痛苦 就沒有收穫
若內容對你有幫助,可以留言讓我知道哦~
有問題想要諮詢可以請至這裡連絡我哦 =>不會就放這邊
目前分類:VB (120)
- Mar 13 Wed 2019 11:52
【VB】控制console的方法
- Mar 12 Tue 2019 11:42
【VB】一些不錯的VB資源站
- Feb 21 Thu 2019 09:19
【VB】HtmlAgilityPack XPath Find 教學系列1 - 下載dll檔
- Feb 21 Thu 2019 09:01
HtmlAgilityPack參考檔(抓網頁資訊用)相關功能
- Feb 01 Fri 2019 17:17
【VB】DataGridView1內加入checkbox
- Feb 01 Fri 2019 12:34
如何知道DataGridView1總共有幾筆資料
今天要介紹 如何知道DataGridView1有幾筆資料的語法, how many the datagirdview1 data?
GridView1.Rows.Count.ToString
- Feb 01 Fri 2019 11:54
【VB】亂數函式
How to do VB random function ,example is
如何產生VB無重複的亂數,程式碼如下
Dim MyValue As Integer MyValue = Int((6 * Rnd) + 1) ' Generate random value between 1 and 6.
- Jan 01 Tue 2019 08:00
【VB】ComboBox新增資料
- Aug 04 Fri 2017 17:16
VB - Listbox1 語法整理
Listbox function and property setting list
以下整理所有listbox會使用到的語法功能
1.listbox總共有幾筆值
LISTBOX.items.count
- Jan 07 Sat 2017 05:21
VB - DataGridView1移除左邊的空格
Remove the space to the left of DataGridView1
如何移除Datagirdview1 左邊的空格
如下圖,本來datagirdview1是這樣子
- Jan 07 Sat 2017 04:59
VB - Form1 固定
程式碼 再FORM1點兩下加入
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle
視窗就不會被隨便亂拉 放大或縮小,
- Feb 14 Sun 2016 02:25
VB - 資料庫語法 LIKE
- Jun 17 Wed 2015 20:40
【VB】寄送GMAIL郵件
C# code
private void button1_Click(object sender, EventArgs e) { MailMessage mail = new MailMessage(); NetworkCredential cred = new NetworkCredential("xxx@gmail.com", "password"); //收件者 mail.To.Add("ggyy@hotmail.com,ooxx@hotmail.com"); mail.Subject = "subject"; //寄件者 mail.From = new System.Net.Mail.MailAddress("xxx@gmail.com"); mail.IsBodyHtml = true; mail.Body = "message"; //設定SMTP SmtpClient smtp = new SmtpClient("smtp.gmail.com"); smtp.UseDefaultCredentials = false; smtp.EnableSsl = true; smtp.Credentials = cred; smtp.Port = 587; //送出Mail smtp.Send(mail); }
VB code
- Jun 04 Thu 2015 23:10
VB - ZedGraphControl 畫面重新整理
zedGraphControl 畫面重新整理
zedGraphControl1.RestoreScale(myPane); //畫面重整
- May 21 Thu 2015 02:27
VB - 資料庫語法 for Access - LIKE
一般而言like搭配萬用字元的使用方式 select * from DataTable where ColumnName like '%ConditionName'
不過access的用法則是..
select * from DataTable where ColumnName like '*ConditionName'
- May 12 Tue 2015 22:36
VB - ZedGraphControl X軸時間設定
VB外掛ZedGraphControl
Dim countchartx As Integer '定義在最前面 DataGridView1.DataSource = set1.Tables("1a") ' 要先把資料庫資料放入資料表!!! '在程式中 Dim month(DataGridView1.Rows.Count - 1) As String '定義一個資料表筆數的矩陣 For Me.countchartx = 1 To DataGridView1.Rows.Count - 1 month(Me.countchartx - 1) = Format(CDate(DataGridView1.Rows(Me.countchartx - 1).Cells(1).Value), "hh:mm:ss") '把所有資料表的時間存入矩陣中 Next ZedGraphControl1.GraphPane.XAxis.Type = AxisType.Text ZedGraphControl1.GraphPane.XAxis.Scale.TextLabels = month '然後就會放在X軸囉
- May 12 Tue 2015 22:35
VB - Format 函式
轉換時間格式或者想轉換成想要的格式可以使用format
Format(CDate(now), "hh:mm:ss")
- May 05 Tue 2015 23:59
VB - System.Reflection.Assembly.GetExecutingAssembly 取得當下執行程式路徑
語法 : 有三種形式的路徑顯示方法如下
Console.WriteLine(System.Reflection.Assembly.GetExecutingAssembly().Location) 'C:\My Application\ClassLibrary1.dll Console.WriteLine(System.Reflection.Assembly.GetExecutingAssembly().CodeBase) 'file:///C:/My Application/ClassLibrary1.DLL Console.WriteLine(System.Reflection.Assembly.GetExecutingAssembly().EscapedCodeBase) 'file:///C:/My%20Application/ClassLibrary1.DLL
寫法
- May 05 Tue 2015 23:42
VB - DataGridView 排序
資料庫讀進來後,在DataGridView1做完排序,之後畫出曲線的用法(抓某行某列值也有)
'資料庫讀進來後,在DataGridView1做排序 DataGridView1.Sort(DataGridView1.Columns(0),System.ComponentModel.ListSortDirection.Ascending) '之後for迴圈用這個修正 list1.Clear() '清掉上次資料 For Me.kgg = 0 To DataGridView1.Rows.Count - 1 list1.Add(Me.kgg, DataGridView1.Rows(Me.kgg).Cells(5).Value) Next
EX DataGridView1.Rows(0).Cells(5).Value 第5行 第1列的位置
- Apr 25 Sat 2015 18:41
VB&C# - ZedGraph相關語法
清除LIST1 Dim list1 = New PointPairList() '定義 list1.clear() Dim myCurve5 As LineItem = myPane5.AddCurve("GapPV1", list5, Color.Blue, SymbolType.None) '不要有點