Click here to Skip to main content
15,899,313 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# Code problem I can't find out Pin
C.CoderCreator16-Sep-10 0:02
C.CoderCreator16-Sep-10 0:02 
GeneralRe: c# Code problem I can't find out Pin
Calla16-Sep-10 0:58
Calla16-Sep-10 0:58 
GeneralRe: c# Code problem I can't find out Pin
C.CoderCreator16-Sep-10 1:00
C.CoderCreator16-Sep-10 1:00 
GeneralRe: c# Code problem I can't find out Pin
Pete O'Hanlon16-Sep-10 1:33
mvePete O'Hanlon16-Sep-10 1:33 
GeneralRe: c# Code problem I can't find out Pin
Calla16-Sep-10 2:56
Calla16-Sep-10 2:56 
GeneralRe: c# Code problem I can't find out Pin
Pete O'Hanlon16-Sep-10 3:10
mvePete O'Hanlon16-Sep-10 3:10 
AnswerRe: c# Code problem I can't find out Pin
Luc Pattyn16-Sep-10 1:05
sitebuilderLuc Pattyn16-Sep-10 1:05 
GeneralRe: c# Code problem I can't find out Pin
C.CoderCreator16-Sep-10 1:08
C.CoderCreator16-Sep-10 1:08 
Its a from, I'll just send you the whole code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;
using Gadgets.Properties;

namespace Gadgets
{
    // What to ADD
    //Sound Effects
    //notfiy icon and context menu has a problem when it closes  it needs to be unchecked
    //if windows are open they must rember thee open from the notifiy icon and the context menu 

    public partial class Form1 : Form
    {

        public const int WM_NCLBUTTONDOWN = 0xA1;
        public const int HTCAPTION = 0x2;
        [DllImportAttribute("user32.dll")]
        public static extern bool ReleaseCapture();
        [DllImportAttribute("user32.dll")]
        public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);

        public Form1()
        {
            InitializeComponent();
            pictureBox2.MouseDown += new MouseEventHandler(p2_MouseDown);

        }
 Time newformtime = new Time();
        Note newNote = new Note();
        Search newSearch = new Search();
        SRLS newSRLS = new SRLS();
        Alarm newAlarm = new Alarm();
        QuickLaunch newQuickLaunch = new QuickLaunch();
        Calender newCalender = new Calender();
       
        private void Form1_Load(object sender, EventArgs e)
        {
            notifyIcon1.Visible = true;


            timeToolStripMenuItem.Checked = Settings.Default.timecheck;
            alarmToolStripMenuItem.Checked = Settings.Default.alarmcheck;
            calenderToolStripMenuItem.Checked = Settings.Default.calendercheck;
            sRLSToolStripMenuItem.Checked = Settings.Default.srlscheck;
            searchToolStripMenuItem.Checked = Settings.Default.searchcheck;
            noteToolStripMenuItem.Checked = Settings.Default.notecheck;
            quickLaunchToolStripMenuItem.Checked = Settings.Default.quickLaunchcheck;


            if (timeToolStripMenuItem.Checked == true)
            {
                newformtime.Show();
            }
            if (alarmToolStripMenuItem.Checked == true)
            {
                newAlarm.Show();
            }
            if (calenderToolStripMenuItem.Checked == true)
            {
                newCalender.Show();
            }
            if (sRLSToolStripMenuItem.Checked == true)
            {
                newSRLS.Show();
            }
            if (searchToolStripMenuItem.Checked == true)
            {
                newSearch.Show();
            }
            if (noteToolStripMenuItem.Checked == true)
            {
                newNote.Show();
            }
            if (quickLaunchToolStripMenuItem.Checked == true)
            {
                newQuickLaunch.Show();
            }


         

        }

