![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Newbie
Join Date: Dec 2006
Posts: 9
Rep Power: 0
![]() |
|
|
|
|
|
|
#12 |
|
Newbie
Join Date: Dec 2006
Posts: 9
Rep Power: 0
![]() |
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)
{
}
}
} |
|
|
|
|
|
#13 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4
![]() |
|
|
|
|
|
|
#14 | ||
|
Programming Guru
![]() ![]() ![]() |
Quote:
private void notifyIcon1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
Show();
WindowState = FormWindowState.Normal;
}Quote:
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." |
||
|
|
|
|
|
#15 |
|
Professional Programmer
|
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |