|
Hi,
You can use 'Application.ThreadException'. it will handle any unhandled exception that raises in a sub-thread, anyway this only allows you to have a application wide event for handling all your sub-threads. Maybe you can create an event yourself and call it on the catch block. This way you control the exceptions on the sub-thread and send it to UI thread.
Hope this helps.
|
|
|
|
|
Thanks Gonzalo!
I have tried above mentioned event mechanism. Just thought of something better available.
Praveen Raghuvanshi
Software Engineer,
India.
|
|
|
|
|
You welcome .
I guess then the only way would be you taking care of picking the expcetion in the sub-thread and moving it to UI manually.
Regards.
|
|
|
|
|
Hello.
In the database tree structure of how to write?
After the move in the C#
|
|
|
|
|
From your description of the problem, no.
Please clarify your question - in English it does not make a lot of sense...
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
Hello.
In the database tree structure of how to write?
After the move in the C#
|
|
|
|
|
Can you please give some detail, so that it is easier to answer your question.
And please don't cross post. Read this[^] guideline before you post your question.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Hi,
I am building a GPS assisted application, which is to display a weather forecast for the closest location with reference to current location.
I am using yahoo weather forecasts.
What i have done:
1. I can successfully request a weather for a place if i know its WOEID (Note: only some places have weather forecasts).
2. In order to get a WOEID of the current location i can query "FLICKR" using YQL and passing current latitude and longitude and get a WOEID back for that place.
Problem:
Is there any way i can request a weather forecast for a nearest location to acquired WOEID of current location.
Thank you in advance,
|
|
|
|
|
Hi Guys,
I would appreciate it if someone has found/created an MS Word Viewer/Editor Control on Visual Studio.
Thanks,
|
|
|
|
|
If you are looking for a word .doc editor in C#, you can find several on the internet. See here.
My signature "sucks" today
|
|
|
|
|
Hey guys, I'm having trouble searching for a date I fetch in C# in my database
in my application the date time value is in this format: 6/16/2010 9:41:19 AM in the database I use
CONVERT(VARCHAR(10),SR.StuDateOfReg,101) to convert my date and extract only the date part but what I get is 06/15/2010.
I thought there should be no difference between 6/16/2010 and 06/16/2010,
when I execute this query
... WHERE CONVERT(VARCHAR(10),SR.StuDateOfReg,101) >= CONVERT(VARCHAR(10),'6/15/2010',101)
I don't get anything back but when I go for
... WHERE CONVERT(VARCHAR(10),SR.StuDateOfReg,101) >= CONVERT(VARCHAR(10),'06/15/2010',101)
It works!
so how can I change one to another?
regards,
|
|
|
|
|
Found it myself
I used this function:
CREATE FUNCTION dbo.fnFormatDate (@Datetime DATETIME, @FormatMask VARCHAR(32))
RETURNS VARCHAR(32)
AS
BEGIN
DECLARE @StringDate VARCHAR(32)
SET @StringDate = @FormatMask
IF (CHARINDEX ('YYYY',@StringDate) > 0)
SET @StringDate = REPLACE(@StringDate, 'YYYY', DATENAME(YY, @Datetime))
IF (CHARINDEX ('YY',@StringDate) > 0)
SET @StringDate = REPLACE(@StringDate, 'YY', RIGHT(DATENAME(YY, @Datetime),2))
IF (CHARINDEX ('Month',@StringDate) > 0)
SET @StringDate = REPLACE(@StringDate, 'Month', DATENAME(MM, @Datetime))
IF (CHARINDEX ('MON',@StringDate COLLATE SQL_Latin1_General_CP1_CS_AS)>0)
SET @StringDate = REPLACE(@StringDate, 'MON',
LEFT(UPPER(DATENAME(MM, @Datetime)),3))
IF (CHARINDEX ('Mon',@StringDate) > 0)
SET @StringDate = REPLACE(@StringDate, 'Mon', LEFT(DATENAME(MM, @Datetime),3))
IF (CHARINDEX ('MM',@StringDate) > 0)
SET @StringDate = REPLACE(@StringDate, 'MM',
RIGHT('0'+CONVERT(VARCHAR,DATEPART(MM, @Datetime)),2))
IF (CHARINDEX ('M',@StringDate) > 0)
SET @StringDate = REPLACE(@StringDate, 'M',
CONVERT(VARCHAR,DATEPART(MM, @Datetime)))
IF (CHARINDEX ('DD',@StringDate) > 0)
SET @StringDate = REPLACE(@StringDate, 'DD',
RIGHT('0'+DATENAME(DD, @Datetime),2))
IF (CHARINDEX ('D',@StringDate) > 0)
SET @StringDate = REPLACE(@StringDate, 'D', DATENAME(DD, @Datetime))
RETURN @StringDate
END
dbo.fnFormatDate (SR.StuDateOfReg, 'M/DD/YYYY') >> 6/15/2010
|
|
|
|
|
That's not a good design. Change the data type for your date time values to 'datetime'. Furthermore, use parameterized queries. Then your problems should be easily resolved without long functions.
|
|
|
|
|
That is horrible. Don't use strings for dates (or numbers); it's terribly inefficient, especially when you convert the data in the table to strings and then compare -- don't do it!
Convert the incoming string to a date and then compare.
|
|
|
|
|
i want to move a button on a form with a keypress on keyboard.
please help me
what should i do?
danialkhazaei@yahoo.com
|
|
|
|
|
i want to move a button on a form with a keypress on keyboard.
please help me
what should i do?
|
|
|
|
|
1) You have posted the same question twice. Remove the one that has not been answered to.
2) You have used the joke icon while posting this question. People will not take your question seriously.
3) See here - maybe this can help.
My signature "sucks" today
|
|
|
|
|
Set the KeyPreview of the containing form to true , handle the Form 's KeyPress /KeyDown /KeyUp event depending on your needs and set the Button 's Location property to the point you want.
Please only post once and give your post a title that indicates the problem in future.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Hi mehdi
Post your questions with proper subbject
thanks
Life's Like a mirror. Smile at it & it smiles back at you.- P Pilgrim
So Smile Please
|
|
|
|
|
Delete the second copy of your question, before it gets replied to.
Never post your email to any forum - unless you really like spam! CP will send you emails as necessary when people reply to you. (Just like this one)
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
I decided not too use it as a singleton (or in my case as I was being silly a "Global" object !).
Thank's
|
|
|
|
|
venomation wrote: I decided not too use it as a singleton (or in my case as I was being silly a "Global" object !).
Ok. So what are you answering to?
Are you referring to some other article / post?
Then please post that link here or better, post this message within that same article or link.
My signature "sucks" today
|
|
|
|
|
I want to assign 10 threads (it could be n) to a listview of (10000 records).
The listview's first coloumn is email. So I want to send email to a method and get a return string as a result (valid or not). which i want to add to the second column of the listview. Pls help me how to do it?
Code would be much appriciated.
|
|
|
|
|
So you deleted your original post to repost your request for code.... why?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
so he decided to completely ignore forum guidelines, ignore and down-vote my earlier reply, delete the question, create a new thread on the same subject, and use a meaningless subject line. Not a compelling start.
|
|
|
|