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

Search:

Type: Posts; User: Comintern

Page 1 of 21 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    11
    Views
    2,853

    Re: Completely stumped by stack smash.

    I had actually never used the ternary operators before this assignment (and I agree with your assessment of how those lines are written). The prof had two requirements for the assignment -- design...
  2. Replies
    11
    Views
    2,853

    Re: Completely stumped by stack smash.

    It crashes every time it runs. Looping around race() doesn't cause it to crash any earlier for me either -- it's always when main exits.

    Changing the printf() gives the same segmentation fault in...
  3. Replies
    11
    Views
    2,853

    Re: Completely stumped by stack smash.

    That function was the first culprit that I looked at, but removing the function entirely gives the same crash. I check bounds on the parameters before they are passed to the function, which should...
  4. Replies
    11
    Views
    2,853

    [Solved] Completely stumped by stack smash.

    For some reason, I'm getting a segmentation fault when main() exits with the following code:


    #include <iostream>
    #include <cstring>
    #include <ctime>
    #include <cstdlib>
    #include <unistd.h>
    ...
  5. Replies
    15
    Views
    2,553

    Re: [RESOLVED] Is there a VB6 compiler cache?

    Yeah, I think a reinstall might be in order. :) Could be related to a code profiling add-in that I was trying out.
  6. Replies
    15
    Views
    2,553

    Re: Is there a VB6 compiler cache?

    I think this was a compiler error (2nd on this project). It resolved after I commented out a Debug.Assert call elsewhere in the code. Totally unrelated to the form handling, and shouldn't be...
  7. Replies
    15
    Views
    2,553

    Re: Is there a VB6 compiler cache?

    I use Form_Load. Here's the initialize event. All it does is fill an array and set the form's icon. I don't touch any of the controls until the Form_Load (some of them may move if the form...
  8. Replies
    15
    Views
    2,553

    Re: Is there a VB6 compiler cache?

    I use LBound out of habit. After sprinkling some MsgBoxes around, the problem seems to be in the order that the form is being built. I call it like this:

    Private Sub ShowAuditorTray(dStart As...
  9. Replies
    15
    Views
    2,553

    [RESOLVED] Is there a VB6 compiler cache?

    I've run into a perplexing problem. I have a program that runs fine in the debugger, but throws a subscript error when compiled. This is the procedure that errors:

    Private Sub ConfigureHeaders()...
  10. Replies
    4
    Views
    994

    Re: Grey area around child form

    One thing to add -- if the "grey area" is where the hidden form was, you might have to force the mdi parent to redraw itself. Either toss a DoEvents into your Form2 loading code or explicitly call...
  11. Replies
    4
    Views
    1,067

    Re: Capturing input from Zmud

    @dglienna - zMud is intended for parsing output from a text interface, so this really isn't a cheat (more like a functionality extension). I used to use it when I had enough time to go mudding.
    ...
  12. Replies
    6
    Views
    979

    Re: Saving a picture from a web site

    Ahhhh... Didn't notice you were using .NET. Glad it worked for you.
  13. Replies
    6
    Views
    979

    Re: Saving a picture from a web site

    If you have the URL, just get your own copy with the URLDownloadToFile API.

    Private Declare Function URLDownloadToFile Lib "urlmon.dll" Alias "URLDownloadToFileA" _
    (ByVal...
  14. Re: Copying big files over 4GBytes with the percentage of the copy display.

    I think the CopyFileEx API will let you copy files bigger than 4GB (not sure as I don't have a file to test it on). Check out the sample code on AllAPI.net. You need to control the progress display...
  15. Replies
    3
    Views
    1,137

    Re: SetFocus a Control...

    You can always just loop through the controls and test for a name match too:

    Dim oCont As Control

    For Each oCont In Me.Controls
    If LCase$(oCont.Name) =...
  16. Replies
    10
    Views
    1,287

    Re: comparing all fields of a type

    To expand on the above, take a look at the following code:

    Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)

    Private Sub...
  17. Replies
    10
    Views
    1,287

    Re: comparing all fields of a type

    I think having variable length strings or objects in the Type would make it impossible.

    My thought is that you can read the block of memory occupied by each UDT into a string and do a simple...
  18. Replies
    4
    Views
    1,192

    Re: Count # repeats of string within string

    This also works:

    Private Function NumberInString(sSource As String, sMatch As String) As Long

    Dim sTemp() As String

    sTemp = Split(sSource, sMatch)
    NumberInString =...
  19. Replies
    22
    Views
    6,195

    Re: Text-Based RPG: Survival

    Good point, and it expands on what I was talking about in terms of "robustness". What inheritance and function pointers let you do is write one bit of code that is generic to all of the objects in...
  20. Replies
    22
    Views
    6,195

    Re: Text-Based RPG: Survival

    The main thing you should determine is if function pointers are going to make things easier for you. For example, if you have lots of different types of actions that the player (or critters) can...
  21. Replies
    9
    Views
    2,641

    Re: Faxing Data Report in VB6

    We don't have our own ISP, but we are required to use an encrypted secure mail system for a bulk of our external communications. Generally if we are required to fax something as opposed to imaging...
  22. Replies
    14
    Views
    2,030

    Re: excel 2003 - excel 2000 problem

    If all you need to do is find the last row with data, I believe the .UsedRange property is available in Excel 2000:

    MsgBox wksheet.UsedRange.Rows.Count
  23. Replies
    9
    Views
    2,641

    Re: Faxing Data Report in VB6

    I would try to find the window that the fax software opens and automate it. While it may not be the ideal solution, as others in the thread have pointed out, other solutions can be extremely...
  24. Replies
    4
    Views
    1,144

    Re: Rotate Image (without control)

    Dump the bitmap into a 2 dimensional array. Then just transpose the rows and columns. This should give you the basic gist, to rotate clockwise you need to change the write order:

    Private...
  25. Thread: pass array

    by Comintern
    Replies
    4
    Views
    1,028

    Re: pass array

    Right idea, but it looks like the function attempts to determine the maximum and minimum values in the array. As far as I can tell, the data type of the array shouldn't be relevant -- it's the data...
Results 1 to 25 of 517
Page 1 of 21 1 2 3 4





Click Here to Expand Forum to Full Width

Featured