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

Samuel Cherinet

@Samuel Cherinet
About
Posts
17
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Does the timer event run in a new thread?
    S Samuel Cherinet

    hmm... the timer event is triggered with the interval you specified. So as long as you don't disable it after the first event it will keep on executing the code. got nothing to do with threads

    C# question

  • Open With (my App)
    S Samuel Cherinet

    when creating your deployment project,... use the "File Type" Editor to do the association of a file extension to your app, you can configure down to an icon for your files. am not that familiar with WPF, but I can tell you that it does not have to be a console app to pass the args (which will be the file name when you double click on your file type icon). anything that has main entry funtion can be used(i.e windows forms application)

    C# question csharp wpf xml tutorial

  • code for checkbox
    S Samuel Cherinet

    pizzaInfo.IsFavourite =chkIsFavourite.Checked;

    :confused:

    C# help tutorial

  • Triggering an event from another class?
    S Samuel Cherinet

    I assume you are using static Eventhandlers on your Miscfunction ... what you need is another static method that is used to raise the event when ever you want, hope I got your question

    //this goes in your miscfuncition class
    static event EventHandler commonHandler;
    static void raiseCommonHandler(object sender, EventArgs e)
    {
    if (commonHandler != null)
    commonHandler(sender, e);
    }

    //component class
    //to raise the event
    MiscFunction.raiseCommonHandler(new object(),null);

    C# database design help question

  • fixed width text file
    S Samuel Cherinet

    Try this code ...

    FileStream fs = new FileStream("<Full Path FileName>", FileMode.OpenOrCreate);
    StreamWriter sw = new StreamWriter(fs);
    string message = "<TextToWrite>";
    int charcount = 0;
    foreach(char ch in message)
    {
    sw.Write(ch);
    charcount++;
    if (charcount % 80 == 0)
    sw.WriteLine();
    }
    sw.Close();

    C# question csharp

  • where i need to declare my array?
    S Samuel Cherinet

    the button is a server side control, so the page reloads everytime you click it, try using java script for the button.

    C# design data-structures help question learning

  • Arranging more than one image having transparent pixels....
    S Samuel Cherinet

    have you tried this? draw both images on to the same bitmap and display them in a picture box more like this, Bitmap=bmp new Bitmap(100,100); Graphics gr=Graphic.FromImage(bmp); gr.DrawImage(img1,0,0,... gr.DrawImage(img2,0,0,... PictureBox p=new PictureBox(); p.Image=bmp; Might work!!! GoodLuck

    C# csharp announcement

  • How to create folder in remote server
    S Samuel Cherinet

    do you have the network credential to creat a folder there? ... ???

    C# sysadmin help tutorial question

  • finding variables and method names in a source code
    S Samuel Cherinet

    list the possible keywords, and try building a regular expression for them, since every line should end with ";" it might loosen writing the a regular expression for it, but it will be a lil tough. good luck

    C# csharp help question

  • Adding two types into an array?
    S Samuel Cherinet

    try using ArrayList in System.Collection namespace you don't even have to check for a type because this collection stores them as objects for your case ArrayList OriginalValueData=new ArrayList(); for(...) { OriginalValueData.Add(OValue); } I hope that would solve ur probles Good Luck

    C# question windows-admin linux data-structures help

  • Uploading/Download files on a server
    S Samuel Cherinet

    yeah!! you would need a server app to achieve what you are looking for in remoting. it's not at all complicated though, you will have more control over the transer as well among other benifits. I would recommend "Wrox Press-Professional C#" book, Good Luck

    C# database discussion sysadmin performance question

  • Uploading/Download files on a server
    S Samuel Cherinet

    have you tried remoting? that would really help you to write codes to upload and down load files using a file system not the SQL server

    C# database discussion sysadmin performance question

  • DataGridView and DataSets
    S Samuel Cherinet

    what you can do is provide an overload constructor for the second form that takes a datarow as a parameter public Form2(DataRow drow):this() { //fill the data by indexing through all the values this.text1.text=drow["Name"].ToString(); } and as to figuring out which data that has been selected just handle "CellDoubleClick" and/or "RowHeaderMouseDoubleClick" events and then send the datarow selected by using the selected row from the event handler argument. like in this code: private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { new Form2(dataGridView1.Rows[e.RowIndex].DataBoundItem).Show(); } hope this does the trick for you

    C# question database winforms help

  • Datasets and Reports
    S Samuel Cherinet

    well, what visual studio does when storing connection strings is, it only codes the get method of the "connection string" property. this is an auto generated code,you will find it in a file called "Settings.Designer.cs" you will find a code roughly like this [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] [global::System.Configuration.DefaultSettingValueAttribute("Default Connetction string")] public string Setting { get { return ((string)(this["Setting"])); } //add this set method for this properit set { this["Setting"] = value; } } delete the default connection string and assign it before trying to fill the dataset hope it works for you,

    C# help question database xml tutorial

  • Message Box Challenge
    S Samuel Cherinet

    try to refresh the main form that will ensure all the UI changes to be commited before moving on, check out either of the two methods, might work!!! this.Invalidate(); //or this.Refresh();

    C# help csharp linq graphics

  • C# Referencing Cell on DataGrid
    S Samuel Cherinet

    you can use the indexer of the datagridveiw to directly find the cell you are looking for and also use the property "FormattedValue" to get the displayed text of the cell

    str=dgrid[colIndex,rowIndex].FormattedValue.ToString();

    I have to remind you,If you already don't know, that an empty cell means most of the time null, that is like a fuel to run time error, so be aware of that. - try using the "RowEnter" event and access the selected row by the "DataGridViewCellEventArgs" in the event handler. best of luck

    C# csharp database visual-studio question

  • How to list live object instances while an application is running?
    S Samuel Cherinet

    while an application is running, I was looking for a way I can list the objects instantiated by that application, only live once. any help?

    C# help 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