Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Schmullus

@Schmullus
About
Posts
9
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Righthand mouse-click to a tree-view should act like a lefthand mouse-click
    S Schmullus

    Hi, I have a treeview in my application and a righthand click on a node should have the same behavior as a lefthand mouseclick. For the lefthand mouseclick I use the eventhandler private void treeViewServer_AfterSelect(object sender, TreeViewEventArgs e) { // my code... } The righthand click should call the same handler. But the eventhandler "click" of the treeview private void treeViewServer_Click(object sender, EventArgs e) { // some code... } provides not the TreeViewEventArgs of the "AfterSelect" Some ideas? Thanx in advance Erik

    C# data-structures question

  • Single intance
    S Schmullus

    Hi, my you use an static variable within the class that counts the instances. namespace ConsoleApplication1 { class TestClass { // static variable public static int instanceCount = 0; // Constructor public TestClass() { instanceCount++; } // Some code // ... } class Program { static void Main(string[] args) { TestClass myTestClass1 = new TestClass(); TestClass myTestClass2 = new TestClass(); Console.WriteLine(TestClass.instanceCount); Console.ReadLine(); } } } You can use the variable 'instanceCount' to restrict the instance generation. Is it that what you're looking for? Regards Erik

    C# csharp help tutorial

  • Change ToolTip-Font
    S Schmullus

    Hi, I try to find a solution for changing the font of a tooltip. I can find no method or property. Any idea? Thanx in advance! Erik

    C# question

  • Remove ToolTip from a special control
    S Schmullus

    Hi, normally, this should work: private void textBox1_TextChanged(object sender, EventArgs e) { toolTip1.SetToolTip(pictureBox1, textBox1.Text); //toolTip1.RemoveAll(); } I created a picturebox named 'pictureBox1' and placed the above code within the text-change eventhandler of my textbox 'textBox1'. Anytime I changed the text the tooltip will be updated. There are no multiple tooltips on the picturebox. Maybe try the method RemoveAll() of toolTip1. Regards Erik

    C# question help

  • How can I have access to an arraylist
    S Schmullus

    Thanks a lot for this detailed information!!

    C# question visual-studio sysadmin help tutorial

  • How can I have access to an arraylist
    S Schmullus

    This works perfect! Thanks a lot:-D

    C# question visual-studio sysadmin help tutorial

  • How can I have access to an arraylist
    S Schmullus

    Hi, I tried MessageBox.Show((ServerInfo)(myServerArrayList[0]).strServerName); but it won't work:confused: 'Object has no definition for strServerName' Erik

    C# question visual-studio sysadmin help tutorial

  • Context menu on a TreeView
    S Schmullus

    Hi, have a look to my example: I created a windows-application with a form and one 'TreeView'-component named treeView1 in my code. The only code is written within the Load-event of the form: private void Form1_Load(object sender, EventArgs e) { ContextMenu myRootContextMenu = new ContextMenu(); myRootContextMenu.MenuItems.Add("Edit Root"); ContextMenu myChild1ContextMenu = new ContextMenu(); myChild1ContextMenu.MenuItems.Add("Edit Child 1"); ContextMenu myChild2ContextMenu = new ContextMenu(); myChild2ContextMenu.MenuItems.Add("Edit Child 2"); **TreeNode rootTreeNode = new TreeNode("Root");** rootTreeNode.ContextMenu = myRootContextMenu; rootTreeNode.Nodes.Add("First Node"); rootTreeNode.Nodes[0].ContextMenu = myChild1ContextMenu; rootTreeNode.Nodes.Add("Second Node"); rootTreeNode.Nodes[1].ContextMenu = myChild2ContextMenu; treeView1.Nodes.Add(rootTreeNode); } I created one root treenode 'rootTreeNode' TreeNode rootTreeNode = new TreeNode("Root"); and added two child nodes: rootTreeNode.Nodes.Add("First Node"); rootTreeNode.Nodes.Add("Second Node"); After that, I added this treenode to the TreeView 'treeView1' of the Form. treeView1.Nodes.Add(rootTreeNode); Now we come to the context-menues: I created one root context-menu, and gave it a description ContextMenu myRootContextMenu = new ContextMenu(); myRootContextMenu.MenuItems.Add("Edit Root"); and with the property 'ContextMenu' of the rootTreeNode rootTreeNode.ContextMenu = myRootContextMenu; I made the assignment. The context-menues for the child nodes are ContextMenu myChild1ContextMenu = new ContextMenu(); myChild1ContextMenu.MenuItems.Add("Edit Child 1"); ContextMenu myChild2ContextMenu = new ContextMenu(); myChild2ContextMenu.MenuItems.Add("Edit Child 2"); and assigned in the same way. Hope this helps a little bit Regards Erik

    C# data-structures help

  • How can I have access to an arraylist
    S Schmullus

    Hi there, I have the following problem: I want to add a variable 'myServerInfo' to an arraylist. This variable is of the datatyp 'ServerInfo' (public class). I can add this variable without any problems to the arraylist with the command: myServerArrayList.Add(myServerInfo); But how can I have access to this through the arraylist? If I type in the following commandline, Intellisense will not provide me the necessary information: Console.WriteLine(myServerArrayList[0].??? I thought I can type in: Console.WriteLine(myServerArrayList[0].strServerName); Console.WriteLine(myServerArrayList[0].strServerIP); Console.WriteLine(myServerArrayList[0].strServerNetMask); My complete code for this example is like: using System; using System.Collections.Generic; using System.Text; using System.Collections; namespace ConsoleApplication1 { public class ServerInfo { public string strServerName; public string strServerIP; public string strServerNetMask; } class Program { static void Main(string[] args) { ArrayList myServerArrayList = new ArrayList(); ServerInfo myServerInfo = new ServerInfo(); myServerInfo.strServerName = "Server 1"; myServerInfo.strServerIP = "192.168.0.1"; myServerInfo.strServerNetMask = "255.255.255.0"; // Add to ArrayList myServerArrayList.Add(myServerInfo); Console.WriteLine(myServerArrayList[0].??? } } } If anybody gives me a hint, I can go on with my project.:) Thanks in advance Erik

    C# question visual-studio sysadmin help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups