Click here to Skip to main content
16,014,113 members
Home / Discussions / C#
   

C#

 
GeneralRe: Strip commas Pin
Uwe Keim19-May-04 23:24
sitebuilderUwe Keim19-May-04 23:24 
GeneralRe: Strip commas Pin
Bee Master20-May-04 5:09
Bee Master20-May-04 5:09 
GeneralRe: Strip commas Pin
Bitwise Gamgee20-May-04 5:22
Bitwise Gamgee20-May-04 5:22 
GeneralRTF - Codes Pin
Moon Boy19-May-04 14:12
Moon Boy19-May-04 14:12 
GeneralRe: RTF - Codes Pin
Charlie Williams19-May-04 17:28
Charlie Williams19-May-04 17:28 
GeneralDataGrid, Generic GDI+ errors, and a Big Red X Pin
inyoursadachine19-May-04 13:30
inyoursadachine19-May-04 13:30 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
Heath Stewart19-May-04 13:52
protectorHeath Stewart19-May-04 13:52 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
inyoursadachine19-May-04 14:22
inyoursadachine19-May-04 14:22 
Heath,
Thanks for your reply. Re: InvokeRequired; my program does not start any threads. My PeekCompletedHandler function is appended to the end of my post. Also, when I get the "Generic GDI+ exception" I don't see any specific info about the error in the MessageBox. How do I get that info so I can post it here?

-Matt

=============================================================
private static void MQPeekCompletedHandler(Object source, PeekCompletedEventArgs peekArgs)
{
MessageQueue mq = null;
try
{
mq = (MessageQueue) source;
if(mq == null)
{
MessageBox.Show("Source was null", "MQPeekCompletedHandler()");
return;
}
if(peekArgs.AsyncResult.IsCompleted == false)
{
MessageBox.Show("IsCompleted=false", "MQPeekCompletedHandler()");
return;
}
System.Messaging.Message msg = mq.EndPeek(peekArgs.AsyncResult);
IceEvent oEvent = new IceEvent(mq, msg);
if((oEvent.IsEventValid) && (s_nvcMsgsSeen[oEvent.Identifier] == null))
{
s_nvcMsgsSeen[oEvent.Identifier] = "Y";
lock(s_MQEventQueue.SyncRoot)
{
s_MQEventQueue.Enqueue(oEvent);
}
}

}
catch(System.Messaging.MessageQueueException smmqe)
{
// The IOTimeouts occur because, as per the MS MSMQ Best Practices, we timeout our
// Asnychronous BeginPeek() methods.
if(smmqe.MessageQueueErrorCode != System.Messaging.MessageQueueErrorCode.IOTimeout)
{
throw new System.Exception("Unexpected MessageQueue exception", smmqe);
}
}
catch(System.Exception se)
{
MessageBox.Show(se.GetType().ToString() + ": " + se.Message, "Exception occurred in MQPeekCompletedCallback()");
}
finally
{
if(mq != null)
{
mq.BeginPeek(new TimeSpan(0,1,0));
}
}
}

==============================================================


GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
Heath Stewart19-May-04 18:28
protectorHeath Stewart19-May-04 18:28 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
inyoursadachine20-May-04 5:41
inyoursadachine20-May-04 5:41 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
Heath Stewart20-May-04 5:47
protectorHeath Stewart20-May-04 5:47 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
ABean19-May-04 15:11
ABean19-May-04 15:11 
GeneralC#'s sprintf Pin
ABean19-May-04 13:19
ABean19-May-04 13:19 
GeneralRe: C#'s sprintf Pin
Heath Stewart19-May-04 13:24
protectorHeath Stewart19-May-04 13:24 
GeneralRe: C#'s sprintf Pin
ABean19-May-04 13:26
ABean19-May-04 13:26 
GeneralRe: C#'s sprintf Pin
ABean19-May-04 13:25
ABean19-May-04 13:25 
GeneralRe: C#'s sprintf Pin
Heath Stewart19-May-04 13:32
protectorHeath Stewart19-May-04 13:32 
GeneralRe: C#'s sprintf Pin
ABean19-May-04 13:46
ABean19-May-04 13:46 
GeneralMysterious behaviour (freezing) Pin
GuntherR19-May-04 12:40
GuntherR19-May-04 12:40 
GeneralRe: Mysterious behaviour (freezing) Pin
je_gonzalez19-May-04 18:02
je_gonzalez19-May-04 18:02 
GeneralRe: Mysterious behaviour (freezing) Pin
GuntherR20-May-04 3:43
GuntherR20-May-04 3:43 
GeneralDllImport specification Pin
Colin Angus Mackay19-May-04 11:59
Colin Angus Mackay19-May-04 11:59 
GeneralRe: DllImport specification Pin
David M. Kean19-May-04 12:41
David M. Kean19-May-04 12:41 
GeneralRe: DllImport specification Pin
Heath Stewart19-May-04 13:25
protectorHeath Stewart19-May-04 13:25 
GeneralRe: DllImport specification Pin
David M. Kean19-May-04 16:11
David M. Kean19-May-04 16:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.