Jump to content
xisto Community

BubbaBeans

Members
  • Content Count

    11
  • Joined

  • Last visited

About BubbaBeans

  • Rank
    Newbie [Level 1]
  • Birthday 01/04/1970

Contact Methods

  • Website URL
    http://

Profile Information

  • Gender
    Male
  • Location
    Redding, CA, USA
  1. Depends on which version of vb you're using. I'm using visual studio 2010... when I delete a file I use File.Delete(Path and name of file) And it takes care of it.
  2. I wrote an alarm program that handles multiple alarms. Each time an alarm is triggered, it plays a different sound.I'm wanting to expand on this, however. I'd like to register my program with Windows so it shows up in the Sounds and Audio Device Properties window so the user can change the alarm sounds to whatever they'd like.Then, obviously, I want the program to play those sounds when appropriate. I know how to play sounds with vb.net, that isn't the issue. My question is whether there is a way for my program to raise an event that will automatically play the appropriate sound. Or would it be easier to simply read the information stored in the registry, and have my program play that sound?I've tried reading from the registry and I'm apparently not reading it correctly. I created subkeys in the registry on my computer already to test this out.HKEY_CURRENT_USER\AppEvents\Apps\DANotifierIt has 4 subkeys named 1 Hour, 12 Hours, 24 Hours, and After Hours.Each of those have 2 subkeys named .current and .defaultHow can I read ".current" ?Or, again, is there a way to have my program raise an event so Windows automatically plays the correct sound?
  3. I just realize that I posted this in the wrong group!!! This should be in the .net programming area!!! Sorry!!!!
  4. I've recoded the alarm to use a combined datetime instead of two variables. Here is the function I use to test whether the alarm should be raised: PublicFunction CheckAlarm(ByVal TestDatTim AsDate, ByVal Notify AsInteger) AsBoolean 'This returns a True of False only Const ChkFmt AsString = "MM/dd/yyyy HH:mm" 'The format I will be using to compare the date and times CheckAlarm = (CStr(Format(CDate(DateAdd(DateInterval.Minute, Notify, Now())), ChkFmt)) >= CStr(Format(CDate(TestDatTim), ChkFmt))) 'Add Notify minutes to current date and time, then compare to the TestDatTim, and return True or False EndFunction I'm sure there is an easier way to do this, but let me walk you through everything. "TestDatTim" is a Date variable that holds the date and time of the alarm that is passed to the funtion. "Notify" is a variable that holds the number of minutes before the event that you would like to raise the alarm. (For example: Notify=15 would raise the alarm 15 minutes early, Notify=30 would raise the alarm 30 minutes early.) The only reason I have a Constant in this function is to make it easier on myself. I wanted to try out some different date/time formats to see how they would affect the function. By doing it this way I didn't have to retype the new format twice. All this function does it takes the current date and time (using Now() ) and adds the "Notify" number of minutes. It takes that and converts it to a string, then does the same thing to the "TestDatTim" and compares the two. If the current time plus the "Notify" number of minutes is >= the TestDatTim, the function returns as TRUE. The rest of my program then deals with sending the appropriate message, playing the appropriate alert sound, and deactivating this alarm so it won't sound again. And, yes, for you vb.net purists, I am using the old vb6 CStr() instead of the newer vb.net version. Sorry, I'm an old-school programmer!
  5. I wrote an application that uses different sounds for various alarms. ?I've managed to create the appropriate keys in the registry so that my program shows up in sound settings, allowing the user to change the sounds from Windows' control panel.Now for my BIGGEST problem... ?I don't know how to get those sounds to play! ?I'm trying to read the values out of the registry keys, but I keep coming up with nothing, rather than the value stored in the key. ?HELP?!?!?!(Sound names are stored in HKEY_CURRENT_USER\AppEvents\Schemes\Apps\DANotifier\ while the keys for the various alarms are 1 Hour, 12 Hours, 24 Hours, and After Hours. ?Each key has a .default and .current underneath. ?I'm trying to read .current)
  6. Well, it wasn't as difficult as I thought! After doing just a LITTLE digging, the answer presented itself. This code is placed with the form that has the notifyicon (NotifyIcon1) attached PublicSub BalloonClosed(ByVal sender AsObject, ByVal e As System.EventArgs) Handles NotifyIcon1.BalloonTipClosed ****** Code you want to execute when the balloontip is closed, either by using the close button, or it times out ****** Note: You can test to see HOW the balloontip was closed EndSub That's it
  7. Well, it's actually an interesting little trick. I had a similar problem, and it's caused by your netcom giving out only ONE IP address for your entire home network. What you need to do is get into the WRT54G and set it up as your DHCP server. Since I'm not in front of mine I can't give you the exact instructions. But... Start by plugging your computer directly into your modem and turn it on. Once you have it up and running, click Start, then Run, and type CMD and hit enter. Once a command window is open, type ipconfig and hit enter. You'll get a bunch of stuff. There is one thing to write down. 1) IP Address. This is the IP address given to your computer by your modem. Since you're done with that, type EXIT Now, shut down the computer, disconnect the modem, and plug the computer into one of the four LAN ports on the back of your WRT54G. DO NOT PLUG IT INTO THE WAN PORT, which is the one on the far left if you're looking at the back of the Linksys. Plug in the Linksys, then start up the computer. Once it is started up, go to your web browser. In the address bar type http://forums.xisto.com/no_longer_exists/ and it will bring up a small window asking for a user name and password. Forget the user name, since it is blank by default. Go to the password and type in the SUPER-SECRET default password for Linksys routers... admin That should get you into the menu. The page that comes up should have a few text boxes and radio buttons on it. I'd change one or two of them. Rename the router to something meaningful for YOU. But the most important thing you can do is change the Loca IP address. It says 192.168.1.1 in the boxes. Now, take a look at the ip address you wrote down from when you had the computer connected directly to the modem. Type THAT ip address into those boxes, with one small change. The next to the last number. Make it ONE HIGHER than the next to the last number in the IP address you wrote down. For example, if you wrote down 192.168.1.10, the IP address you should put in the boxes is 192.168.2.10 On the next line, make sure the subnet mask is set to 255.255.255.0 Underneath that, on the DHCP Server line, click the radio button next to Enable. Underneath that, you get to tell your WRT54G how to number your new home network. It has only one little text box. I'd enter 100 in it. Last setting to change for you: Maximum number of DHCP users: Keep the number fairly low. This controls how many different computers, game consoles, etc can be connected to your network at one time. I have 15 at home because I have a couple computers, a couple laptops, a couple ipods, and a couple game consoles. I wanted to leave a couple extra just in case a friend or two come over with their own wireless devices and wanted to connect at the same time I am. You can hit the save button at this point. The router will go through a long reset process. At that point you SHOULD be able to turn everything off and plug your modem into the WAN port. Powering everything back up should have you in business. But I'd set up some network security... and I'll leave that for someone else to talk about. Oh... DEFINITELY go through the settings on the Linksys and change the default username and password. I hope this makes sense, and I hope this helps.
  8. I asked a question earlier concerning creating an alarm in vb6. I converted it over to vb2008 and it is MUCH NICER! Everything minimizes to an icon in the system tray, and sits there using a timer to check for an alarm a couple times a minute. When an alarm is triggered, a balloontip pops up with information in it, and the program takes a public boolean variable, ActiveAlarm, and set is to true. As long as ActiveAlarm is true, the program won't change the information in the balloontip, even if another alarm event occurs.So here's my question: How can I get the program to recognize when the balloontip is closed? Once it is, I will simply have the program set ActiveAlarm to false, and the notifications return to normal. But I can't quite figure out how to recognize the status of the balloontip.
  9. Right after I posted my update I realized that the situation you mentioned could be a problem. I rewrite the code to create a function called CheckAlarm, which returns a simple boolean. The entire function basically says:CheckAlarm = (CDate(TestDate & " " & TestTime) <= CDate(DateAdd(DateInterval.Hour, Notifier(Notify), Now()))) Where the array Notifier() holds the number of hours ahead of time that I want the alarm to be raised. (Each alarm has a boolean variable attached to it that is set to false once the alarm is displayed, so that keeps multiple versions of the exact same alarm appearing over and over. I forgot to include that the first time I ran the program. Wow, was it annoying!!!) The alarm itself is a balloontip that pops up and gives various information based on the alarm itself. And I have a question about that, but I'll start another thread to keep it separate.
  10. Well... I'm moving my program to VB2008. I got tired of messing with the code to show/hide the system tray icon, bringing a form up to show alerts, etc. All of that is much easier with VB2008.
  11. I've looked through lots of "alarm clock" code, and I'm still having some difficulty with what I'm attempting to do. I'm hoping someone can help!I am writing a small notification program that sits in the system tray. Using a timer, once a minute I need it to check an array of dates and times. So far so easy... But I need one notification to show up an hour before the date and time, one to show up 12 hours prior to the date and time, and one notification to show up 24 hours prior. I can't seem to get it to work.For the three notifications I have an array that holds the number of minutes before the date and time that I want each notification to show. (For example, the array holds 60, 720, 1440 for 1 hour, 6 hours, and 24 hours respectively.) So the clunky code I'm trying to use to test is this: (btw, TstDatTim is a DATE that holds the Date and Time for the alarm)For n = 0 to 2 'For the 3 notices, held in array Notice()If (FormatDateTime(DateAdd("n", Notices(n), Now())) = FormatDateTime(TstDatTim)) Then ** on with the code that raises the alarmI hope you can understand my weird code. I'm sure there must be an easier and better way using DateDiff, but I'm not sure. That's why I'm here!!!
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.