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
E

Eitsop

@Eitsop
About
Posts
7
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Socket listening
    E Eitsop

    Err... The line that goes:

    data = System.Text.Encoding.ASCII.GetString(bytes, 0, i);

    Should you appending? i.e.

    data += System.Text.Encoding.ASCII.GetString(bytes, 0, i);

    It is that simple, just adding the data += instead of data = ?

    - Eitsop What we do not understand we do not possess. - Goethe.

    C# tutorial question

  • XmlSerialier reflection error ??
    E Eitsop

    I have tried out this code. This ignores the button altogether and seems to work just fine:

    using System;
    using System.IO;
    using System.Xml.Serialization;
    using System.Windows.Forms;

    namespace SerialTest
    {
    // This is the class that will be serialized.
    public class Group
    {
    [XmlIgnoreAttribute]
    public System.Windows.Forms.Button myButton;

    // a group name or something
    public string GroupName;
    
    // a comment of some sort...
    public string Comment;
    
    public void SerializeObject(string filename)
    {
    // Create an XmlSerializer instance.
    XmlSerializer xSer = new XmlSerializer(typeof(Group));
    
    // Writing the file requires a TextWriter.
    TextWriter writer = new StreamWriter(filename);
    
    // Serialize the object and close the TextWriter.
    xSer.Serialize(writer, this);
    writer.Close();
    }
    

    }
    }

    To run this the example I used was a form with a button and the following code on the OnClick event:

    Group a = new Group();
    a.Comment="A sample comment";
    a.GroupName="A sample group name";
    a.myButton = this.button1;
    a.SerializeObject("c:\\test.xml");

    That worked.

    - Eitsop What we do not understand we do not possess. - Goethe.

    C# help data-structures tutorial question career

  • XmlSerialier reflection error ??
    E Eitsop

    When you say XmlIgnore, do you mean that you have applied the XmlIgnoreAttribute? i.e.

    /* This field will be ignored when serialized--
    unless it's overridden. */
    [XmlIgnoreAttribute]
    public string Comment;

    - Eitsop What we do not understand we do not possess. - Goethe.

    C# help data-structures tutorial question career

  • uploaf files using desktop applications
    E Eitsop

    Have you looked at the response a file browse sends? You'll probably have to POST a response. If you're using the .Net Web name space you should be able to use the WebClient.Upload file method. You may need to set various other fields as well before uploading the file.

    - Eitsop What we do not understand we do not possess. - Goethe.

    C# question com security

  • DataGridView initialisation
    E Eitsop

    Have you tried using the .Select and .SetFocus on the Load event?

    - Eitsop What we do not understand we do not possess. - Goethe.

    C# css question

  • File transfer on LAN..........
    E Eitsop

    The simplest method would probably be to do something like: File.Copy("\\\\pc1\\c$\\textfile1.txt", "\\\\server1\\backup$\\pc1textfile.txt"> Where pc1 is source pc and server1 is the server name. You might need to enumerate a few folders or files to determine if they exist. Good starting points are: File.Exists, Directory.GetFiles and Directory.GetSubFolders. Any help? Eitsop

    C# csharp sysadmin help question

  • Simple custom ownerdraw button
    E Eitsop

    babbelfisken wrote:

    protected void override OnPaint(PaintEventArgs ev) { // code } }

    You'll be wanting to look at ev.Graphics - the Graphics object. This will allow you to manually draw the button. For example: ev.Graphics.DrawRectangle(Pens.Black, this.ClientRectangle); But it gets more complex - double buffering, multiple states (enabled, disabled etc..). Is that a good starting point? Eitsop

    C# question help
  • Login

  • Don't have an account? Register

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