Click here to Skip to main content
15,909,199 members
Home / Discussions / C#
   

C#

 
AnswerRe: checkbox problem Pin
KaptinKrunch22-Sep-05 4:29
KaptinKrunch22-Sep-05 4:29 
GeneralRe: checkbox problem Pin
Mridang Agarwalla22-Sep-05 4:43
Mridang Agarwalla22-Sep-05 4:43 
GeneralRe: checkbox problem Pin
Guffa22-Sep-05 6:16
Guffa22-Sep-05 6:16 
Questionhelp in this program Pin
dhol22-Sep-05 3:02
dhol22-Sep-05 3:02 
AnswerRe: help in this program Pin
KaptinKrunch22-Sep-05 3:50
KaptinKrunch22-Sep-05 3:50 
Questioncontextmenu Pin
PHDENG8122-Sep-05 2:54
PHDENG8122-Sep-05 2:54 
QuestionGet Primary Display Driver information Pin
pkonaje22-Sep-05 2:33
pkonaje22-Sep-05 2:33 
Questionnotifyicon balloon Pin
g00fyman22-Sep-05 2:19
g00fyman22-Sep-05 2:19 
hi to all,

i am trying to create a balloon for my notifyicon, i have gleaned this from CP tutorial but i can get it going, can anyone help please ?

<br />
private void SMSEventLog_EntryWritten(object sender, EntryWrittenEventArgs e)<br />
    {      <br />
      ShowNotifyBalloon(NotifyFlags.Info, "SMS Event Monitor", "some sample text", NotifyInfoFlags.Error);<br />
    }<br />
<br />
<br />
    private enum NotifyFlags {Message=0x01, Icon=0x02, Tip=0x04, Info=0x10, State=0x08}<br />
    private enum NotifyInfoFlags {Error=0x03, Info=0x01, None=0x00, Warning=0x02}<br />
    private enum NotifyCommand {Add=0x00, Delete=0x02, Modify=0x01}<br />
    private enum NotifyState {Hidden=0x01}<br />
    <br />
    [StructLayout(LayoutKind.Sequential)] <br />
    private struct NotifyIconData<br />
    {<br />
      public System.UInt32 cbSize; // DWORD<br />
      public System.IntPtr hWnd; // HWND<br />
      public System.UInt32 uID; // UINT<br />
      public NotifyFlags uFlags; // UINT<br />
      public System.UInt32 uCallbackMessage; // UINT<br />
      public System.IntPtr hIcon; // HICON<br />
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)]<br />
      public System.String szTip; // char[128]<br />
      public NotifyState dwState; // DWORD<br />
      public NotifyState dwStateMask; // DWORD<br />
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst=256)]<br />
      public System.String szInfo; // char[256]<br />
      public System.Int32 dwTimeoutOrVersion; // UINT<br />
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)]<br />
      public System.String szInfoTitle; // char[64]<br />
      public NotifyInfoFlags dwInfoFlags; // DWORD<br />
    }<br />
<br />
    [DllImport("shell32.Dll")]<br />
    private static extern System.Int32 Shell_NotifyIcon(NotifyCommand cmd, ref NotifyIconData data);<br />
<br />
    //private static NotifyIconTarget m_messageSink = new NotifyIconTarget();<br />
    private uint m_id = 0;<br />
    <br />
    private void ShowNotifyBalloon(NotifyFlags flags, string title, string text, NotifyInfoFlags infoFlags)<br />
    {<br />
      NotifyIconData data = new NotifyIconData();<br />
      <br />
      data.cbSize = (uint)Marshal.SizeOf(data);      	<br />
      //data.hWnd = m_messageSink.Handle;<br />
      data.uID = m_id;        <br />
      data.uFlags = flags;<br />
      data.szInfoTitle = title;<br />
      data.szInfo = text;<br />
      data.dwInfoFlags = infoFlags;<br />
<br />
      Shell_NotifyIcon(NotifyCommand.Modify, ref data);<br />
    }<br />


it doesnt show the balloon

kind regards,
g00fy
Answerall fixed Pin
g00fyman22-Sep-05 3:30
g00fyman22-Sep-05 3:30 
QuestionIncremental search Pin
Satish3222-Sep-05 2:14
Satish3222-Sep-05 2:14 
QuestionDELEDTING DATABASE through C# asp.net program ,ms sql database Pin
EKJDBA22-Sep-05 1:50
EKJDBA22-Sep-05 1:50 
AnswerRe: DELEDTING DATABASE through C# asp.net program ,ms sql database Pin
Colin Angus Mackay22-Sep-05 2:24
Colin Angus Mackay22-Sep-05 2:24 
Questioncan't load ruleml into dataset Pin
pramod.21c22-Sep-05 1:40
pramod.21c22-Sep-05 1:40 
AnswerRe: can't load ruleml into dataset Pin
Dave Kreskowiak22-Sep-05 5:24
mveDave Kreskowiak22-Sep-05 5:24 
QuestionCheck if user has admin rights Pin
Stefan_ Spenz22-Sep-05 1:24
Stefan_ Spenz22-Sep-05 1:24 
QuestionExplain DataSet.AcceptChanges and DataAdapter.Update methods. Pin
webC#22-Sep-05 1:17
webC#22-Sep-05 1:17 
AnswerRe: Explain DataSet.AcceptChanges and DataAdapter.Update methods. Pin
Ming Luo22-Sep-05 2:01
Ming Luo22-Sep-05 2:01 
AnswerRe: Explain DataSet.AcceptChanges and DataAdapter.Update methods. Pin
kundan.apiit15-Apr-12 4:19
kundan.apiit15-Apr-12 4:19 
QuestionLockout Pin
mikica1722-Sep-05 1:17
mikica1722-Sep-05 1:17 
AnswerRe: Lockout Pin
Guffa22-Sep-05 1:36
Guffa22-Sep-05 1:36 
GeneralRe: Lockout Pin
mikica1722-Sep-05 2:09
mikica1722-Sep-05 2:09 
GeneralRe: Lockout Pin
Guffa22-Sep-05 9:31
Guffa22-Sep-05 9:31 
QuestionInvoke without properties Pin
Yoyosch22-Sep-05 0:04
Yoyosch22-Sep-05 0:04 
AnswerRe: Invoke without properties Pin
Guffa22-Sep-05 1:04
Guffa22-Sep-05 1:04 
AnswerRe: Invoke without properties Pin
Yoyosch22-Sep-05 1:53
Yoyosch22-Sep-05 1:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.