Announcement

Collapse
No announcement yet.

NotifyIcon on Windows Mobile Platform

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • NotifyIcon on Windows Mobile Platform

    Hi there,

    in a few forums I read that your can use System.Windows.Forms.NotifyIcon class (.Net) to add a tray icon for an application.
    Now I want to write a application for Windows Mobile which is using such a NotifyIcon so it can minimized to this icon.

    I use Visual Studio 2005 to write this application, but in the toolbox I not found this Class. The try to import such a class failed, because this class where not found.
    If I write a Windows32 application the I can find the NotifyIcon class in the Toolbox.

    On MSDN (http://msdn.microsoft.com/en-us/libr...on(VS.80).aspx) I read that NotifyIcon class is also available for Windows Mobile for Pocket PC. But I not get it.

    Has anyone an example or instructions what I have to do?

    Thanks,

    Jan

  • #2
    Hallo,

    es befindet sich standardmäßig unter "Alle Windows Forms".

    Wenns auch dort nicht ist kannst du es per Code der Form hinzufügen:
    [highlight=vbnet]
    Imports System.Windows.Forms

    Namespace WindowsFormsApplication1
    Public Partial Class Form1
    Inherits Form
    Private MyNotifyIcon As System.Windows.Forms.NotifyIcon

    Public Sub New()
    InitializeComponent()

    MyNotifyIcon = New NotifyIcon(Me.components)
    End Sub
    End Class
    End Namespace
    [/highlight]

    mfG Gü
    "Any fool can write code that a computer can understand. Good programmers write code that humans can understand". - Martin Fowler

    Comment


    • #3
      Zunächst mal danke für deine Antwort, gfoidl.

      Jedoch kann ich die Klasse nicht verwenden. Ich habe

      Code:
      import System.Windows.Forms
      eingefügt und möchte eine private Variable mit

      Code:
      Private myni As System.Windows.Forms.
      erzeugen. Bei der Vorschlagsliste ist jedoch die Klasse NotifyIcon nicht mit dabei.

      Muss ich evtl. noch einen Verweis hinzufügen? Ich finde nur eine Klasse Notification. Diese hat zwar auch ein Symbol, hängt sich aber erstens in die Startleiste und zweitens kann ich einen Klick auf dieses Icon nicht abfangen, um mein Fenster wieder herzustellen.

      Comment


      • #4
        Hi,

        mobile Anwendungen sind nicht mein Fachgebiet, aber ich nehme die laufen mit dem Compact Framework.

        Interessant beim NotifyIcon ist dass in der MSDN für Framework (in Folge mit FX abgekürzt) 2.0 Mobile bei den Plattformen steht, bei FX 3.5 jedoch nicht mehr.

        Entscheidender als die Plattform sind jedoch die Versionsinformationen. Diese sind jeweils für FX, Compact FX, ... unterteilt.

        Beim Notify-Icon sehe ich keine Info für das Compact FX. D.h. dort gibt es das nicht.

        Ich kann mich aber irren.

        Alternative(n):
        http://msdn.microsoft.com/en-us/library/aa446525.aspx
        http://www.microsoft.com/downloads/d...displaylang=en

        mfG Gü
        "Any fool can write code that a computer can understand. Good programmers write code that humans can understand". - Martin Fowler

        Comment

        Working...
        X