CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Tron

Page 1 of 21 1 2 3 4

Search: Search took 0.12 seconds.

  1. Replies
    1
    Views
    518

    Re: control arrays and common handler

    Something like this:



    // add event handler
    this.checkBox301.CheckedChanged += new System.EventHandler(this.allCheckBoxs_CheckedChanged);

    // you can...
  2. Thread: OnLoad Method

    by Tron
    Replies
    3
    Views
    856

    Re: OnLoad Method

    Your OnLoad() method needs to be part of a class. I would think in this case your Game class.
  3. Re: Getting string info from txt file, possible? net 4.5

    You can do something like this:



    string path = @"c:\temp\MyTest.txt";
    if (File.Exists(path))
    {
    // Open the file to read from.
    using...
  4. Re: Search a list C# - List myList = new List();

    You could use the Find() method with a delegate:



    Meme myMeme = myList.Find(
    delegate(Memo m)
    {
    return m.Name ==...
  5. Re: WPF Data Binding between a tab control and a tree view

    What is the value for SelectedItem.Notes?
  6. Replies
    4
    Views
    691

    Re: How do i change a GUI written in C#

    The code is indeed C#.

    You'll need a integrated development environment (IDE) to make the changes. Visual Studio is one such IDE but it is not free nor online.

    There are other options although...
  7. Replies
    3
    Views
    14,797

    Re: C# Windows Service With Timer Not Sending Data

    So it is only posting once, correct? If so this is because you only started the timer once and it completed its task. So in your timerElapsed() method you need to either reset the existing timer or...
  8. Re: How to access a class instance from different forms

    You can create a second constructor for the Form2 class. Pass Class1 as a parameter into your new constructor.
  9. Replies
    2
    Views
    3,875

    Re: Advice On Altering a 5 Gig .CSV File Via C#

    Look at System.IO.FileInfo

    You can read the file line by line using:
    System.IO.StreamReader

    You can create a new file line by line using:
    System.IO.StreamWriter
  10. Replies
    2
    Views
    534

    Re: Action while a button is pressed

    Look at the MouseDown and MouseUp events.
  11. Replies
    2
    Views
    852

    Re: c# listbox path issues

    Does this make any difference?

    string MyPath = (string)listBoxAdv1.SelectedValue;
  12. Replies
    1
    Views
    688

    Re: How to Determine the Active Form

    Try the Form Class GotFocus event. You could also try the Form Class ActiveForm property.
  13. Re: Why can I save the error information into the table of SQL server ?

    Try something like this in your SaveMessageErrSQL() method.



    if (objConnect.State != System.Data.ConnectionState.Open)
    {
    objConnect.Open();
    ...
  14. Re: Why can I save the error information into the table of SQL server ?

    The datatype for an image in SQL Server is

    varbinary(max)

    Can you change the DB table schema?
  15. Re: need to retrieve data and convert to int for IF statement

    SqlDataReader has lots of methods. Change GetString() to the method providing the data type you want.
  16. Re: need to retrieve data and convert to int for IF statement

    You can check for a NULL value too.

    string field = reader.IsDBNull(0) ? string.Empty : reader.GetString(0);
  17. Re: Why can I save the error information into the table of SQL server ?

    But I think you are closing the DB before you are writing to the error table.


    ClsConnection.objConnect.Close();
    string sConError = "Save Messager Customer 1: " +...
  18. Re: Why can I save the error information into the table of SQL server ?

    Is your DB Connection closed?
  19. Thread: UserControl re

    by Tron
    Replies
    1
    Views
    754

    Re: UserControl re

    You would want something like BeginUpdate() and EndUpdate() for your control.
  20. Replies
    1
    Views
    1,355

    Re: xmldoc SelectNodes() problems

    Try something like:


    XmlNode xmlRoot = xmlDoc.DocumentElement;

    XmlNodeList nodes = xmlRoot.SelectNodes("/DosageProposals/Dosage/Structure/UnitTexts/Singular");
  21. Re: First picture repeating in next rows in crystal reports problem what wrong code

    If you want only one image to appear, this should work.



    foreach (DataRow dr in dt.Rows)
    {
    dr["Image"] = imgbyte;
    imgbype = null;
    }
  22. Replies
    8
    Views
    2,302

    Re: Json data call error

    Check out http://www.tomasvera.com/programming/using-javascriptserializer-to-parse-json-objects/

    The issue must be in your JavaScriptSerializer.
  23. Replies
    8
    Views
    2,302

    Re: Json data call error

    if ((dict != null) and (dict.data != null))
    {
    foreach (var club in dict.data)
    {
    .....
    }
    }
    else
    {
    ...
  24. Replies
    8
    Views
    2,302

    Re: Json data call error

    Looks like either "dict" or "dict.data" variable is null.

    Test the value before running your for loop.

    if ((dict != null) and (dict.data != null))
  25. Replies
    1
    Views
    703

    Re: Creating a loop around a checkedbox

    Something like this will read until there is no more data to read.

    If you are looking at toggling on and off the actual read process you'll probably need to fire off a worker thread that checks...
Results 1 to 25 of 511
Page 1 of 21 1 2 3 4





Click Here to Expand Forum to Full Width

Featured