        private void p2_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                ReleaseCapture();
                SendMessage(Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
            }
        }

        private void p1_MouseMove(object sender, MouseEventArgs e)
        {
            this.pictureBox1.Image = Properties.Resources.minimize2;
        }

        private void p1_MouseDown(object sender, MouseEventArgs e)
        {
            this.pictureBox1.Image = Properties.Resources.minimize3;
        }

        private void p1_MouseLeave(object sender, EventArgs e)
        {
            this.pictureBox1.Image = Properties.Resources.minimize1;
        }





        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.Visible = false;
        }





        private void copyright_MouseMove(object sender, MouseEventArgs e)
        {
            this.copyright.Image = Properties.Resources.l2;
        }

        private void copyright_MouseLeave(object sender, EventArgs e)
        {
            this.copyright.Image = Properties.Resources.l1;
        }

        private void copyright_MouseDown(object sender, MouseEventArgs e)
        {
            this.copyright.Image = Properties.Resources.l3;
        }

        private void copyright_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("www.systemerror.co.nr");
        }



        Form2 newForm2 = new Form2();
        private void button11_Click(object sender, EventArgs e)
        {
            newForm2.Visible = true;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (newformtime.Visible == true)
            {
                timeToolStripMenuItem.Checked = false;
                newformtime.Visible = false;
            }
            else if (newformtime.Visible == false)
            {
                timeToolStripMenuItem.Checked = true;
                newformtime.Visible = true;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (newCalender.Visible == true)
            {
                calenderToolStripMenuItem.Checked = false;
                newCalender.Visible = false;
            }
            else if (newCalender.Visible == false)
            {
                calenderToolStripMenuItem.Checked = true;
                newCalender.Visible = true;
            }
        }


        private void button3_Click(object sender, EventArgs e)
        {
            if (newAlarm.Visible == true)
            {
                alarmToolStripMenuItem.Checked = false;
                newAlarm.Visible = false;
            }
            else if (newAlarm.Visible == false)
            {
                alarmToolStripMenuItem.Checked = true;
                newAlarm.Visible = true;
            }
        }


        private void button4_Click(object sender, EventArgs e)
        {
            if (newSRLS.Visible == true)
            {
                sRLSToolStripMenuItem.Checked = false;
                newSRLS.Visible = false;
            }
            else if (newSRLS.Visible == false)
            {
                sRLSToolStripMenuItem.Checked = true;
                newSRLS.Visible = true;
            }
        }


        private void button6_Click(object sender, EventArgs e)
        {
            if (newSearch.Visible == true)
            {
                searchToolStripMenuItem.Checked = false;
                newSearch.Visible = false;
            }
            else if (newSearch.Visible == false)
            {
                searchToolStripMenuItem.Checked = true;
                newSearch.Visible = true;
            }
        }


        private void button7_Click(object sender, EventArgs e)
        {
            if (newNote.Visible == true)
            {
                noteToolStripMenuItem.Checked = false;
                newNote.Visible = false;
            }
            else if (newNote.Visible == false)
            {
                noteToolStripMenuItem.Checked = true;
                newNote.Visible = true;
            }
        }


        private void button9_Click(object sender, EventArgs e)
        {
            if (newQuickLaunch.Visible == true)
            {
                quickLaunchToolStripMenuItem.Checked = false;
                newQuickLaunch.Visible = false;
            }
            else if (newQuickLaunch.Visible == false)
            {
                quickLaunchToolStripMenuItem.Checked = true;
                newQuickLaunch.Visible = true;
            }
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {

        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void notifyIcon1_DoubleClick(object sender, EventArgs e)
        {
            this.Show();
        }

        private void timeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ((ToolStripMenuItem)sender).Checked ^= false;


            Settings.Default["timecheck"] = timeToolStripMenuItem.Checked;
            Settings.Default.Save();
        }

        private void calenderToolStripMenuItem_Click(object sender, EventArgs e)
        {

            ((ToolStripMenuItem)sender).Checked ^= false;


            Settings.Default["calendercheck"] = calenderToolStripMenuItem.Checked;
            Settings.Default.Save();
        }

        private void alarmToolStripMenuItem_Click(object sender, EventArgs e)
        {

            ((ToolStripMenuItem)sender).Checked ^= false;


            Settings.Default["alarmcheck"] = alarmToolStripMenuItem.Checked;
            Settings.Default.Save();
        }

        private void sRLSToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ((ToolStripMenuItem)sender).Checked ^= false;


            Settings.Default["srlscheck"] = sRLSToolStripMenuItem.Checked;
            Settings.Default.Save();
        }

        private void searchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ((ToolStripMenuItem)sender).Checked ^= false;


            Settings.Default["searchcheck"] = searchToolStripMenuItem.Checked;
            Settings.Default.Save();
        }

        private void noteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ((ToolStripMenuItem)sender).Checked ^= false;


            Settings.Default["notecheck"] = noteToolStripMenuItem.Checked;
            Settings.Default.Save();
        }

        private void quickLaunchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ((ToolStripMenuItem)sender).Checked ^= false;


            Settings.Default["quickLaunchcheck"] = quickLaunchToolStripMenuItem.Checked;
            Settings.Default.Save();
        }
    }
}

