用VB实现班主任工作的电子化(1)(2)
2014-08-23 01:02
导读:Next SendToText = SendToText " 班主任: 刘友生 " Chr(13) Chr(10) SendToText = SendToText "湖南省衡阳经济贸易学校" Chr(13) Chr(10) SendToText = SendToText "发信日期:" Data$ " 发信
Next
SendToText = SendToText " 班主任: 刘友生 " Chr(13) Chr(10)
SendToText = SendToText "湖南省衡阳经济贸易学校" Chr(13) Chr(10)
SendToText = SendToText "发信日期:" Data$ " 发信时间:" Time$
GetTxtName ’调用函数
Call StarSend(txtobject(2).Text, M_Subject, SendToText)
Data1.Recordset.MoveNext
If Data1.Recordset.EOF = True Then
MsgBox Str(Sum) "个人员的成绩通知单已经发送完毕!", , " 发 送 邮 件"
End
End If
Loop
End Sub
Private Sub GetFieldNum()
Data1.Recordset.MoveFirst
'自动获得数据表中字段数并在窗体中自动生成相应文本框和标签
For i = 1 To Data1.Recordset.Fields.Count
b$ = "Text_" LTrim(Str(i))
b1$ = "Label_" Trim(Str(i)
Set txtobject(i) = Form1.Controls.Add("VB.TextBox", b$)
Set lblObject(i) = Form1.Controls.Add("VB.Label", b1$)
’下面是用来确定标签和文本框中窗体中的位置
txtobject(i).Visible = True
lblObject(i).Visible = True
txtobject(i).Width = 2000
lblObject(i).Width = 1200
txtobject(i).Height = 350
lblObject(i).Height = 350
If i Mod 2 = 0 Then
txtobject(i).Left = 4200
lblObject(i).Left = 3400
Else
txtobject(i).Left = 1200
lblObject(i).Left = 200
End If
If i