|
picturebox.Refresh() should do
|
|
|
|
|
please how can i load rgb image data to array and then print it to screen from array using c#
i appriciate your reply
thank you
|
|
|
|
|
That seems like an odd thing to do.. But well, you could make an uint[] and use LockBits on a Bitmap and fill the array using unsafe code, then make a new Bitmap use LockBits again and then write the pixels back (unsafe code) to the new bitmap and then display the bitmap. Why? Because you asked.
Alternatively you could fill the array of uint s with whatever else you want.
|
|
|
|
|
I'm new to C#.
I am using WebBrowser control in a form. I have a 'Back' button on the toolbar. I would like to disable the button based on 'webBrowser.CanGoBack' property. However, when browsing, I do not know when someone has clicked a link to a new page and I do not know how to create an asyncronous callback to check the property (other than using a timer; which I don't want to do). MFC C++ has MS custom WM_KICKIDLE message which could be used for such things. Can someone suggest a preferred method to do this?
thanks.
|
|
|
|
|
Sorry all. I figured out how to do it.
Thanks
|
|
|
|
|
Hi All,
There is an interesting Article "Nav Autoupdate with c#" under Library section
Link:
http://www.codeproject.com/KB/library/AutoupateNAV.aspx
Thanks
|
|
|
|
|
Please, stop spamming the board. Your article is very good, but you don't do it any justice by posting about it every four hours or so
|
|
|
|
|
Makes me think of the "hey I found this site.." posts spam on usenet - that is not a good thing
|
|
|
|
|
Tooting your own horn?? What's the point of constantly posting "Hey I wrote this cool article" every four hours?? You're not going to get MVP status by doing that, if that's you're motivation.
|
|
|
|
|
Dave Kreskowiak wrote: You're not going to get MVP status by doing that, if that's you're motivation.
I don't know, if he keeps it up he's a shoe-in for the Most Vapid Prat award.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
<JSOP>
Don't univote someone's articles because you think they're an idiot on the forums
</JSOP>
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
Awww!!!
|
|
|
|
|
Hi,
I have a COM component where i have declared restricted/hidden methods and properties.Using Reflection I am accessing these methods and properties.Is there any way to filter out restricted properties alone? I can able to do for methods but not for properties.
here is my code for methods:
foreach (MethodInfo mInfo in obj.GetMethods())
{
string FuncAttrib = "";
TypeLibFuncAttribute attrib = null;
attrib = (TypeLibFuncAttribute)Attribute.GetCustomAttribute(mInfo, typeof(TypeLibFuncAttribute));
if (null != attrib)
{
FuncAttrib = attrib.Value.ToString();
}
//Filter the Restricted methods.
if ((FuncAttrib.Contains("FRestricted")) || (FuncAttrib.Contains("FHidden")))
{
//here we will get only restricted.Hidden methods
}
}
This is working fine for methods.here I have used TypeLibFuncAttribute which is applicable to method alone.Can anyone help to apply this logic to properties?I have searched the attribute similar to method but not able to get......
Thanks,
Rajan.
|
|
|
|
|
A am using access mdb database and using obleDB class.
when i run insert query on this table it runs successfully but record does not appear into data table.
i am using ..
objConnection1.Open();
objCommand = new OleDbCommand(Sqlstr, objConnection1);
Data = objCommand.ExecuteNonQuery();
// it gives data = 1
my connection is ok because i am getting value using this connection when i use Executescalar() on this command object
why it is.....
|
|
|
|
|
Whats your query string? i.e. the value of Sqlstr
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
string Sqlstr = "INSERT INTO student(stu_id,stu_fnm) VALUES (" + textBox1.Text.Trim() + ",'" + textBox2.Text.Trim() + "') ";
// it is inserting record when i run it into sql pane .
and
objConnection1 = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=score.mdb");// is connection string
// i tried same for sql server database it works fine
// but i want to do it for access..
|
|
|
|
|
well your query string look ok, apart from the fact you should be using command parameters to insert data from textBoxes. Is a row being created in the database at all? with just blank data?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Because you're executing a non-query[^]. As the documentation states;
Executes a Transact-SQL statement against the connection and returns the number of rows affected.
Your query affected 1 row, and that's what the function returns. Use a DataReader te read your row
I are troll
|
|
|
|
|
but i want to insert record into table .
|
|
|
|
|
Aw, I thought you wanted to insert your rows into a DataTable object. I should learn to read decently before answering a post.
In that case the ExecuteNonQuery is correct, my apologies. That would return "1" if it added a record. You might want to use parameters in your Insert-statement, that would also prevent some problems with SQL Injection and quoted strings. Take a look at OleDbParameter
I are troll
|
|
|
|
|
Can someone teach me how to compile a project like "Sandcastle File Help Builder" with makefile?
I'm a new user for Visual C# and I've just used a normal function to create .exe till now.
Regards,
Christian
|
|
|
|
|
Makefiles are not required to compile a C# app. Don't you have Visual Studio installed?
|
|
|
|
|
Yes. I use Visual Studio 2005. Maybe you can also see the Sandcastle-Source-Code which also can be downloaded here by codeproject.This source code has makefile in each c# project
|
|
|
|
|
|
Not a valid month error (ORA-1843)
More fun with ODP.NET - Tried different format string none worked!! wasted couple of hours!!
My table column is defined as:
CreateDate timestamp default sysdate NOT NULL
This is first thing I tried (most intuitive right?) This don't work ...
<br />
oParam.DbType = DbType.DateTime;<br />
oParam.Value = DateTime.Now;<br />
Error message in this case was: "ORA-01858: a non-numeric character was found where a numeric was expected"} System.Exception {Oracle.DataAccess.Client.OracleException}
So I tried many things... no luck
<br />
oParam.Value = DateTime.Now.ToString("dd-MMM-yy");
oParam.Value = DateTime.Now.ToString("dd-MM-yy");<br />
oParam.Value = DateTime.Now.ToString("MM-dd-yy");<br />
oParam.Value = DateTime.Now.ToString("MM/dd/yy");<br />
oParam.Value = DateTime.Now.ToString("dd/MM/yy");<br />
Also tried different combinations using MMM, NO LUCK!!
I then Checked db date format via:
select sysdate from dual;
SYSDATE
16-APR-09
1 row selected.
Last trick (Works but UGLY) - use to_date function in my sql statement + string concatenation instead of parameter!!!
select to_date('16-4-09', 'dd-mm-yy') today from dual
Code:
if (oContext.DefaultDBProvider == DBUtil.DataProvider.OracleODAC || oContext.DefaultDBProvider == DBUtil.DataProvider.OracleProvider)<br/>
{
strSQL_insert = strSQL_insert.Replace(ORACLE_CREATEDATE, "to_date('" + DateTime.Now.ToString("dd-MM-yy") + "', 'dd-MM-yy')");
}
else
{
oParam = oCmd.CreateParameter();
oParam.ParameterName = DBUtil.FixParameterNameForOracle(oContext.DefaultDBProvider, "@CreateDate");
oParam.Direction = ParameterDirection.Input;
oParam.DbType = DbType.DateTime;
oCmd.Parameters.Add(oParam);
}
Any suggestion? I've isolated the one offending parameter but need the right "format" and ora messages is not helpful at all.
REF:
http://forums.oracle.com/forums/thre...hreadID=631236
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
dev
modified on Thursday, April 16, 2009 9:14 AM
|
|
|
|