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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

Schnemar

@Schnemar
About
Posts
9
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DAO in VC++ not working.
    S Schnemar

    Hi, I had the same problem with "Unrecognized database format" and I solved it like this: In InitInstance() of my App-Class I put the follwing line: AfxGetModuleState()->m_dwVersion = 0x0601; That was it. For further Information see the follwing Article on MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmsj00/html/cpp0100.asp I hope that helps you. MS

    C / C++ / MFC c++ help database windows-admin

  • Easy question, but im stuck. :)
    S Schnemar

    try this one: CString strTemp = "Hello World"; BYTE* pByte = (BYTE*) (LPCTSTR) strTemp; MS

    C / C++ / MFC question help

  • FTP Upload and Download
    S Schnemar

    I found a sample code here: http://home.wi.rr.com/skulkarni/FTP/FTPIndex.html rgrds Martin

    C# help question

  • textbox and button
    S Schnemar

    I'm sorry, but I can't help you in this case. On my new Computer is only Win XP Home Edition installed. The Home Edition has no IIS, and without IIS i can't create Web-App's. I planed to Upgrade to Prof. Edition but the 'Update' isn't cheap !! So I hope that you can get help from another !! Rgrds Martin X|

    C# learning csharp question

  • textbox and button
    S Schnemar

    try this one: private void Button1_Click(object sender, System.EventArgs e) { if(TextBox1.Text.Length == 0) Button1.Text = "Hello"; } or set the Enabled-Property of the Button to false at startup and override the TextChange Property of your TextBox maybe like this: private void TextBox1_TextChanged(object sender, System.EventArgs e) { if(this.TextBox1.Text.Length > 0) { this.Button1.Text = "Click me"; this.Button1.Enabled = true; } else { this.Button1.Text = "Hello"; this.Button1.Enabled = false; } } rgrds :)Martin

    C# learning csharp question

  • ProgressBar (Colors)
    S Schnemar

    Hi there, is it possible to change the Back- and ForeGround Color of a ProgressBar-Control ??? The Property BackColor f.e. is not shown in DropDown List but in Help File the Properties BackColor and ForeColor are shown however with Descrition "Overridden. See Control.BackColor.". any Idea ?? thanks in advance :confused: Martin

    C# help question

  • Show ContextMenu in Node
    S Schnemar

    put a ContextMenu on your Form private System.Windows.Forms.ContextMenu contextMenu; Example: (I used a Treeview (treeview) with 3 Nodes, every Node has one SubNode and my ContextMenu has two MenuItem's) Declare two Menu-Items for the ContextMenu: private MenuItem contextMenuItem1 = new MenuItem(); private MenuItem contextMenuItem2 = new MenuItem(); Add the following Code to your Constructor: //Initialize Context-Menu this.treeView.ContextMenu = this.contextMenu; contextMenuItem1.Text = "Action 1"; contextMenuItem2.Text = "Action 2"; this.contextMenu.MenuItems.Add(0,contextMenuItem1); this.contextMenu.MenuItems.Add(1,contextMenuItem2); contextMenuItem1.Click += new System.EventHandler(this.contextMenu_Action_1); contextMenuItem2.Click += new System.EventHandler(this.contextMenu_Action_2); Override the MouseDown Event from your Treeview Control: private void treeView_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if(e.Button != MouseButtons.Right) return; this.contextMenuItem1.Text = "Action 1"; this.contextMenuItem2.Text = "Action 2"; TreeNode selectedTreeNode = this.treeView.GetNodeAt(new Point(e.X,e.Y)); if(selectedTreeNode != null) { this.contextMenuItem1.Text = "Action 1 (Selected Node = " + selectedTreeNode.Text + ")"; this.contextMenuItem2.Text = "Action 2 (Selected Node = " + selectedTreeNode.Text + ")"; } } Implement the Funktions for the Eventhandler: private void contextMenu_Action_1(object sender, System.EventArgs e) { if(this.contextMenuItem1.Text == "Action 1") MessageBox.Show("Action 1 fired for Treeview"); else MessageBox.Show("Action 1 fired for selected Node in Treeview"); } private void contextMenu_Action_2(object sender, System.EventArgs e) { if(this.contextMenuItem2.Text == "Action 2") MessageBox.Show("Action 2 fired for Treeview"); else MessageBox.Show("Action 2 fired for selected Node in Treeview"); } I Hope this was helpfully for you. rgrds:) Martin

    C# help question

  • Selecting from listbox with right mouse button
    S Schnemar

    override the MouseDown Event from the ListBox Control: private void listBox_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if(e.Button != MouseButtons.Right) return; int nIndex = listBox.IndexFromPoint(new Point(e.X,e.Y)); if(nIndex != -1) listBox.SetSelected(nIndex,true); } Rgrds Martin

    C# question

  • How to convert "string" to "int"?
    S Schnemar

    for any conversation i use System.Convert. Example: string str = "555"; int i = System.Convert.ToInt32(str); (also you can use ToInt16(), ToInt64() ...) See System.Convert for additional Information. Rgrds Martin

    C# tutorial question
  • Login

  • Don't have an account? Register

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