用C#WinForms如何检测整个局域网可用ip内的所有打印机是否可用

您现在的位置:&&>>&电脑频道&>>&&>>&winform窗体关闭的时候..线程跟db有没有自动关闭? - .NET技术 / C#
winform窗体关闭的时候..线程跟db有没有自动关闭? - .NET技术 / C#
作者:佚名&&&&来源:网友投稿&&&&点击数:&&&&更新时间:
winform窗体关闭的时候..线程跟db有没有自动关闭?我搞了50个线程..每个线程都有db执行我现在要弄个按钮.点下去所有线程跟db全部关闭但是我DB都是在方法里面声明的,,所以我在想..winform窗体关闭的时候..线程跟db有没有自动关闭?如果有我就点了按钮然后调用窗体关闭事件可以不?怎么搞?急!!答案1------其他回答(60分)---------如果你想比较灵活的控制建议不要在方法里面声明,而是要放在类的成员变量里面声明然后,专门开方法去init 或是 destroy查看和“c/c++”有关的所有文章
上一篇文章:
下一篇文章:Express.vshost.exe
Express.vshost.exe.config
Express.vshost.exe.manifest
CustomControl
CTextBox.resx
db_Express_Data.MDF
db_Express_Log.LDF
SQLHelper.dll
图标_修改密码.gif
图标_基础设置.gif
图标_操作员维护.gif
图标_操作员设置.gif
图标_模板设置.gif
图标_快递单.gif
图标_快递单1.gif
图标_打印.gif
图标_查询.gif
图标_快递单.gif
图标_快递单.ico
图标_快递单1.gif
图标_快递单1.ico
图标_退出人.gif
图标_退出门.gif
大图 带字副本.bmp
登录带按钮.bmp
登录改图片.bmp
btnfind.ico
cancel.ico
change.ico
delete.ico
Setting.ico
DesignTimeResolveAssemblyReferences.cache
DesignTimeResolveAssemblyReferencesInput.cache
追封快递单.jpg
Properties
Resources.resx
Settings.settings
FormAmendPassword.resx
FormBillType.resx
FormBillTypeInput.resx
FormOperator.resx
FormOperatorInput.resx
FormSetProperty.resx
FormSetTemplate.resx
FormBillPrint.resx
FormBrowseBill.resx
FormExpressBill.resx
App.config
AppForm.resx
Express.csproj
FormLogin.resx
Express.sln
Express.sln.DotSettings.user
Express.suo
namespace Express
partial class FormLogin
/// &summary&
/// Required designer variable.
/// &/summary&
ponentModel.IContainer components =
/// &summary&
/// Clean up any resources being used.
/// &/summary&
/// &param name=&disposing&&true if managed resource otherwise, false.&/param&
protected override void Dispose(bool disposing)
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
#region Windows Form Designer generated code
/// &summary&
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// &/summary&
private void InitializeComponent()
ponents = ponentModel.Container();
ponentResourceManager resources = ponentResourceManager(typeof(FormLogin));
this.errInfo = new System.Windows.Forms.ponents);
this.picQuit = new System.Windows.Forms.PictureBox();
this.picReset = new System.Windows.Forms.PictureBox();
this.picLogin = new System.Windows.Forms.PictureBox();
this.txtCode = new System.Windows.Forms.TextBox();
this.txtPwd = new System.Windows.Forms.TextBox();
((ponentModel.ISupportInitialize)(this.errInfo)).BeginInit();
((ponentModel.ISupportInitialize)(this.picQuit)).BeginInit();
((ponentModel.ISupportInitialize)(this.picReset)).BeginInit();
((ponentModel.ISupportInitialize)(this.picLogin)).BeginInit();
this.SuspendLayout();
// errInfo
this.errInfo.ContainerControl =
// picQuit
this.picQuit.BackColor = System.Drawing.Color.T
this.picQuit.Image = ((System.Drawing.Image)(resources.GetObject(&picQuit.Image&)));
this.picQuit.Location = new System.Drawing.Point(315, 211);
this.picQuit.Name = &picQuit&;
this.picQuit.Size = new System.Drawing.Size(54, 23);
this.picQuit.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoS
this.picQuit.TabIndex = 18;
this.picQuit.TabStop =
this.picQuit.Click += new System.EventHandler(this.picQuit_Click);
// picReset
this.picReset.BackColor = System.Drawing.Color.T
this.picReset.Image = ((System.Drawing.Image)(resources.GetObject(&picReset.Image&)));
this.picReset.Location = new System.Drawing.Point(250, 211);
this.picReset.Name = &picReset&;
this.picReset.Size = new System.Drawing.Size(54, 23);
this.picReset.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoS
this.picReset.TabIndex = 17;
this.picReset.TabStop =
this.picReset.Click += new System.EventHandler(this.picReset_Click);
// picLogin
this.picLogin.BackColor = System.Drawing.Color.T
this.picLogin.Image = ((System.Drawing.Image)(resources.GetObject(&picLogin.Image&)));
this.picLogin.Location = new System.Drawing.Point(185, 211);
this.picLogin.Name = &picLogin&;
this.picLogin.Size = new System.Drawing.Size(54, 23);
this.picLogin.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoS
this.picLogin.TabIndex = 16;
this.picLogin.TabStop =
this.picLogin.Click += new System.EventHandler(this.picLogin_Click);
// txtCode
this.txtCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedS
this.txtCode.Location = new System.Drawing.Point(254, 146);
this.txtCode.MaxLength = 10;
this.txtCode.Name = &txtCode&;
this.txtCode.Size = new System.Drawing.Size(116, 21);
this.txtCode.TabIndex = 14;
this.txtCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtCode_KeyDown);
this.txtPwd.BorderStyle = System.Windows.Forms.BorderStyle.FixedS
this.txtPwd.Location = new System.Drawing.Point(254, 173);
this.txtPwd.MaxLength = 20;
this.txtPwd.Name = &txtPwd&;
this.txtPwd.PasswordChar = '*';
this.txtPwd.Size = new System.Drawing.Size(116, 21);
this.txtPwd.TabIndex = 15;
this.txtPwd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPwd_KeyDown);
// FormLogin
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.F
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject(&$this.BackgroundImage&)));
this.ClientSize = new System.Drawing.Size(420, 258);
this.Controls.Add(this.picQuit);
this.Controls.Add(this.picReset);
this.Controls.Add(this.picLogin);
this.Controls.Add(this.txtCode);
this.Controls.Add(this.txtPwd);
this.Icon = ((System.Drawing.Icon)(resources.GetObject(&$this.Icon&)));
this.MaximizeBox =
this.MinimizeBox =
this.Name = &FormLogin&;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterS
this.Text = &系统登录&;
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtCode_KeyDown);
((ponentModel.ISupportInitialize)(this.errInfo)).EndInit();
((ponentModel.ISupportInitialize)(this.picQuit)).EndInit();
((ponentModel.ISupportInitialize)(this.picReset)).EndInit();
((ponentModel.ISupportInitialize)(this.picLogin)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
#endregion
private System.Windows.Forms.ErrorProvider errI
private System.Windows.Forms.PictureBox picQ
private System.Windows.Forms.PictureBox picR
private System.Windows.Forms.PictureBox picL
private System.Windows.Forms.TextBox txtC
private System.Windows.Forms.TextBox txtP
Copyright(C)
OKBASE.NET All Rights Reserved 好库网 版权所有The questions says it all. I have everything wired up and know how to send messages from the browser html to c#, but not the other way.
I should be able to do something like:
browserControl.JSCall("myFunction('Dave','Smith');");
...and in the web code:
function myFunction(firstName, lastName) {
$("#mydiv").text(firstName + ' ' + lastName);
Thanks - Dave
解决方案 You can do this using Navigate:
browserControl.Navigate("javascript:void(myFunction('Dave','Smith'))");
Note, I find that the code isn't actually run until the application event loop executes. If that's a problem for you, you might be able to follow the Navigate call with
Application.DoEvents();
Make sure you consider the .
本文地址: &
这些问题说明了一切。我把一切都连接起来,并知道如何从浏览器的HTML邮件发送到C#,而不是其他方式
我应该可以做一些事情,如:
browserControl.JSCall(“myFunction的('大卫','史密斯');”);
...并在网页代码:
函数myFunction的(名字,姓氏){ $(“#mydiv”)。文本(名字+''+的lastName); }
谢谢 - 戴夫
解决方案 您可以做到这一点使用导航:
browserControl.Navigate(“JavaScript的:无效(myFunction的('大卫','史密斯'))”);
请注意,我发现这个代码是不实际运行,直到应用程序事件循环执行。如果这是你一个问题,你也许可以跟随导航与电话
Application.DoEvents();
请确保你考虑的的危险。
本文地址: &
扫一扫关注官方微信}

我要回帖

更多关于 局域网共享打印机 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信