社区
C#
帖子详情
textbox无法保存时间信息
nidanfeng
2004-10-18 10:02:44
在这里能否再问一下textbox在绑定DataTime字段时一保存就丢失时间信息,如我在文本框中输入"2004-08-09 07:01:01",保存后文本框你变成"2004-08-09 00:00:00".保存后的数据库中也没有时间信息只有日期.
不知何缘故,请赐教,谢谢.yeke818@hotmail.com
...全文
87
4
打赏
收藏
textbox无法保存时间信息
在这里能否再问一下textbox在绑定DataTime字段时一保存就丢失时间信息,如我在文本框中输入"2004-08-09 07:01:01",保存后文本框你变成"2004-08-09 00:00:00".保存后的数据库中也没有时间信息只有日期. 不知何缘故,请赐教,谢谢.yeke818@hotmail.com
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
nidanfeng
2004-10-18
打赏
举报
回复
数据库字段肯定是日期时间格式的,access,sql多试过,代码也就这样:
BindingContext[objts,"表1"].EndCurrentEdit();
oleDbDataAdapter1.Update(objts);
gesnpt
2004-10-18
打赏
举报
回复
代码问题,把代码贴出来
precipitant
2004-10-18
打赏
举报
回复
应该与文本框没有关系,如果你数据库中的字段是日期时间格式的,肯定是你的保存代码有问题。有的时候用存储过程会出现一些问题
minrange
2004-10-18
打赏
举报
回复
数据库中都没有拿说明是保存的问题。
把你保存的代码贴出来
C#串口通讯小程序2(在1的基础上添加ini配置)
新增加打开软件时从INI文件中读取端口号、波特率等
信息
并显示在控件中,关闭时将关闭前的端口状态
保存
在ini文件中,下次打开时显示上次关闭前显示的
信息
。用C#写的串口通讯程序,combobox选择端口号(获得系统存在的端口),波特率等,显示发送接收的字节数,可以清空显示,可以选择是否是16进制显示,可以选择显示发送,有两种显示框一个是
textbox
,简单显示发送接收的
时间
内容,一个是rich
textbox
,将发送接收分别显示为蓝色和红色,状态栏显示端口状态,自己仿照大傻串口调试软件写的,有不足的地方希望提出,继续改进,谢谢
jQuery EasyUI 1.4 离线简体中文API文档 含完整开发工具包+皮肤+扩展+演示
(题外话:从本次开始 我新增了jQuery EasyUI的专题页面 大家可以关注我的专题页来及时获取最新的EasyUI资源 专题页地址如下http:http://download.csdn.net/album/detail/343 同时也希望转载的那些朋友能保留我资源的说明及出处地址 我花那么多精力制作出来的 你们鼠标点两下就给我转走了还不注明出处 实在是不厚道 本来就是本着分享精神的 为的就是聚集一点人气和提供一个优良的环境来一起学习进步的 请不要抹杀掉我的热情 谢谢 ) 时隔4个月之久 EasyUI终于迎来大版本更新了 本次更新内容诸多 除了常规维护外 还新增了3个新组件 都很实用 详细的可以阅读更新说明 里面给了详细的解读 另外 从该版本开始我将会逐步的将EasyUI官方以及第三方较好的插件API整合到API文档当中 并且会对这些插件做一些简单的Demo实现 存放到配套提供的程序包demo文件夹下 以便大家学习和使用 本期文档中将官方提供的所有附加插件的API都整理并存放到Extension节点下了 这些扩展的demo在附带的程序包中已经提供 可以用于参考使用 jQuery EasyUI 1 4版本更新内容: Bug(修复) menu:修复在删除一个菜单项的时候该菜单
无法
正确自适应高度的问题; datagrid:修复在datagrid宽度太小的时候“fitColumns”方法
无法
正常工作的问题 Improvement(改进) EasyUI的所有组件已经支持非固定 百分比大小的尺寸设置; menu:添加“showItem” “hideItem”和“resize”方法; menu:基于窗体大小自动调整高度; menu:添加“duration”属性 该属性允许用户自定义隐藏菜单动画的持续
时间
以毫秒为单位; validatebox:添加“onBeforeValidate”和“onValidate”事件; combo:从该版本开始combo组件扩展自
textbox
组件(
textbox
是1 4中新增的组件); combo:添加“panelMinWidth” “panelMaxWidth” “panelMinHeight”和“panelMaxHeight”属性; searchbox:从该版本开始searchbox组件扩展自
textbox
组件(
textbox
是1 4中新增的组件); tree:添加“getRoot”方法 用于返回通过“nodeEl”参数指定的节点的顶部父节点元素 注意:官网的英文API中该函数的说明有误 其说明是none 无参数 实际这里是需要参数的 ; tree:添加“queryParams”属性; datetimebox:添加“spinnerWidth”属性; panel:添加“doLayout”方法 用于控制面板内组件的大小; panel:添加“clear”方法 用于清除面板内的内容; datagrid:允许用户设置百分比宽度的列(该功能真是千呼万唤始出来啊 ); form:添加“ajax” “novalidate”和“queryParams”属性; linkbutton:添加“resize”方法 New Plugin(新组件)
textbox
:该组件是一个增强的输入字段 它可以让用户非常简单的构建一个表单; datetimespinner:该组件是一个日期和
时间
的微调组件 它允许我们选择一个特定的日期或
时间
; filebox:filebox 该组件表单元素中用于上传文件的文件框工具组件 ">(题外话:从本次开始 我新增了jQuery EasyUI的专题页面 大家可以关注我的专题页来及时获取
VB自动关机源码.rar
设置窗体的代码解释 Imports System.Diagnostics Public Class 设置窗体 Private shutTime As String '关机
时间
的字符串 Private IsToday As Boolean = True '判断是否是今天的变量 Private delay As Integer '延时多少秒放关机 Private lastTime As Integer '关机的倒计时 Private action As String '关机或重启或注销 Private shellText As String '执行的命令字符串 Private firstShow As Boolean = True Private SysTime As Boolean = False Private autoHide As Boolean = True '启动自动隐藏 Private TotalData As New System.Diagnostics.PerformanceCounter("Network Interface", "Bytes Total/sec", "MS TCP Loopback interface") Private proTime As New System.Diagnostics.PerformanceCounter("Processor", "% Processor Time", "_Total") '双击右下角的图标的响应事件 Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick If (Me.Visible = False) Then Me.Show() End If End Sub '重载窗体的关闭事件,使窗体隐藏 Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing e.Cancel = True '取消窗体的关闭动作 delayTime.Value = delay '还原delayTime控件的值 StrToItems() '还原ListBox的值 Me.Hide() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ComboBox1.SelectedIndex = 2 '设置默认选项 "每天" ComboBox2.SelectedIndex = 4 '设置默认选项 "关机" Timer1.Start() readReg() '读取存放在注册表的
信息
StrToItems() '把字符串的
信息
读取到ListBox delayTime.Value = delay '把延时
时间
读取到delayTime控件 DateTimePicker1.Value = Today End Sub Private Sub 退出程序ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 退出程序ToolStripMenuItem.Click Me.Dispose() End Sub Private Sub 立即取消关机ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 立即取消关机ToolStripMenuItem1.Click Timer2.Stop() 取消窗体.Close() Shell("shutdown -a") Timer1.Start() End Sub Private Sub 设置关机计划ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 设置关机计划ToolStripMenuItem.Click If Me.Visible = False Then Me.Show() End If End Sub '点击确定按钮的事件处理 Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click '判断是否要开机自动运行 If autoCheck.Checked Then 创建开机自动运行() Else 删除开机自动运行() End If If Me.HideCheck.Checked Then autoHide = True Else autoHide = False End If If Me.regCheck.Checked Then 禁止修改注册表() Else 取消禁止修改注册表() End If If Me.ManCheck.Checked Then 禁止使用任务管理器() Else 取消禁止使用任务管理器() End If If Me.SysTimeCheck.Checked Then SysTime = True Else SysTime = False End If '四舍五入delayTime控件的值 delay = Math.Round(delayTime.Value, MidpointRounding.AwayFromZero) Me.Hide() ItemsToStr() '把listBox的
信息
保存
到字符串中 writeReg() '把字符串
保存
把注册表中 End Sub '取消按钮事件 Private Sub canelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles canelButton.Click StrToItems() '还原ListBox的值 delayTime.Value = delay '还原delayTime控件的值 Me.Hide() End Sub '点击添加按钮 Private Sub addButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addButton.Click Dim tempStr As String = "" If ComboBox1.Items.Item(ComboBox1.SelectedIndex) = "指定日期" Then tempStr = DateTimePicker1.Value.ToShortDateString Else tempStr = ComboBox1.SelectedItem End If tempStr &= "," & CStr(Math.Round(hourNum.Value, MidpointRounding.AwayFromZero)) & ":" & CStr(Math.Round(minNum.Value, MidpointRounding.AwayFromZero)) & ":" & CStr(Math.Round(secNum.Value, MidpointRounding.AwayFromZero)) & "," Select Case ComboBox2.SelectedItem Case "打开网址" tempStr &= "打开网址" & "[" &
TextBox
1.Text.Replace(";", ";").Replace(":", ":") & "]" Case "提醒
信息
" tempStr &= "提醒
信息
" & "[" &
TextBox
1.Text.Replace(";", ";").Replace(":", ":") & "]" Case "打开文件" tempStr &= "打开文件" & "[" &
TextBox
1.Text.Replace(";", ";").Replace(":", ":") & "]" Case Else tempStr &= ComboBox2.SelectedItem End Select ListBox1.Items.Add(tempStr) End Sub '点击清除按钮 Private Sub clearButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles clearButton.Click ListBox1.Items.Clear() End Sub '把ListBox的值
保存
到字符串ShutTime Private Sub ItemsToStr() Dim i As Integer shutTime = "" For i = 0 To ListBox1.Items.Count - 1 '把ListBox中的各项连接到shutTime shutTime &= ListBox1.Items.Item(i) & ";" Next If shutTime "" Then '去除最后一个 ";" shutTime = Mid(shutTime, 1, shutTime.Length - 1) End If End Sub '把字符串ShutTime的值还原到ListBox Private Sub StrToItems() If shutTime "" Then '如果shutTime有
保存
信息
Dim temp() As String = shutTime.Split(";") 'temp字符串数组存放shutTime以";"分隔的各个字符子串 Dim t As String 't存放temp字符串数组的一项 ListBox1.Items.Clear() For Each t In temp If Not (Mid(t, 1, 2) = "今天" And Not IsToday) Then '如果今天还没过了 ListBox1.Items.Add(t) End If Next End If End Sub '读取注册表
保存
的
信息
Private Sub readReg() Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey Try key = Microsoft.Win32.Registry.LocalMachine subkey = key.OpenSubKey("SOFTWARE\AutoShutdown") shutTime = subkey.GetValue("time") delay = CInt(subkey.GetValue("delayTime")) autoHide = subkey.GetValue("autoHide") If (CStr(Today()) subkey.GetValue("day")) Then IsToday = False End If Catch ex As Exception shutTime = "" IsToday = True End Try End Sub Private Sub 禁止修改注册表() Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser subkey = key.CreateSubKey("software\microsoft\windows\currentversion\policies\system") subkey.SetValue("disableregistrytools", 1) End Sub Private Sub 取消禁止修改注册表() Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser subkey = key.CreateSubKey("software\microsoft\windows\currentversion\policies\system") subkey.SetValue("disableregistrytools", 0) End Sub Private Sub 禁止使用任务管理器() Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser subkey = key.CreateSubKey("software\microsoft\windows\currentversion\policies\system") subkey.SetValue("DisableTaskMgr", 1) End Sub Private Sub 取消禁止使用任务管理器() Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser subkey = key.CreateSubKey("software\microsoft\windows\currentversion\policies\system") subkey.SetValue("DisableTaskMgr", 0) End Sub '将需要
保存
的
信息
写入注册表 Private Sub writeReg() Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine subkey = key.CreateSubKey("SOFTWARE\AutoShutdown") subkey.SetValue("time", shutTime) subkey.SetValue("day", CStr(Today())) subkey.SetValue("delayTime", CStr(delay)) subkey.SetValue("autoHide", autoHide) End Sub '点击删除按钮 Private Sub delButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles delButton.Click Dim delIndex As Integer = ListBox1.SelectedIndex If delIndex -1 Then ListBox1.Items.RemoveAt(delIndex) End If End Sub '最小化窗体,这里指隐藏窗体 Private Sub 最小化ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 最小化ToolStripMenuItem.Click If Me.Visible = True Then StrToItems() delayTime.Value = delay Me.Hide() End If End Sub Private Sub 创建开机自动运行() Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine subkey = key.CreateSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run") subkey.SetValue("定时自动关机", Application.ExecutablePath) End Sub Private Sub 删除开机自动运行() Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine subkey = key.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True) subkey.DeleteValue("定时自动关机") End Sub '关闭显示器 Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer Public Const WM_SYSCOMMAND = &H112 Public Const SC_MONITORPOWER = &HF170 '关闭显示器 Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long 'Timer1的Tick事件,来监视现在的
时间
是否应该关机或别的了 Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick Static nowTime As Date = Now updataMsg() If SysTime Then If (Now nowTime) Then Today = nowTime TimeOfDay = nowTime End If End If nowTime = nowTime.AddSeconds(1) If (shutTime "") Then Dim temp1() As String = shutTime.Split(";") 'temp1字符串数组存放shutTime以";"分隔的各个字符子串 Dim temp2() As String, i As Integer 'temp2字符串数组存放temp1某项的字符串以","或":"分隔的字符子串 Dim TimeOut As Boolean = False 'TimeOut存放是否
时间
到了 For i = 0 To temp1.Length - 1 temp2 = temp1(i).Split(New Char() {",", ":"}) If IsTimeOut(temp2) Then '判断
时间
是否到了 TimeOut = True action = temp2(4) '是"关机","注销","重启" End If Next If TimeOut Then '如果
时间
到 Select Case Mid(action, 1, 4) '根据action肯定命令字符串 Case "关闭计算" shellText = "shutdown -s -f -t 0" Case "重启计算" shellText = "shutdown -r -f -t 0" Case "注销用户" shellText = "shutdown -l -f -t 0" Case "关闭显示" SendMessage(Me.Handle.ToInt32(), WM_SYSCOMMAND, SC_MONITORPOWER, 1) Exit Sub Case "锁定计算" shellText = "rundll32.exe user32.dll, LockWorkStation" Case "打开文件" System.Diagnostics.Process.Start(Mid(action, 6, action.Length - 6).Replace(":", ":")) Exit Sub Case "提醒
信息
" MsgBox(Mid(action, 6, action.Length - 6), , "提醒
信息
") Exit Sub Case "打开网址" System.Diagnostics.Process.Start(Mid(action, 6, action.Length - 6).Replace(":", ":")) Exit Sub End Select lastTime = delay '倒计时等于延时 Timer2.Start() '倒计时开始 取消窗体.Show() '倒计时窗口打开 Timer1.Stop() End If End If End Sub '判断
时间
是否到了 Private Function IsTimeOut(ByRef t() As String) As Boolean '如果时分秒都相等 If t(1) = CStr(Hour(Now())) And t(2) = CStr(Minute(Now()) And t(3) = Second(Now)) Then Select Case t(0) Case "每天" Return True Case "今天" Return True Case "每周二" If Weekday(Now) = FirstDayOfWeek.Tuesday Then Return True End If Case "每周六" If Weekday(Now) = FirstDayOfWeek.Saturday Then Return True End If Case "每周日" If Weekday(Now) = FirstDayOfWeek.Sunday Then Return True End If Case "每周三" If Weekday(Now) = FirstDayOfWeek.Wednesday Then Return True End If Case "每周四" If Weekday(Now) = FirstDayOfWeek.Thursday Then Return True End If Case "每周五" If Weekday(Now) = FirstDayOfWeek.Friday Then Return True End If Case "每周一" If Weekday(Now) = FirstDayOfWeek.Monday Then Return True End If Case "每周一至周五" If Weekday(Now) > FirstDayOfWeek.Sunday And Weekday(Now) < FirstDayOfWeek.Saturday Then Return True End If Case Else If (t(0) = Today.ToShortDateString) Then Return True End If End Select End If Return False End Function '刷新Msg控件 Private Sub updataMsg() Dim xingqi As String = "" Select Case Weekday(Now) Case 1 xingqi = "星期天" Case 2 xingqi = "星期一" Case 3 xingqi = "星期二" Case 4 xingqi = "星期三" Case 5 xingqi = "星期四" Case 6 xingqi = "星期五" Case 7 xingqi = "星期六" End Select msg.Text = "当前
时间
" & Now().ToLongDateString & " " & Now().ToLongTimeString & " " & xingqi & " CPU使用" & Format(proTime.NextValue, "#0") & "% 网速" & Format(TotalData.NextValue / 1024, "########0.00") & "KB/S" Me.NotifyIcon1.Text = msg.Text End Sub '倒计时处理事件 Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick If lastTime = 0 Then '如果
时间
到 Shell(shellText, AppWinStyle.Hide) 取消窗体.Label1.Text = "正在" & action Else 取消窗体.Label1.Text = "离" & action & "还有" & lastTime & "秒" '显示倒计时 lastTime -= 1 End If End Sub Private Sub 设置窗体_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown If autoHide Then Me.Hide() End If End Sub Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged Select Case ComboBox2.SelectedItem Case "打开网址" Button1.Visible = False
TextBox
1.Width = 299
TextBox
1.Visible = True Case "提醒
信息
" Button1.Visible = False
TextBox
1.Width = 299
TextBox
1.Visible = True Case "打开文件" Button1.Visible = True
TextBox
1.Width = 209
TextBox
1.Visible = True Case Else Button1.Visible = False
TextBox
1.Visible = False End Select End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged If ComboBox1.SelectedItem = "指定日期" Then DateTimePicker1.Visible = True Else DateTimePicker1.Visible = False End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
TextBox
1.Text = OpenFileDialog1.FileName End If End Sub Private Sub 立即关机ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 立即关机ToolStripMenuItem.Click Shell("shutdown -s -f -t 0") End Sub Private Sub 立即重启ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 立即重启ToolStripMenuItem.Click Shell("shutdown -r -f -t 0") End Sub Private Sub 立即注销ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 立即注销ToolStripMenuItem.Click Shell("shutdown -l -f -t 0") End Sub Private Sub 立即锁定计算机ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 立即锁定计算机ToolStripMenuItem.Click Shell("rundll32.exe user32.dll, LockWorkStation") End Sub Private Sub 立即关闭显示器ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 立即关闭显示器ToolStripMenuItem.Click SendMessage(Me.Handle.ToInt32(), WM_SYSCOMMAND, SC_MONITORPOWER, 1) End Sub Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked System.Diagnostics.Process.Start("http://lywang.5d6d.com/space-uid-1.html") End Sub End Class
用C#自制的简易英语单词记忆助手(含源代码)
或许不是做很好,请不要见怪 基本用法: 按自己的意愿布置明天所要背下来的单词,然后到了明天后当自己觉得已经背下来了,则可以使用本程序选择当天的任务(前天布置的)去测试一下背的效果。 本程序的主要特点: 1, 开机自动启动 通过修改系统注册表实现的开机自动运行 2, 会提示昨天是否有布置任务 通过一个标志变量(储存于数据库)来判断当天是否有任务,确切的说应该是当作业布置完以后标志变量就被激活(为“1”的状态是激活的状态,为“0”时则未被激活)则在主人登入界面上会提示是否有任务。 3, 定时自动关闭程序 当程序启动后,会有20秒的
时间
让主人登入,否则超过了20秒后,程序自动关闭 4, 自动统计答对的题数和正确率 通过一些变量控制来实现对其自动统计 5, 能将正确的和错误的单词明确的指出存放于
TextBox
用两个变量分别实现,一个变量储存对字符串,另一个则储存错的字符串,最后根据触发事件分别显示到
TextBox
中 6, 按钮同时具备显示和隐藏控件的效果 两个按钮“答对的单词”和“答错的单词”分别用于显示对的和错的单词,按一下显示
TextBox
,按第二下则会隐藏
TextBox
7, 使用Engter键代替鼠标点击(确定按钮)或锁定控件焦点 做这个功能主要用于方便文字的输入,每个窗体都具备此功能。尤其是在布置任务的窗体内更需要此功能 附:本程序的初始密码为“123”
Winform 界面设计 视频教程
常用控件的使用(期间参杂着VS快捷键/常用设置) 公共控件: WinForm窗体 Button 按钮
Textbox
文本框 ComboBox 下拉列表框 Checkbox 复选框 RadioButton 单选框 GroupBox 分组控件 Label 标签 ListBox 列表框 PictureBox 图片框 DateTimePicker 日期
时间
控件 ProgressBar 进度条 NumericUpDown 数字输入框 ToolTip 气泡提示 NotifyIcon 托盘控件 TreeView 树控件 ListView 列表控件 容器: Panel 面板 SplitContainer 分隔容器 TabControl 选项卡控件 菜单和工具栏: ContextMenuStrip 右键菜单 MenuStrip 菜单控件 StatusStrip 状态栏控件 ToolStrip 工具栏控件 ImageList 图片集合 Timer
时间
控件 对话框: FolderBrowserDialog 文件夹选择 OpenFileDialog 打开文件 SaveFileDialog
保存
文件 一些小技巧: 部分异常 全局异常 日志的重要性 门: 合理的使用控件 面向对象的方式使用控件 控件多的时候如何操作. 动态加载和组合控件 自定义控件(用户控件) 遁: 窗体美化 如何使用皮肤来美化控件(SkinH) 制作我们自己的窗体 甲: 案例大集合 读取文件到列表框显示/
保存
数据为csv/txt等格式. 一个简单的登录案列. 闯关游戏.
C#
110,561
社区成员
642,566
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章