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

Search:

Type: Posts; User: bassguru

Page 1 of 2 1 2

Search: Search took 0.11 seconds.

  1. Re: Calling an object of a class in another class

    ken4ward,

    I've written a quick example of how to pass the current instance of a form to a second form. In this example, the 'this' keyword is the current instance of Form1. You don't want to try...
  2. Replies
    10
    Views
    1,329

    Re: If Statement w/Message Box

    The if statement is checking the labels, not the textboxes - was this intentional?



    if (lblFatCaloriesValue.Text == "" || ((lblCarbCaloriesValue.Text == "") || (dblTotalCalories <= 0)))
    {...
  3. Replies
    2
    Views
    1,768

    Re: Upgrade from .Net 1.1 to .Net 4.0

    That is quite a jump!

    I would recommend upgrading in steps, such as .Net 1.1 > 2.0, 2.0 > 3.0, 3.0 > 3.5, 3.5 > 4.0.

    This may take a while, but its the safest way to upgrade your applications....
  4. Re: question about initializing an instance variable

    Change your MyClass to look like this:



    public MyClass()
    {
    Var = 8;

    Console.WriteLine("mVar = {0}", Var);
    }
  5. Replies
    8
    Views
    5,976

    Re: Memory Leaks in Window Media Player + c#

    Try the following:



    private void stop_Click(object sender, EventArgs e)
    {
    m.URL = null;
    m.close();
    m.Dispose();
    m = null;
  6. Replies
    8
    Views
    5,976

    Re: Memory Leaks in Window Media Player + c#

    Try the following:



    private void stop_Click(object sender, EventArgs e)
    {
    bool test1 = false;
    bool test2 = false;

    test1 = System.Runtime.InteropServices.Marshal.IsComObject(m);
  7. Replies
    8
    Views
    5,976

    Re: Memory Leaks in Window Media Player + c#

    Pankaj Safaltek,

    Try the following:



    private void stop_Click(object sender, EventArgs e)
    {
    m.URL = null;
    m.close();
  8. Replies
    6
    Views
    1,219

    Re: What books to read

    Ilia2k,

    If you have never done or have just started C# then I suggest the Head First C# book (http://www.amazon.co.uk/Head-First-C-Andrew-Stellman/dp/0596514824). Head First books are always great...
  9. Replies
    2
    Views
    707

    Re: Generate test data from variable

    You might want to store the expected variable as readonly rather than as a constant (see http://en.csharp-online.net/const,_static_and_readonly). Also, functions are called methods in C#.

    Have a...
  10. Replies
    2
    Views
    1,472

    Re: Web Based Quiz Advice

    worthful,

    For something as basic as a multiple choice quiz, I would suggest using ASP.NET and C#.

    WPF is mainly used to make things look asthetically pleasing. Silverlight could be used but it...
  11. Replies
    17
    Views
    4,105

    Re: Timeout expired error in sql

    You could start by posting any code that you feel might be responsible for your timeout error.
  12. Replies
    5
    Views
    1,792

    Re: User prefrences for programs

    Glad I could help you Sean87!

    Remember to mark the thread as resolved.

    Regards,
    Bassguru
  13. Replies
    5
    Views
    1,792

    Re: User prefrences for programs

    Sean87,

    Have a look at this tutorial: http://www.c-sharpcorner.com/uploadfile/mahesh/mouse_events12232005014128am/mouse_events.aspx

    It introduces you to the concept of mouse events.

    You...
  14. Replies
    5
    Views
    1,792

    Re: User prefrences for programs

    Hi Sean87,

    Have a look at http://msdn.microsoft.com/en-us/library/aa730869%28v=vs.80%29.aspx

    This is a tutorial on how to save user settings.

    I hope this is what you are look for!
    ...
  15. Replies
    7
    Views
    1,437

    Re: Return Value to String

    Is this what you are after?

    public int RandomDiceRollRound1Dice1(int min, int max)
    {
    Random random = new Random();
    return random.Next(min, max);
    }

    private void btnRoll_Click(object...
  16. Replies
    5
    Views
    1,182

    Re: [RESOLVED] Generic Types

    Well said BigEd781; forgive me for using a reference type as an example of boxing and unboxing!

    A better example would have been:

    List<Int32> list = new List<Int32>();
    list.Add(myInt32);
    ...
  17. Replies
    5
    Views
    1,182

    Re: Generic Types

    One of the main advantages of generic types is that they have the potential to cut back on boxing and unboxing.

    For example, before generic types were introduced, if you wanted to store an...
  18. Re: Events, and Mouse detection in Console Application...

    After a quick search, I would suggest the following tutorials:

    http://www.codeguru.com/csharp/csharp/cs_graphics/mouse/article.php/c6133
    ...
  19. Re: Events, and Mouse detection in Console Application...

    Hello Komaqtion,

    To the best of my knowledge you cannot use mouse events for a console application as it is keyboard only I'm afraid.

    However, what your suggesting is feasible on a windows form...
  20. Re: Sending DateTime information with image

    In amendment to my previous post, it would make more sense to deserialize the stream BEFORE the while loop, as shown below:



    bFmt.Deserialize(stream);

    ...
  21. Re: Sending DateTime information with image

    Thanks again for the reply TheGreatCthulhu!

    Your last post really helped to send the instance of the class. However, a problem is occuring that states that "The input stream is not a valid binary...
  22. Re: Sending DateTime information with image

    Thanks again TheGreatCthulhu

    Your logic seems sound, but I'm still at a loss I'm afraid. This is what I have thus far:



    [Serializable]
    public class timeStampedImage
    {
    ...
  23. Re: Sending DateTime information with image

    Thanks for the reply TheGreatCthulhu,



    public class timeStampedImage
    {
    public byte[] byteArray;
    public DateTime dateTime;
    }
  24. [RESOLVED] Sending DateTime information with image

    Hello everyone,

    I want to extend my program by sending a DateTime object alongside an image object AT THE SAME TIME. Below is the working code I have thus far:



    //Sends the image...
  25. Replies
    1
    Views
    10,375

    Re: byte array to image

    Perhaps it would help if I showed you where I believe the error is occuring.



    static void Connect(String server, byte[] Image)
    {
    try
    {
    ...
Results 1 to 25 of 29
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured