|
Would you mind educating me a little more...
What exactly is happening here? (Checkbox)sender;
Is this casting sender as a Checkbox?
|
|
|
|
|
How can I add DLL file to RichTextBox ?
|
|
|
|
|
dataminers wrote: How can I add DLL file to RichTextBox ?
Que? Like an OLE-object or what? Do you want to call methods in it during the viewing of the RTF, or should it represent data in the same way that you embed a wave-file?
I are Troll
|
|
|
|
|
I've been working with Visual Studio as hobbyist for a few years, but I only discovered this today. The way I found out was by moving some methods to another class. One of the methods used a Point class (of the System.Drawing namespace), but I didn't add a using-directive for that namespace. Then when I wanted to pass an instance of the Point class to that method from another class (which did have the directive to System.Drawing), it told me I was passing the wrong type.
That's when I discovered I forgot the using-directive to System.Drawing in the codefile of the method that also used the Point class. However, Visual Studio never warned me for that. Although the type I defined for that parameter was completely non-existing, it didn't mark it. Even if I said the parameter should be of type "sldhfsdf", which didn't exist at all (no directive to a potential namespace could have solved that), it still didn't mention anything, and acted as if it was an existing type. I could even use the parameter in the method, and it would propose it in the IntelliSense list.
Only I try to compile, it does return an error.
To clarify, here's an example that seems to be alright to Visual Studio's error checking.
public class Test
{
public void MyMethod(abcabc var1)
{
var1 = null;
}
}
While writing this piece of code, Visual Studio won't tell me this is wrong. The only way to find out is by compiling, or calling the method somewhere so it would tell me I'm either passing an unexisting or invalid variable.
Both Visual Studio 2008 and 2005 seem to do this. Could anyone explain me why this is the case?
|
|
|
|
|
I think you have to tell intellisense to check parameters.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
How do I do this? I've been searching for it on the internet, but can't find it. The Intellisense options seem rather limited.
|
|
|
|
|
Hmmm, I coulda sworn this was possible. I think this is just part of VS2008. I'll check 2010 when I get home and see if they've fixed it.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Anyone still has an idea? This seems rather weird...
|
|
|
|
|
I'm trying to use Publish in C# 2008 express for the first time and getting an error that reads
...copy the latest version into the directory that contains SignTool.exe. If CAPICOM.dll exists, you may not have proper permissions to install CAPICOM.
The dll is there, and I have local administrator rights but do not remember installing CAPICOM.
Any suggestions about this error, or direction to a tutorial of the proper use of creating an install package would be great.
Thanks.
|
|
|
|
|
I can't seem to find this, although I don't know why as it can't be that difficult.
I want to have a comboxbox appear in a DataGridView. The combo will get its data from a seperate DataSet.
Anyone?
Everything makes sense in someone's mind
|
|
|
|
|
You just need to add the dropdownlist into your grid by using edit template and use a Sqldatasource for the dropdownlist...that's it.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Ok, I am now able to add the column, but when I click the arrow, there is nothing in it. Here's my code so far:
private void _SetupLists()
{
_TableId = (int)cboTables.SelectedValue;
DataSet dsGrid = DataProcs.ExecuteQuery("SELECT ColumnId, TableId, ColumnName, Expression FROM Columns WHERE TableId = " + _TableId, CommandType.Text);
grdColumns.DataSource = null;
grdColumns.DataMember = null;
if (dsGrid.Tables[0].Rows.Count > 0)
{
grdColumns.DataSource = dsGrid.Tables[0];
grdColumns.Columns[0].Visible = false;
grdColumns.Columns[1].Visible = false;
grdColumns.Columns[2].Width = 200;
grdColumns.Columns[3].Width = 490;
}
DataSet dsTables = DataProcs.ExecuteQuery("SELECT TableId, QueryName FROM Tables ORDER BY TableName");
DataGridViewComboBoxColumn colTables = new DataGridViewComboBoxColumn();
colTables.Name = "colTables";
colTables.DataSource = dsTables.Tables[0];
grdColumns.Columns.Add(colTables);
}
Everything makes sense in someone's mind
|
|
|
|
|
hi.
I have a problem.
a section of a project I have created excel file to transfer data from the datagridview would. I then transferred the data after checking this information to the database I want to register. I assign the following code to add a record button.
string constr = "DSN=depo";
OdbcConnection con = new OdbcConnection(constr);
string firma = dataGridView2.SelectedRows[0].Cells["firma_ad"].ToString();
string miktar = dataGridView2.SelectedRows[0].Cells["miktar"].ToString();
for (int i = 0; i < dataGridView2.Rows.Count; i++)
{
con.Open();
OdbcCommand cmd_ec = new OdbcCommand();
OdbcDataAdapter adapter_ec = new OdbcDataAdapter();
string sql_ec = "insert into siparis (firma_ad,miktar)values ('" + firma + "','" + miktar + "')";
OdbcDataAdapter adpt_ec = new OdbcDataAdapter(sql_ec, con);
DataSet dsett_ec = new DataSet();
adpt_ec.Fill(dsett_ec, "Firmaya_göre_parçaları belirle");
con.Close();
But it also said there is an error in the code. excel file with this code when processing the same record over and over again until my yaıt line goes. Add the information in the same row is continuous.
Please let me know solution for my problem. How do I need to follow a path?
Thanks.
|
|
|
|
|
dr_move wrote:
string sql_ec = "insert into siparis (firma_ad,miktar)values ('" + firma + "','" + miktar + "')";
just check the format of the sql statement first...
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
is there any class that converts in different number system?
|
|
|
|
|
Hi,
numbers don't have a base, it is only when they are converted to/from strings that a base applies.
have a look at Convert.ToInt32(String, Int32) and Convert.ToString(Int32, Int32)
[and similar for other types]
|
|
|
|
|
no. i mean what if i want to convert FFFF to binary or octal or any other format?
|
|
|
|
|
you can convert "FFFF" to an int32 and then to "1111111111111111" or "00000000000000001111111111111111" with the methods I indicated earlier.
or you can write your own code to convert one string in another, which is harder to do, and does not really offer any advantage.
|
|
|
|
|
FFFF is already in the desired "format". You just need to choose the correct string format so you can see it in the desired representation.
Int32 i = 200;
String oct = Convert.ToString(i, 8);
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
|
|
I have developed a windows application. I put a rectangle picture as a background picture for my form. In that picture, outside the rectangle, it is colored red. In my form I set that color as the transparency color so it would show only that rectangle or any other shape as a form.
It works well in my own computer, but whenever I try to use it in another computer which also has the .Net framework installed there, the color does not hide and the transparency does not work. It shows both the rectangle and the background color. What should i do?
the picture is saved as BMP.
I'm using C# in a Visual studio. The application is written in .Net 2.0.
|
|
|
|
|
A program cannot behave like this….Better you review your code. You can also post your code snippets for getting better suggestions from the forum.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Hey, i've been looking for an effective method of storing 2 byte values within one. Or, two short values within one.
The system I currently use is by embedding an unsafe code to point to a byte value and to cast the relevant data. Here's an example:
byte db, v1, v2;
v1 = 50;
v2 = 80;
unsafe
{
byte* db_p = &db;
db_p[0] = (byte)((v1) >> 2);
db_p[1] = (byte)(((v1) << 6) | (((v2) >> 4)&0x3F));
db_p[2] = (byte)((v2) << 4);
}
Which stores two values excellently. However, For values below 4 generally, numbers tend to overlap each other. IE, values of v1 = 0, v2 = 0; and v1 = 1, v2 = 1; tend to have the same digit value of db .
I was wondering there were any other methods of storing 2 values of data (bytes) within one single data (I'm using this to remove the necessity for multi-dimensional arrays and large collection objects).
Thank you!
|
|
|
|
|
1. this isn't C# code is it? hence: wrong forum.
2. db_p is a pointer pointing to a byte, yet you write at locations db_p+0, db_p+1, db_p+2, so you write past the item your pointer points to, which is either not allowed (C#) or cheating (C/C++).
3. Of course you can store 2 byte values in 3 bytes; it is plain stupid.
|
|
|
|