|
hi all,
im doing this project using c# and asp.net in visual studio.
one question here,
i needed to check if it is the Header of the excel sheet telly my heading.
(how to read and check the excel heading from the first row?)
-- will do a check like.. A1 = code , B1 = name, C1 = Department
eg.
Excel:
| Code | name | Department |
thanks!
=D
|
|
|
|
|
hi can you give a few code to help you but i think if you know where are your informations you can use : worksheet.Cells[row, col]
jere
|
|
|
|
|
oh..
i use oledb connection to read..
string srcConnString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ sourceFile + @";Extended Properties=""Excel 8.0;HDR=NO;""";
string srcQuery = "Select * from [" + GetExcelSheetNames( sourceFile)[0] + "]";
|
|
|
|
|
hi...
can you explain your question in detail way . so that I can give you some more inputs.
|
|
|
|
|
Hi All,
I need to run 3 methods parallaly.Then I have used Threading for that. Here is the code.
public void threadtest()
{
Thread SpecialThread = new Thread(new ThreadStart(this.GetSpecial));
Thread BulkThread = new Thread(new ThreadStart(this.GetBulk));
Thread NormalThread = new Thread(new ThreadStart(this.GetNormal));
SpecialThread.Start();
BulkThread.Start();
NormalThread.Start();
SpecialThread.Join();
BulkThread.Join();
NormalThread.Join();
while((NormalThread.ThreadState==System.Threading.ThreadState.Running) ||
(BulkThread.ThreadState==System.Threading.ThreadState.Running) ||
(SpecialThread.ThreadState==System.Threading.ThreadState.Running)
)
{
}
}
But most of time one or two threads are going to aborted or something happen and I loose their results.Sometimes this worked properly and I can get all results from 3 methods.
Can any one correct this code?
|
|
|
|
|
dude!
please get in the habbit of using pre and code tags for code in your posts, its hard to read if you dont
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
If (Programming != Your Passion)
{
you.suck = true;
}
else
{
you.suck = false;
}
|
|
|
|
|
I get a HtmlDocument object from my application.
How to get the default webBrowser in OS,
and this webBrowser load the HtmlDocument object?
|
|
|
|
|
Not possible. The only browser you can interact with in C# AFAIK is IE, and certainly if FF has an interface, it won't be interchangable with the IE one.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
how to open IE and load HtmlDocument object by my winform?
|
|
|
|
|
If the document is on the disk, you can use Process.Start(Myfile.htm) on the file to start it. If it's not present, save it to a temporary file and do the Start on it. This will load your html file in the default browser, IE, FF or whatever.
|
|
|
|
|
Hi...
I have two forms in my windows application.
Form1 and Form2.
In Form1 I have 1 Label and a button.
In Form2 I have just a button.
When clicking on this Form1 button I am opening Form2.
In Form2 button Click event I have to hide the Form2 and have to show the value "HI" in the Form1 Label.
To do this some one suggested me use delegates. Is this only way to do this?
your
peter
|
|
|
|
|
Hello,
This article [^]from Colin Angus shows you all!
All the best,
Martin
|
|
|
|
|
Hi..
you can do thats by connect even form .
--- Form1 ---
private void button1_Click(object sender, System.EventArgs e)
{
Form2 FRM = new Form2(this);
FRM.show();
}
public void SetLabelValue(string MSG)
{
Label1.Text = MSG;
}
--- Form2 ---
Form FRM1 = null;
public Form2(Form1 frm)
{
// Required for Windows Form Designer support
InitializeComponent();
this.FRM1 = frm ;
}
private void button1_Click(object sender, System.EventArgs e)
{
this.FRM1.SetLabelValue("HI");
FRM1.show();
}
|
|
|
|
|
|
This is a poor solution because it couples the forms together. If you want to change the way your application works in the future it will be more difficult to make the modifications.
|
|
|
|
|
Hi,
Could anyone help me to store a date in DateTime variable in the format of 'DD-MMM-yyyy'(my codebase is asp.net with c#).
For example;
DateTime dateTest;
dateTest=DateTime.Parse("02/14/2008");
The dateTest should provide o/p like 14-Feb-2008
Thanks in advance
John
|
|
|
|
|
A DateTime just stores the date and time. If you want it in fancy formats, just use the overloaded ToString(string format) method.
Cheers,
Vikram.
"The weak can never forgive. Forgiveness is the attribute of the strong." - Mahatma Gandhi.
|
|
|
|
|
Hi, is it possible to get all the point inside the polygon. Scenario is quite simple; I have created a polygon on panel. Now I want to get all the points inside polygon. Can anyone tell me about any function (win32 or .net library function) or good web link, I will be thankful to you.
Regards,
|
|
|
|
|
You need all the points inside polygon? I am afraid but you will get OutOfMemoryException
|
|
|
|
|
Thanks a lot for you reply. Actually I want to check the mouse enter event for the polygon, I found two ways to check it
1. Check all the polygons coordinates and on mouse move and pick up the source polygon
2. Create a Hashtable of point and their respective polygon object. On every mouse move check that hash.
I found 2nd method fast and efficient. I don’t think so it may cause out of memory, what u suggest! Please guide me about the good approach that I should fallow.
Regards,
|
|
|
|
|
|
Hi,
Maybe this is what you need:
.NET has a Region class that represents an arbitrary closed shape.
And Region.IsVisible() tells you whether a point, rectangle, whatever lies inside
the region.
BTW: if yours happens to be a web app, then PolygonHotSpot Class might be useful.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi, it is really great solution, but I don’t think it will work for polygon....
|
|
|
|
|
faheem424 wrote: it is really great solution, but I don’t think it will work for polygon....
Why not? Have you tried? What was the result?
|
|
|
|
|
I tried it and it is really working fine. It is good solution. You have really solved the looping cost of my program. Thanks a lot.
Regards,
|
|
|
|