Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 21st, 2006, 5:55 PM   #11
RedSKul
Newbie
 
RedSKul's Avatar
 
Join Date: Dec 2006
Posts: 9
Rep Power: 0 RedSKul is on a distinguished road
Quote:
Originally Posted by reggaeton_king View Post
You can also download the Visual C++, C#, or Visual Basic Express Edition for free while you wait. It's basically the same except that the Standard or Professional edition have more features.

Oooh thank you didnt know that getting the C# one now.
RedSKul is offline   Reply With Quote
Old Dec 21st, 2006, 7:06 PM   #12
RedSKul
Newbie
 
RedSKul's Avatar
 
Join Date: Dec 2006
Posts: 9
Rep Power: 0 RedSKul is on a distinguished road
Almost done!

I Got it to delete a file on button press.
I got it to minimize to the tray but*
Goes to the task bar and double clicking on the ICON doesn't do anything.

Cant remember how to do a time function for what I want to do.

Looked up play sound just seems like to much for something this simple and would probably annoy the user.


using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Resize(object sender, System.EventArgs e)
        {
            if (FormWindowState.Minimized == WindowState)
                Hide();
        }
        private void notifyIcon1_MouseDoubleClick(object sender, System.EventArgs e)
        {
            Show();
            WindowState = FormWindowState.Normal;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            File.Delete("C:\\WINDOWS\\.file_store_32\\uid.dat");
        }

        private void timer1_Tick(object sender, EventArgs e)
        {

        }
    }
}
RedSKul is offline   Reply With Quote
Old Dec 22nd, 2006, 3:33 AM   #13
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4 Arevos is on a distinguished road
Quote:
Originally Posted by RedSKul View Post
Cant remember how to do a time function for what I want to do.
You could create a thread, and have it continually loop and check for new files. Or you could look up the FileSystemWatcher class.
Arevos is offline   Reply With Quote
Old Dec 22nd, 2006, 8:34 AM   #14
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Quote:
Goes to the task bar and double clicking on the ICON doesn't do anything.
Try this, click the icon once...
private void notifyIcon1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
    Show();
    WindowState = FormWindowState.Normal;
}
Quote:
Cant remember how to do a time function for what I want to do.
Drag a Timer control to the main form, enable it, then change the interval for the time frame you want.
private void timer1_Tick(object sender, System.EventArgs e)
{
   // Do something at this specific interval 
}

There is probably something better than PlaySound() to use... I'll look around later.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Dec 25th, 2006, 7:15 PM   #15
Prm753
Professional Programmer
 
Prm753's Avatar
 
Join Date: Oct 2005
Location: United States
Posts: 447
Rep Power: 3 Prm753 is on a distinguished road
Send a message via AIM to Prm753 Send a message via MSN to Prm753
You could add the option in the main menu of the program to turn off the "cheerful sound", and you could also let the user select the "cheerful sound" that they want to hear.

Something else that might be good to keep in mind: not everyone has C:\ as their main hard drive. It might be D:\ or K:\, you get the idea. :p What I usually do is check to see what the "%HOMEDRIVE%" variable is set to, and then take that data and append it to my file that I want to access/rename/delete/write to/whatever.
__________________
The world's first athletic computer geek!
The home of PrProgramsStudios
How not to post a question: <-- Please don't reply
Prm753 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting string to float beginnerCCC C 22 Oct 2nd, 2006 11:59 PM
OnlineTextEditor.Com! Sane Show Off Your Open Source Projects 43 Jun 16th, 2006 8:55 AM
After execution - Error cannot locate /Skin File? wchar Visual Basic 1 Mar 5th, 2005 9:04 PM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 4:12 PM
Structure char field to a disk file ehab_aziz2001 C++ 0 Feb 10th, 2005 2:42 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:25 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC