Click here to Skip to main content
15,942,756 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to implement a timer in Windows Service correctly? Pin
Luc Pattyn15-Jul-09 6:26
sitebuilderLuc Pattyn15-Jul-09 6:26 
GeneralRe: How to implement a timer in Windows Service correctly? Pin
astv15-Jul-09 10:43
astv15-Jul-09 10:43 
GeneralRe: How to implement a timer in Windows Service correctly? Pin
Paladin200015-Jul-09 6:27
Paladin200015-Jul-09 6:27 
GeneralRe: How to implement a timer in Windows Service correctly? Pin
astv15-Jul-09 10:45
astv15-Jul-09 10:45 
AnswerRe: How to implement a timer in Windows Service correctly? Pin
dan!sh 15-Jul-09 6:28
professional dan!sh 15-Jul-09 6:28 
QuestionOutlook newitem event issue [modified] Pin
ghoster00715-Jul-09 5:06
ghoster00715-Jul-09 5:06 
AnswerRe: Outlook newitem event issue Pin
Luc Pattyn15-Jul-09 6:19
sitebuilderLuc Pattyn15-Jul-09 6:19 
GeneralRe: Outlook newitem event issue Pin
ghoster00715-Jul-09 7:00
ghoster00715-Jul-09 7:00 
Hello,

Declaration of the objects to the itemAdd event are
private Microsoft.Office.Interop.Outlook.Application outlookapp = new Microsoft.Office.Interop.Outlook.Application();
     private Microsoft.Office.Interop.Outlook.MAPIFolder oinbox = null;
     private Microsoft.Office.Interop.Outlook.MAPIFolder helpdesk = null;
     private Microsoft.Office.Interop.Outlook.MAPIFolder omessages = null;


For the code that causes it to execute, correct me if im wrong, the ItemAddEventHander that executes the Items_ItemAdd function
oinbox = mapi.Folders[helpdeskcount];
             helpdesk = oinbox.Folders["Inbox"];

             helpdesk.Items.ItemAdd += new ItemsEvents_ItemAddEventHandler(Items_ItemAdd);//


1.
You're right I'm not using the invoke for the tbl_incidents_BLL constructor or the loadallunassigned. Ill have to try adding that in the loadunassigned function. Also I did add InvokeRequired pattern to Items_ItemAdd function so all subactions are served.

2.
Heh yeah i've been trying add try-catches everywhere but haven't gotten any yet. Also the form that im having trouble on isn't the main form. It's called when an administrator opens it. I should have said about that earlier. I just added the try-catch and ran the program. Same problem and no error, but im weak on try-catch scope, if there's an error anywhere on the administrator_form would this try-catch show it or not b/c of threading?

    public partial class Form1 : Form<br />
    {<br />
        public tbl_administrators_BLL logged_in_admin = null;<br />
        private Form administrator_form = null;<br />
        public Form1()<br />
        {<br />
            InitializeComponent();<br />
        }<br />
<br />
        private void Form1_Load(object sender, EventArgs e)<br />
        {<br />
            try<br />
            {<br />
                logged_in_admin = new tbl_administrators_BLL();<br />
                logged_in_admin.loadtoclass(System.Environment.UserName);<br />
                if (logged_in_admin.getid() == -1)<br />
                {<br />
                    this.WindowState = FormWindowState.Minimized;<br />
                    Form user_form = new User();<br />
                    user_form.Show();<br />
                    //MessageBox.Show("You are not an administrator");<br />
                    // this.Close();<br />
                }<br />
                else<br />
                {<br />
<br />
                    this.WindowState = FormWindowState.Minimized;<br />
                    administrator_form = new Administrator();<br />
                    administrator_form.Show();<br />
                }<br />
                this.Hide();<br />
                this.Visible = false;<br />
            }<br />
            catch (System.Exception ex)<br />
            {<br />
                MessageBox.Show(ex.ToString());<br />
            }<br />
        }<br />
    }


thanks
GeneralRe: Outlook newitem event issue Pin
Luc Pattyn15-Jul-09 7:08
sitebuilderLuc Pattyn15-Jul-09 7:08 
GeneralRe: Outlook newitem event issue Pin
ghoster00715-Jul-09 9:08
ghoster00715-Jul-09 9:08 
QuestionUse of GC.SuppressFinalize in ref counted objects Pin
molesworth15-Jul-09 4:55
molesworth15-Jul-09 4:55 
QuestionCreating four dimensional control Pin
gwithey15-Jul-09 4:32
gwithey15-Jul-09 4:32 
AnswerRe: Creating four dimensional control Pin
OriginalGriff15-Jul-09 4:49
mveOriginalGriff15-Jul-09 4:49 
GeneralRe: Creating four dimensional control Pin
gwithey15-Jul-09 4:54
gwithey15-Jul-09 4:54 
GeneralRe: Creating four dimensional control Pin
molesworth15-Jul-09 5:12
molesworth15-Jul-09 5:12 
GeneralRe: Creating four dimensional control Pin
OriginalGriff15-Jul-09 5:26
mveOriginalGriff15-Jul-09 5:26 
GeneralRe: Creating four dimensional control Pin
molesworth15-Jul-09 6:13
molesworth15-Jul-09 6:13 
GeneralRe: Creating four dimensional control Pin
OriginalGriff15-Jul-09 8:13
mveOriginalGriff15-Jul-09 8:13 
QuestionHow to get the control property 'Handle' and 'Name' Pin
Durchleuchter15-Jul-09 4:12
Durchleuchter15-Jul-09 4:12 
AnswerRe: How to get the control property 'Handle' and 'Name' Pin
Dave Kreskowiak15-Jul-09 5:22
mveDave Kreskowiak15-Jul-09 5:22 
QuestionConvert HTML to RTF Pin
Sebastian T Xavier15-Jul-09 3:40
Sebastian T Xavier15-Jul-09 3:40 
AnswerRe: Convert HTML to RTF Pin
Christian Graus15-Jul-09 3:42
protectorChristian Graus15-Jul-09 3:42 
AnswerRe: Convert HTML to RTF Pin
Alan Balkany15-Jul-09 3:51
Alan Balkany15-Jul-09 3:51 
GeneralRe: Convert HTML to RTF Pin
Nagy Vilmos15-Jul-09 3:54
professionalNagy Vilmos15-Jul-09 3:54 
GeneralRe: Convert HTML to RTF Pin
Sebastian T Xavier15-Jul-09 4:02
Sebastian T Xavier15-Jul-09 4:02 

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.