dcsimg

Search:

Type: Posts; User: chris128

Page 1 of 13 1 2 3 4

Search: Search took 3.36 seconds.

  1. VS 2010 Re: SyncLock protecting thread counter

    Quick update on this - it turned out there is no bug at all! I got incorrect information from the end user, and after adding a lot of additional debug logging to the program and getting the logs back...
  2. VS 2010 Re: SyncLock protecting thread counter

    I guess that could work, and use the ConcurrentQueue that someone mentioned earlier so there are no issues. That would require something different for the first 10 computers though wouldn't it...
  3. VS 2010 Re: SyncLock protecting thread counter

    Thanks and yeah I did actually realise that just before you posted, and changed my code to suit. However, this doesn't seem to have fixed the bug and I also tried changing WaitOne to use the...
  4. VS 2010 Re: SyncLock protecting thread counter

    I just realised that Interlocked.Increment actually returns the updated value... every example I've ever seen of it just uses it on its own to update the integer you pass in to it by reference,...
  5. VS 2010 Re: SyncLock protecting thread counter

    If I check the value of GetMaxThreads on my PC it gives me 1023, which is way more threads than I want to be allowed. I don't really want to call ThreadPool.SetMaxThreads and set that to whatever the...
  6. VS 2010 [RESOLVED] SyncLock protecting thread counter

    I've got an option in one of my programs to limit the number of threads that get used when the program loops through a list of computers to perform queries against them - I don't want to just use...
  7. Replies
    5
    Views
    882

    VS 2010 Re: Using multi threading with copy

    I'd do it something like this:


    Module Module1

    Const dirTarget As String = "C:\Temp\target\"
    Const dirSource As String = "C:\Temp\source\"

    Sub Main()
    For Each FilePath...
  8. Replies
    5
    Views
    882

    VS 2010 Re: Using multi threading with copy

    Your code is only going to perform one of those tasks at a time because it will stop and wait on Thread1.Join() for that task to finish, before it moves on to the next task. So you are gaining no...
  9. VS 2010 Validate that network data came from my program

    I'm considering building a client/server system where the client running on workstation PCs in a network would need to send data to a central server in a secure way. When I say secure, I don't mean...
  10. VS 2010 Re: How to use Paralell.ForEach with a SearchResultCollection

    I didn't know about that Cast extension method but yeah that is better than my extension method in post #10 as it doesn't need to create a new list at all. So you're right, the simplest way would be...
  11. VS 2010 Re: How to use Paralell.ForEach with a SearchResultCollection

    I've had option strict turned on for the last 3 years at least and never had an issue, and I know most people on these forums have it turned on as well. There have been many threads about it. It...
  12. VS 2010 Re: How to use Paralell.ForEach with a SearchResultCollection

    That's fair enough but you didn't just provide a slimmed down version - you specifically asked why I did it the way I did:



    Which is why I answered explaining why I did it that way and not...
  13. VS 2010 Re: How to use Paralell.ForEach with a SearchResultCollection

    lol so you base the code you use on how easy it is to write rather than how well it performs or how reliable it is? I agree you shouldn't make things overly complex if it can be avoided but in this...
  14. VS 2010 Re: How to use Paralell.ForEach with a SearchResultCollection

    That's not actually any different at all... you're just writing the method in line rather than as a separate method. Its still the exact same thing that is happening.

    Why does converting it so...
  15. VS 2010 Re: How to use Paralell.ForEach with a SearchResultCollection

    Because you have no choice in creating a SearchResultCollection - that is what the FindAll method returns. You can't do a Parallel For Each through that though, which is exactly why the OP posted...
  16. Re: Get all members of an Active Directory group or local group

    Well it depends what you've got in your listbox items. If I remember rightly the string you need to pass in to the Add method is the distinguished name (aka LDAP path) of the member you want to add...
  17. Re: Get all members of an Active Directory group or local group

    haha yes it is a small world :) Glad you're finding my tools useful and hope the .NET code helps you out as well

    Also, I've just updated the original post in this thread to clean up the code...
  18. Re: Get all members of an Active Directory group or local group

    Instead of getting the Name property of the DirectoryEntry, just use the Properties collection and specify the LDAP name of the attribute you want to get. So in your case that would be "displayName"...
  19. Re: Setting Windows 8 account picture with .NET/WinRT hybrid

    I'm having the exact same problem. Everything about using "Windows Runtime" methods from regular .NET apps has been incredibly frustrating and troublesome so far. I'm doing it slightly differently to...
  20. Replies
    12
    Views
    18,147

    Re: Mapping a network drive

    It runs explorer non-elevated because you're not actually launching a new instance of explorer.exe (as that's a single instance application) - if you try to start explorer.exe when one instance of it...
  21. Replies
    12
    Views
    18,147

    Re: Mapping a network drive

    Is your program running "As Administrator" (aka with elevated permissions) ? If so then any drives you map will not be visible to explorer because explorer is running with different permissions....
  22. VS 2010 Re: Paging large amounts of data to disk and back

    Thanks JMC, how/where did you find that? I've done plenty of google searches on this subject and not come across anything that resembles my scenario so perhaps I'm searching for the wrong...
  23. VS 2010 [RESOLVED] Paging large amounts of data to disk and back

    I have some applications that produce reports of information about various things in networks, such as folders or Active Directory objects - in some cases people working at huge companies need to run...
  24. Re: Make for loops wait before they loop again

    Don't put the entire thing at class level, I just meant the Boolean variable I was talking about. You still need everything else in your timer tick event.

    e.g:

    Public Class Form1

    Dim...
  25. Re: Make for loops wait before they loop again

    Oh and as for your question, just use a Boolean variable (True/False) to determine whether or not the images have already intersected. Declare this variable at class level rather than inside your...
  26. Re: Make for loops wait before they loop again

    Just as a side note, it looks like you're making a game - you might want to consider using the XNA framework which is specifically designed for making games (rather than trying to use WinForms to...
  27. Replies
    9
    Views
    776

    VS 2010 Re: [RESOLVED] Question about Threads.

    haha I'm glad its not just me that does that! Although in this case I'd like to think my reply was what pointed the OP in the correct direction rather than him just writing the question out, but...
  28. Replies
    9
    Views
    776

    VS 2010 Re: Question about Threads.

    If you don't want your main thread to wait for the other thread then why call the Join method? That's like saying I don't want to delete this file but every time I call IO.File.Delete it deletes a...
  29. Replies
    10
    Views
    1,574

    Re: Windows Form Vs WPF and XAML

    VS 2010 was written in WPF - which is why issues such as the blurry text got addressed for .NET 4.0. WPF in .NET 3.5 wasn't great as it was very new - there's a video somewhere where the VS team...
  30. Replies
    10
    Views
    1,574

    Re: Windows Form Vs WPF and XAML

    Yeah WPF is the way to go moving forward, but it does have quite a steep learning curve initially (especially for people coming from WinForms). My one bit of advice for people new to WPF would be...
  31. Thread: form size

    by chris128
    Replies
    6
    Views
    747

    Re: form size

    I guess we interpreted his question differently, as I thought that's what he wanted. He said all he did on his project was set the window to be as large as possible and that it worked correctly on...
  32. Thread: form size

    by chris128
    Replies
    6
    Views
    747

    Re: form size

    Just set it to be maximised on startup (by setting the WindowState property to Maximised in the property section of the designer, then it will always fill the screen regardless of its size.
  33. Re: [VB2010] CA2000 error: call System.IDisposable.Dispose

    An easier way is to just use a Using statement, as that essentially handles the dispose for you in its own internal Try/Finally block - so even if an exception is thrown in some code inside the Using...
  34. Replies
    12
    Views
    1,456

    Re: [RESOLVED] SMTP Error

    Cool, glad you got it working :) and I learned you can send SMS messages via email as well lol modern technology...
  35. Replies
    12
    Views
    1,456

    Re: SMTP Error

    Really? Huh, I've never heard of that. I don't think the carriers here in the UK have that feature, but perhaps they do and just don't advertise it very well.

    Anyway, he did specify the SMTP...
  36. Replies
    12
    Views
    1,456

    Re: SMTP Error

    Yeah you can't use SMTP to send text messages to phones... I think you're confusing SMS and SMTP. SMS is text message. SMTP is email.
  37. Replies
    15
    Views
    1,249

    Re: Unexplainable file save bug

    No it is not linked to your project at all, you don't need to worry about it - I get the exact same behaviour on my projects that have nothing to do with Silverlight and don't require it. The only...
  38. Replies
    15
    Views
    1,249

    Re: Unexplainable file save bug

    One of them is coming from Silverlight and one of them is coming from the full .NET Framework. You can tell this by right clicking on one of them and going to Browse Definition, then scrolling up to...
  39. Replies
    4
    Views
    1,476

    Re: getwindowrect is not working

    Yeah you might want to try this instead if you want it to be case insensitive:



    If p.MainWindowTitle.StartsWith("untitled", StringComparison.CurrentCultureIgnoreCase) Then
  40. VS 2010 Re: VB Code Error "Object reference not set to an instance of an object"

    That error means that you're trying to use a "null" object basically - something that doesn't actually exist. When the error is thrown and the debugger kicks in, hover your mouse over the variables...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width