Search results

  1. snarfblam

    ListView Control - ItemActivate event

    It seems to me that the ItemActivate event is specifically intended to be input-method agnostic. If you need to differentiate, you can use the DoubleClick and KeyPress events (KeyDown wont catch the keyboard repeat), and forget about the ItemActivate event. Note that these events appear to be...
  2. snarfblam

    Code Conversion

    I notice one difference: in the original loop, while ( nUnits-- ) { // Perform a byte swap of the data when retrieving it from the buffer nSum += SwapEndian(*pBuf++, nWordWidth); } return nSum; the...
  3. snarfblam

    Custom Control Painting Sequence

    Just curious. Why are you setting the opaque flag to true on a transparent control?
  4. snarfblam

    OO Class Event

    I think the best method in an inheritance scenario is a virtual method. The inheriting class can override the method to add logic and then call the base method. In your example, you could have the prorerty setter call a virtual method that inheritors override. The following would work with the...
  5. snarfblam

    Resource converted from Resource File to Local Resource

    The problem is most likely the result of the way that Visual Studio serializes forms for the designer. When it sees that a control has an image property, it doesnt know where the image came from. Visual Studio assumes that the image has been set through the designer (as opposed to by the control...
  6. snarfblam

    How to determine who is at a higher version?

    Im pretty sure that the > and < operators compare the values of character codes, similar to how these operators would be expected to work with the Char data type. For example... Console.WriteLine("113" < "90") The output of that code is "TRUE." It shouldnt be unreasonably difficult...
  7. snarfblam

    Error During Binary Deserialize - URGENT

    Using the following code, the program compiled and executed as expected: List<String> m_QueryList = new List<string>(); string str = "some Text"; Stream stream = new MemoryStream(); m_QueryList.Add(str); BinaryFormatter binFormatter = new BinaryFormatter(); binFormatter.Serialize(stream...
  8. snarfblam

    Simple Question About ArrayList

    Simply place and around your VB code, like so: SomeFunction() SomeComment And it will come out like so: SomeFunction() SomeComment My biggest criticism would be your use of non-descriptive variable, control, and function names for exactly the problem we have here: I cant understand what...
  9. snarfblam

    How request permission from Vista UAC for writing to registry?

    This thread on Stack Overflow may be worth reading.
  10. snarfblam

    Copy and Merge 2 Arrays

    You need to specify where to begin copying to when calling Array.Copy using a different overload (at least with InputArray2, since you dont want to copy that to the beginning of OutputArray). ReDim OutputArray(InputArray1.Length + InputArray2.Length - 1) Parameters are sourceArray...
  11. snarfblam

    Simple Question About ArrayList

    Dont take this the wrong way, but your code makes me want to cry a little. Treating textbox text like numbers and throwing cryptically named arraylists around is bound to make the program prone to chrashing spectacularly. Just so you know, there are [VB] and [Code] tags you can use to make the...
  12. snarfblam

    some C# help

    Are you sure that this is C# and not C++?
  13. snarfblam

    Problem to execute VB6 code in VB.net 2005

    The conversion to VB.NET would be doable. I really cant say what the performance difference will be, but if I had to guess I would say it would help. I believe that DotNet has faster file access, but I dont know if there would be a performance hit when it comes to Office interop. As far as what...
  14. snarfblam

    Deserialize obj which assembly is not loaded

    When you load the plug-in DLL you should be able to store a reference to the loaded Assembly object, which you should then be able to return later within the CurrentDomain_AssemblyResolve() method. (This wouldnt entail referencing the assembly at design-time.) In other words, Assembly...
  15. snarfblam

    Additive blending

    The short answer is that DotNet does not support any blends except for your standard alpha blend and source copy. In the past Ive written my own drawing functions to do more advanced blending. If you are using 32-bit sources and destinations then once you understand how to directly access...
  16. snarfblam

    Deserialize obj which assembly is not loaded

    If you dont pre-load the assembly before the CurrentDomain.AssemblyResolve event, will an exception be thrown? If so, what if you simply store a reference to the DLL and then in the CurrentDomain.AssemblyResolve event return the cached reference to the loaded assembly, rather that calling...
  17. snarfblam

    Deserialize obj which assembly is not loaded

    The originating assembly needs to be loaded in memory to deserialize an object, which means if it isnt referenced at design time it must be loaded dynamically, probably using the Assembly.LoadFile() method.
  18. snarfblam

    Copying an array to an arraylist

    If you need to add an array of items to a list after the list has been created, there is the ArrayList.AddRange() method (or List<T>.AddRange() method), which allows you to insert an entire array, list, or any other collection to the list.
  19. snarfblam

    update old c code

    Now that weve thoroughly explained Diesels frustration, is there any particular part of the conversion that is troubling you? Or are all of those wacky curly braces just gibberish to you?
  20. snarfblam

    Converting C++ to VB2008: Using DLL and union structure

    Looking over your structure definition again, I see two problems. First of all, you are replacing a pointer to a Word (Word is a numeric type) with a string, and you are replacing a pointer to a float with a float (Single). Secondly, seeing as the C++ union actually contains two pointers of...
Back
Top