Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Martin23

@Martin23
About
Posts
29
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Vista FUD
    M Martin23

    Jeffry J. Brickley wrote:

    They are the same people complaining about XP when XP first came out

    So true, and they will be the same people in the future saying "Windows 2012 is crap, stick with Vista!".

    The Lounge design question

  • Ready for firing of management of MS!
    M Martin23

    "Anyway else getting ready for the Penguin" So you don't like choosing between 7 versions of office?, you will love navigating through the hundreds of different versions/distributions of linux.

    The Lounge csharp visual-studio com business question

  • slowing down the process
    M Martin23

    System.Threading.Thread.Sleep(1000); will pause the thread for 1000 milliseconds.

    C# game-dev

  • Why do we have properties?
    M Martin23

    You don't have to use properties if you prefer not to. Virtually everybody does though, as they make code much easier to understand.

    C# csharp java database dotnet

  • MS Web Browser control
    M Martin23

    webBrowser1.IsWebBrowserContextMenuEnabled = false;

    C# question csharp help

  • How to make an number only text box?
    M Martin23

    This is a better way still. Using execeptions is not a good idea. private void AmountBox_KeyPress(object sender, KeyPressEventArgs e) { if(!char.IsNumber(e.KeyChar)) e.Handled = true; }

    C# csharp tutorial question

  • Generic/custom listbox
    M Martin23

    Hi, I am currently suffering the limitations of the listbox control, I would really like to have a generic listbox, rather than the default of using objects. It would also be really useful if I could make a custom listbox and override the functions "Items.Add" and "Items.Remove", but I can't work out how to override these functions. I am not sure if these things are even possible, I haven't been able to find out much about them googling the web, can anyone point me in the right direction? thanks

    C# tutorial question

  • progress bar [modified]
    M Martin23

    Use the navigating and documentcompleted events if you want to know when the browser starts and finishes navigating. Alternatively, if you want to know how much has been downloaded and how much needs to be downloaded of the webpage, use the e.CurrentProgress and e.MaximumProgress properties of the progresschanged event of the webbrowser.

    C# question

  • handling events fired by other threads
    M Martin23

    ahh that's great, works a treat, thanks.

    C# help question algorithms business

  • handling events fired by other threads
    M Martin23

    Hi, I have a class running on a secondary thread that listens to an IRC channel (don't worry if you aren't familiar with IRC, all this code is working), and fires an event when it receives a message, passing on this message on. The problem is that I need the main thread to do all the business once a message is received. Attaching events in the normal manner causes the code fired by the event to be run on the secondary thread, which is not good. So basically; how can I attach an event handler that runs on my main thread to events fired on a secondary thread? Hope that all makes sense, I have done lots of searching but cannot find what I'm looking for, this is partly because I'm not really sure what I am looking for, as I am totally stuck. thanks Martin

    C# help question algorithms business

  • Flash in taskbar
    M Martin23

    Ah, most helpful, thank you very much!

    C# adobe question

  • Flash in taskbar
    M Martin23

    Hi, I want to make the tab for my program flash in the taskbar, I have done some googling, and found the following code: using System.Runtime.InteropServices; [DllImport("user32.DLL", EntryPoint = "FlashWindow")] public static extern int FlashWindow(int hwnd, int bInvert); But unfortunately I have not been able to get it to do anything (calling it has no effect), in fact I don't even know what the int parameters refer to. Can anybody give me a prod in the right direction? Thanks! Martin

    C# adobe question

  • Regular expressions in C#
    M Martin23

    thanks, worked great!

    C# help csharp regex tutorial

  • Regular expressions in C#
    M Martin23

    Hi, I have an application where users can do many find/replace operations, including regexes. The problem is that if the user wants to replace something with a carriage return/newline and enter \r\n it literally replaces with "\r\n", however if I try the same thing but in the code, and specify a regex to replace something with \r\n it does replace with a carriage return/newline. Otherwise the regex works properly, for example the user can find a carriage return/newline with \r\n and they can replace with $1 for example, but it just doesn't work when you try and replace with \r\n. thanks for any help!

    C# help csharp regex tutorial

  • Programmatically pressing a webBroswer button
    M Martin23

    I am making a program to help with editing Wikipedia (you know, the free encylopedia, see http://en.wikipedia.org/wiki/Main\_Page). I can get and change the text in the textboxes, but I need to be able to press the "Save page" button when done. For an example of a webpage I am trying to press a button on see http://en.wikipedia.org/w/index.php?title=C\_Sharp&action=edit hope that explains it a bit more. thanks

    C# csharp css visual-studio question

  • Programmatically pressing a webBroswer button
    M Martin23

    Hi guys, I have a program (in Visual studio 2005) that interacts with a webBrowser component, it needs to press buttons on webpages in that webBrowser, so far I have done this by focusing on the button then programmatically pressing "enter" as follows; webBrowser1.Document.GetElementById("button1").Focus(); SendKeys.Send("{ENTER}"); This works, but is less than satisfactory, because if the user starts using a different application it fires the "enter" key in the other application. This can mostly be avoided by checking my application has the user focus, but then if it doesn't have the user focus the "enter" is never fired. Is there a better way of programmatically pressing a button on the webpage? thanks a lot Martin

    C# csharp css visual-studio question

  • Progress bar problem
    M Martin23

    Wow, thanks Will, thats perfect! I'll remember to pass your kindness on to someone else! (plus I'll get a book on threading in .NET ;) ) Martin

    C# html help

  • Progress bar problem
    M Martin23

    Yes that does help, thnaks! Further problem now is how do I stop the progress bar? because if I put the code to stop the progress bar in the new thread, then that makes the progressbar disappears altogether when the thread finishes (why is that?), and I can't put the code like this; Private void getWebData() { progressBar1.Style = ProgressBarStyle.Marquee; progressBar1.Value = 100; //start new thread to do everything progressBar1.Value = 0; progressBar1.Style = ProgressBarStyle.Continuous; } because then as you would expect it starts and stop the progress bar imidiately. I assume I have to somehow attach an event handler to the new thread so I know when it finishes? thanks Martin

    C# html help

  • Progress bar problem
    M Martin23

    Hi, I am making an application that simply gets all the html from a webpage and filters out the data I want. The problem is that I want a progressbar to indicate it is working (using the "marquee" style). My code looks like this; Private void getWebData() { progressBar1.Style = ProgressBarStyle.Marquee; progressBar1.Value = 100; //simple code to get wepage... //simple code to filter out data I want... //put data into listbox progressBar1.Value = 0; progressBar1.Style = ProgressBarStyle.Continuous; } I thought that this would set the progressbar going, then do the work, then stop the progress bar, but instead the progress bar just doesnt do anything, although the code to get the html data does work. Any comment greatly appreciated, thanks! Martin.

    C# html help

  • C# and WinFX
    M Martin23

    Hi, I want to add a spell checking textbox to a c# project I have, is this possible? I have all the relevant software (WinFX runtime, extensions for VS2005 Express etc.) but there is no way to enable the textbox.IsSpellCheckEnabled property I have read about. Is it possible to make a custom WinFX control which is a spellchecked textbox, then add that to my project? If so is there any documentation on how to achieve this? thanks!

    C# csharp tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups