halcon vs 2015 hwindowcontrol 失败 0x80004005

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/hvac_011/article/details/88020804

错误症状:

 

使用halcon hwindowcontrol 控件时出错  0x80004005

1、引用->添加引用->浏览->"D:\Program Files\MVTec\HALCON-17.12-Progress\bin\dotnet35"目录下的halcondotnet.dll

总结:当安装halcon 和vs 后创建新工程时需要向工程中添加halcon的dll。

展开阅读全文

IErrorInfo.GetDescription 因 E_FAIL(0x80004005) 而失败

12-24

rn出现上面错误什么意思啊rnrn这网页是为了实现 分页浏览图书信息rnrnrn该代码是将数据库中的数据表绑定到Gridview上rnpublic partial class _Default : System.Web.UI.Page rnrn private string StrSql = ConfigurationManager.ConnectionStrings["libraryConn"].ConnectionString.ToString();rnrn protected void Page_Load(object sender, EventArgs e)rn rn if (!IsPostBack) rn Label1.Visible = false;rn Label2.Visible = false;rn string SqlStr = "select book.bookname,book.write,book.bookprice,booktype.typename from book,booktype where book.typeid=booktype.typeid";rnrn BindGV(SqlStr);rn BindDL();rn BindDep_id();rn rn rn private void BindGV(string SqlStr)rn OleDbConnection con = new OleDbConnection(StrSql);rn con.Open();rn OleDbCommand cmd = new OleDbCommand(SqlStr, con);rn OleDbDataAdapter sda=new OleDbDataAdapter();rn sda.SelectCommand=cmd;rn DataSet ds=new DataSet();rn sda.Fill(ds);rn if (ds.Tables[0].Rows.Count == 0)rn rn Label2.Visible = true;rn rn else rn Label2.Visible = false;rn rnrn con.Close();rn GridView1.DataSource = ds.Tables[0].DefaultView;rn GridView1.DataBind();rn rn rnrn private void BindDL() rn OleDbConnection con = new OleDbConnection(StrSql);rn con.Open();rn OleDbCommand cmd = new OleDbCommand("select [bookname],bookImage from book where Isnew='1'", con);rn OleDbDataAdapter sda = new OleDbDataAdapter();rn sda.SelectCommand = cmd;rn DataSet ds = new DataSet();rn sda.Fill(ds);rn con.Close();rn DataList1.DataSource = ds.Tables[0].DefaultView;rn DataList1.DataBind();rn rnrn private void BindDep_id() rn OleDbConnection con = new OleDbConnection(StrSql);rn con.Open();rn OleDbCommand cmd = new OleDbCommand("select * from booktype", con);rn OleDbDataAdapter sda = new OleDbDataAdapter();rn sda.SelectCommand = cmd;rn DataSet ds = new DataSet();rn sda.Fill(ds);rn con.Close();rn dep_name.DataSource = ds.Tables[0].DefaultView;rn dep_name.DataBind();rn dep_name.DataValueField = "typeid";rn dep_name.DataTextField = "typename";rn ListItem Li = new ListItem("全部", "0");rn dep_name.Items.Add(Li);rn dep_name.SelectedIndex = dep_name.Items.Count - 1;rn rnrnrngridview_Sorting事件处理程序 排序后绑定到gridview的代码rnrnrnrn protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)rn rn ViewState["SortExpression"] = e.SortExpression;rn string SqlStr = "select book.bookname,book.writer,book.bookprice,booktype.typename from book,booktype where book.typeid=booktype.typeid order by " + ViewState["SortExpression"].ToString();rn BindGV(SqlStr);rn rnrnrnGridView1_PageIndexChanging1事件处理程序代码 排序绑定rnrnrn protected void GridView1_PageIndexChanging1(object sender, GridViewPageEventArgs e)rn rn GridView1.PageIndex = e.NewPageIndex;rn string SqlStr;rn if (ViewState["SortExpression"] == null) rn SqlStr = "select book.bookname,book.writer,book.bookprice,booktype.typename from book,booktype where book.typeid=booktype.typeid";rn rn rn elsern rn SqlStr = "select book.bookname,book.writer,book.bookprice,booktype.typename from book,booktype where book.typeid=booktype.typeid order by "+ViewState["SortExpression"].ToString();rn rn rn rnrn 论坛

没有更多推荐了,返回首页