Click here to Skip to main content
15,890,123 members
Home / Discussions / C#
   

C#

 
Generalsome int16[ ] arrays: OutOfMemoryException Pin
noizy13-Jun-04 7:39
noizy13-Jun-04 7:39 
GeneralRe: some int16[ ] arrays: OutOfMemoryException Pin
Colin Angus Mackay13-Jun-04 12:52
Colin Angus Mackay13-Jun-04 12:52 
GeneralMenu Images in ContextMenu Pin
gek_at13-Jun-04 7:13
gek_at13-Jun-04 7:13 
GeneralRe: Menu Images in ContextMenu Pin
Mazdak13-Jun-04 7:27
Mazdak13-Jun-04 7:27 
GeneralRe: Menu Images in ContextMenu Pin
gek_at13-Jun-04 7:34
gek_at13-Jun-04 7:34 
GeneralRe: Menu Images in ContextMenu Pin
leppie13-Jun-04 10:20
leppie13-Jun-04 10:20 
GeneralRe: Menu Images in ContextMenu Pin
gek_at13-Jun-04 11:43
gek_at13-Jun-04 11:43 
GeneralRe: Menu Images in ContextMenu Pin
gek_at13-Jun-04 11:59
gek_at13-Jun-04 11:59 
Hi again!

Here's some more sample code that shows the problem (where ImageMenuItem is used):

C#
<br />
using System;<br />
<br />
using System.Windows.Forms;<br />
using System.Drawing;<br />
using System.Reflection;<br />
<br />
<br />
namespace SharpPrivacy.SharpPrivacyTray {<br />
 class MenuTest : System.Windows.Forms.Form {<br />
		<br />
  private NotifyIcon niTrayIcon = new NotifyIcon();<br />
  private ContextMenu cmnuTrayMenu = new ContextMenu();<br />
		<br />
  private ImageMenuItem mnuTest1 = new ImageMenuItem("Test1");<br />
  private MenuItem mnuTest2 = new MenuItem("Test2");<br />
		<br />
  public MenuTest() {<br />
   System.Resources.ResourceManager resources = new System.Resources.ResourceManager("SharpPrivacyTray", Assembly.GetExecutingAssembly()); <br />
			<br />
   Icon iTrayIcon = (System.Drawing.Icon)resources.GetObject("trayIcon");<br />
   this.Icon = iTrayIcon;<br />
   niTrayIcon.Icon = iTrayIcon;<br />
   niTrayIcon.Visible = true;<br />
			<br />
   this.ShowInTaskbar = false;<br />
			<br />
   this.WindowState = FormWindowState.Minimized;			<br />
   this.ResumeLayout(false);<br />
			<br />
   mnuTest1.addIcon(((System.Drawing.Icon)resources.GetObject("menuClipboard")));<br />
			<br />
   cmnuTrayMenu.MenuItems.Add(mnuTest1);<br />
   cmnuTrayMenu.MenuItems.Add(mnuTest2);<br />
   niTrayIcon.ContextMenu = cmnuTrayMenu;<br />
			<br />
			<br />
  }<br />
		<br />
  [STAThread]<br />
  public static void Main(string[] args) {<br />
   Application.Run(new MenuTest());<br />
  }<br />
 }<br />
}<br />


Greetings,
Daniel

---
SharpPrivacy - A free OpenPGP Implementation in c#
http://sharpprivacy.sf.net
GeneralRe: Menu Images in ContextMenu Pin
leppie13-Jun-04 12:19
leppie13-Jun-04 12:19 
GeneralRe: Menu Images in ContextMenu Pin
gek_at13-Jun-04 23:20
gek_at13-Jun-04 23:20 
GeneralRe: Menu Images in ContextMenu Pin
leppie13-Jun-04 12:02
leppie13-Jun-04 12:02 
General&quot;an error occurred while loading the document&quot; Pin
enduro1x13-Jun-04 6:35
enduro1x13-Jun-04 6:35 
GeneralRe: &quot;an error occurred while loading the document&quot; Pin
leppie13-Jun-04 6:59
leppie13-Jun-04 6:59 
GeneralRe: &quot;an error occurred while loading the document&quot; Pin
enduro1x13-Jun-04 7:04
enduro1x13-Jun-04 7:04 
GeneralOemToAnsi in C# Pin
brunoskorepa13-Jun-04 6:24
brunoskorepa13-Jun-04 6:24 
GeneralRe: OemToAnsi in C# Pin
Colin Angus Mackay13-Jun-04 6:27
Colin Angus Mackay13-Jun-04 6:27 
Generalslow performance of C# windows form program Pin
vcorn13-Jun-04 6:05
vcorn13-Jun-04 6:05 
GeneralRe: slow performance of C# windows form program Pin
Colin Angus Mackay13-Jun-04 6:22
Colin Angus Mackay13-Jun-04 6:22 
GeneralRe: slow performance of C# windows form program Pin
vcorn13-Jun-04 7:03
vcorn13-Jun-04 7:03 
Generaldescription and intellisense Pin
amatyasik13-Jun-04 3:29
amatyasik13-Jun-04 3:29 
GeneralRe: description and intellisense Pin
mikker_12313-Jun-04 3:48
mikker_12313-Jun-04 3:48 
GeneralRe: description and intellisense Pin
Stefan Troschuetz13-Jun-04 3:56
Stefan Troschuetz13-Jun-04 3:56 
GeneralRe: description and intellisense Pin
amatyasik13-Jun-04 4:37
amatyasik13-Jun-04 4:37 
GeneralA popup button without border Pin
zlaty12-Jun-04 23:07
zlaty12-Jun-04 23:07 
GeneralRe: A popup button without border Pin
Behzad Ebrahimi13-Jun-04 1:31
Behzad Ebrahimi13-Jun-04 1:31 

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.