|
mmmm..sounds look cool my friend..but i didnt get any thing ..do u know any usefull article about this..i will be greatfull.!
Regards ;
|
|
|
|
|
|
thanks alot bro..but we are not on the same page..ok assume that i draw aline i want after clicking on save button..it will save the (start point , end point ,RGB ,...)of that line in text file..!!
|
|
|
|
|
Let me make it simpler for you...
When you are drawing line, you have its information like start point, end point, RGB.
Create a structure e.g. structLine which contains members for holding start point , end point (each of appropriate type).
Copy the values to objLine of type structLine before you call DrawLine Method.
When you click Save button
// create a writer and open the file
TextWriter tw = new StreamWriter("line.txt");
// write a line of text to the file
tw.WriteLine(objLine.StartPoint.ToString() + ", " objLine.EndPoint.ToString()); // mention all values of struct
// close the stream
tw.Close();
I recommand you override the method ToString() method of structLine in which you provide way to represent the structure in sting format.
Now is this okey?
|
|
|
|
|
yah its much better..thanks bro..i will be more geatfull if u recommended me any usefull article about that..cuz iam dealing with alot of shapes ..not just lines...thanks again for ur time.
cheers;;)
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/ms384775(VS.71).aspx
U'll find lots of good stuff in it
|
|
|
|
|
I don't know whether any article exists for such case, but I can give you some more hints about this as you know now how to deal with lines.
Take out a list of values that are required for all the shapes that you are using.
Create a structure e.g. structShape which contains members for holding all the values.
Include a shapeType field in the structShape which will let you know what type of shape you are drawing.
It might be the case that a shape would not contain all the properties. So copy values that are available and keep the remaining blank (or something like "NA" which means not applicable for this type of shape).
I recommand using structure because if you want to read again from that file you can read in the same sequence that you wrote to the file.
Your shapeType attribute will decide which shape is to be drawn.
Is that fair enough?
Let me know if any problem in this.....
|
|
|
|
|
Hi all
i'm trying to check all items in a list view through a CheckAll checkbox option. now the problem is that when i click on the check all checkbox it gives me the NullReferenceException in the following code
private void AttributeList_ItemCheck(object sender, System.Windows.Forms.ItemCheckEventArgs e)
{
attribute_list=attribute_list+"["+AttributeList.SelectedItem.ToString()+"],";
selected_columns.Add(AttributeList.SelectedItem.ToString());
}
the exception arises in the first line of the method
all i'm trying to do is save the checked items in the list view.
awaiting all replies
Saira
|
|
|
|
|
Hello,
Are you talking about System.Windows.Forms.ListView?
Cause I can not find a SelectedItem Property there (only SelectedItems which is an Array).
All the best,
Martin
|
|
|
|
|
yes , i 'm talking about System.Windows.Forms.CheckedListBox and there is a property SelectedItem.
does this help??
|
|
|
|
|
If I picture correctly what you doing, you looping through the listbox and setting the check.
This does not imply that thge item being checked is selected. hence the value of the selecteditem is null.
examine the selecteditems.count before using the code to see if it is not 0.
or set the
AttributeList.selecteditem = AttributeList.Items[loopcounter];
AttributeList.selecteditem.Checked = true;
but I am not sure if that will fire the event.
|
|
|
|
|
Why this one works
conn = new OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=dictdb.mdb;")
conn.Open()
da = new OleDb.OleDbDataAdapter("SELECT * FROM WordList", conn)
da.Fill(ds)
But this one doesn't work
conn = new OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=dictdb.mdb;")
conn.Open()
da = new OleDb.OleDbDataAdapter("SELECT * FROM WordList WHERE Src='test'", conn)
da.Fill(ds)
error I got is "No value gived for one or more required parameters"
|
|
|
|
|
Please paste your real code. The code you have posted here will not even compile.
Also, please tell us exactly which line the error occurred on.
|
|
|
|
|
What's the type of the Src column?
Does this statement work if you run it from Access' query editor?
|
|
|
|
|
Hi guys.
Anyone know the connection strings to connect C# application to Lotus Approach databases? (or id this is even possible?)
tnx.
-zoroyster
|
|
|
|
|
google for "NotesSQL301.exe" and use linked servers to get it working !
|
|
|
|
|
Hi all,
I have created windows service which inserts data on timer basis.
Right now am using dataconnections,queries in the windows service itself.
Instead i can call webservice to insert data.
I want to know whether which method works good.
1.using dataconnections in the windows service
or
Calling webserive for data insertion.
Plz give ur suggestions
Thanks in advance
cheers
sangeet
|
|
|
|
|
if performance is important and if you are never likely to want to use that dataaccess code elsewhere then keep it in the service.
If, however, the windows service is going to be one of many applications that will be using the data access layer and you want them all to use a consistent code base then use a webservice.
It can be a hard choice to make. I have used both in the past according to requirements. I've also wrapped the data code into a dll and used the dll in different projects.
No one solution will work for every case.
RUssell
|
|
|
|
|
Thanks for ur quick response.
In my case,am using the dataacces code only in the service and also performance matters.
I think its better to use the dataaccess code in the service itself.
Thank you.
cheers
sangeet
|
|
|
|
|
Hi, Dear(s)
How to set Cell Back Color in dataGridView of particular cell?
Thank you
|
|
|
|
|
Use GridView.Rows[i].Cells[j].BackColor=Color.someColor;
Regards,
Arun Kumar.A
|
|
|
|
|
Hi Dear Mr. Arun.
dataGridView1.Rows[intLooper].Cells[intLooperX].BackColor
the "BackColor" is not appearing after presing "Dot"
|
|
|
|
|
M Riaz Bashir wrote: dataGridView1.Rows[intLooper].Cells[intLooperX].BackColor
the "BackColor" is not appearing after presing "Dot"
Hey, that is strange.It is working in my code.
Any way, try this:
dataGridView1.Rows[intLooper].Cells[intLooperX].Style["background-color"] = "#cccccc";
Regards,
Arun Kumar.A
|
|
|
|
|
hi,
how to insert the item chosen from the combo box to a database table?
regards
jing
|
|
|
|
|
Obtain the selected text using Text Property of the DropDownList
in the Change Event.
Then update obtained text in the database.
Regards,
Arun Kumar.A
|
|
|
|