Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
AnswerRe: SQL Table Pin
dan!sh 15-Jul-09 6:19
professional dan!sh 15-Jul-09 6:19 
GeneralRe: SQL Table Pin
kibromg15-Jul-09 6:53
kibromg15-Jul-09 6:53 
GeneralRe: SQL Table Pin
kibromg15-Jul-09 7:01
kibromg15-Jul-09 7:01 
GeneralRe: SQL Table Pin
dan!sh 15-Jul-09 7:03
professional dan!sh 15-Jul-09 7:03 
GeneralRe: SQL Table Pin
kibromg15-Jul-09 7:15
kibromg15-Jul-09 7:15 
GeneralRe: SQL Table [modified] Pin
musefan15-Jul-09 8:08
musefan15-Jul-09 8:08 
AnswerRe: SQL Table Pin
Luc Pattyn15-Jul-09 8:24
sitebuilderLuc Pattyn15-Jul-09 8:24 
GeneralRe: SQL Table Pin
musefan15-Jul-09 21:53
musefan15-Jul-09 21:53 
AnswerRe: SQL Table Pin
Pete O'Hanlon15-Jul-09 10:02
mvePete O'Hanlon15-Jul-09 10:02 
GeneralRe: SQL Table Pin
Not Active15-Jul-09 10:10
mentorNot Active15-Jul-09 10:10 
QuestionHow to implement a timer in Windows Service correctly? Pin
astv15-Jul-09 5:16
astv15-Jul-09 5:16 
AnswerRe: How to implement a timer in Windows Service correctly? Pin
DoctorMick15-Jul-09 6:04
DoctorMick15-Jul-09 6:04 
GeneralRe: How to implement a timer in Windows Service correctly? Pin
astv15-Jul-09 6:13
astv15-Jul-09 6:13 
GeneralRe: How to implement a timer in Windows Service correctly? Pin
DoctorMick15-Jul-09 6:26
DoctorMick15-Jul-09 6:26 
GeneralRe: How to implement a timer in Windows Service correctly? Pin
astv15-Jul-09 10:41
astv15-Jul-09 10:41 
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 

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.