User Notification???

I am current using this code below to have the user notification feature. When i run my application, it does not pop up the alert but does show up on the notifications list on the right hand side of the screen when i click on the 3 line on the top right hand corner.

basically i want the alert to appear after the user click on enter after the splash screen.

#If TargetMacOS
  Dim u As New NSUserNotificationMBS
  u.Title = "Hello World"
  u.subtitle = "from Real Studio."
  u.informativeText = "Our first Notification from Real Studio."
  Dim d As New date
  d.Second = d.Second + 30
  u.deliveryDate = d
  Dim c As New NSUserNotificationCenterMBS
  c.scheduleNotification u
#ElseIf TargetWin32

The notification only shows up if your app isn’t in front.

I’ve had fun with this, too, where I wondered why my notification wasn’t showing up.

i read on MBS blog that you need to use some delegate to get it to show up when the application is in front but i have no idea how to do it.

Well, first you may want to keep the objects for notification and the center around.

For the delegate, you subclass NSUserNotificationCenterDelegateMBS and fill the events with code.

do you mean dimming those u and c in the properties instead of in the code??

the sample project in mountain lion does not show the alert if the application is in front. i want it to force show the alert when login into application to show what i need to do today… like reminder when certain thing is due.

Do you return true in shouldPresentNotification event?


where should i call this?

it’s an event you implement as part of your NSUserNotificationCenterDelegateMBS subclass.
There you can decide if a notification should be shown.

thanks… got it working now… next question is what do i need to do if i want to repeat a few notification at one go with slightly different time… or same time…