GeneralRe: c# Code problem I can't find out Pin
Luc Pattyn16-Sep-10 1:16
sitebuilderLuc Pattyn16-Sep-10 1:16 
QuestionWhat is the best way to add 'indexer' to class that derived from ConcurrentQueue ? Pin
Yanshof15-Sep-10 23:22
Yanshof15-Sep-10 23:22 
AnswerRe: What is the best way to add 'indexer' to class that derived from ConcurrentQueue ? Pin
Luc Pattyn16-Sep-10 1:12
sitebuilderLuc Pattyn16-Sep-10 1:12 
GeneralRe: What is the best way to add 'indexer' to class that derived from ConcurrentQueue ? Pin
Yanshof16-Sep-10 1:23
Yanshof16-Sep-10 1:23 
GeneralRe: What is the best way to add 'indexer' to class that derived from ConcurrentQueue ? Pin
Luc Pattyn16-Sep-10 2:05
sitebuilderLuc Pattyn16-Sep-10 2:05 
GeneralRe: What is the best way to add 'indexer' to class that derived from ConcurrentQueue ? Pin
Yanshof16-Sep-10 2:55
Yanshof16-Sep-10 2:55 
QuestionBook Help Pin
NaveenHS15-Sep-10 20:55
NaveenHS15-Sep-10 20:55 
AnswerRe: Book Help Pin
Swiftain15-Sep-10 20:58
Swiftain15-Sep-10 20:58 
GeneralRe: Book Help Pin
NaveenHS15-Sep-10 21:09
NaveenHS15-Sep-10 21:09 
GeneralRe: Book Help Pin
N a v a n e e t h15-Sep-10 22:56
N a v a n e e t h15-Sep-10 22:56 
GeneralRe: Book Help Pin
NaveenHS15-Sep-10 23:17
NaveenHS15-Sep-10 23:17 
AnswerRe: Book Help Pin
i.j.russell16-Sep-10 1:14
i.j.russell16-Sep-10 1:14 
AnswerRe: Book Help [modified] Pin
Luc Pattyn16-Sep-10 1:21
sitebuilderLuc Pattyn16-Sep-10 1:21 
QuestionBack with base10, an example code. Hopefully I can exaplain now Pin
stephen.darling15-Sep-10 10:43
stephen.darling15-Sep-10 10:43 
AnswerRe: Back with base10, an example code. Hopefully I can exaplain now Pin
Ennis Ray Lynch, Jr.15-Sep-10 10:53
Ennis Ray Lynch, Jr.15-Sep-10 10:53 
GeneralRe: Back with base10, an example code. Hopefully I can exaplain now Pin
stephen.darling15-Sep-10 11:12
stephen.darling15-Sep-10 11:12 
AnswerMessage Closed Pin
15-Sep-10 22:09
stancrm15-Sep-10 22:09 

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.