- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 8
- Posts with Upvotes
- 7
- Upvoting Members
- 5
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
20 Posted Topics
Re: You can also use: [CODE]string[] files = Directory.GetFiles(@"C:\Images\", "*.jpg", SearchOption.AllDirectories);[/CODE] to avoid having to manually check whether the files you've added are images ones, and also with the SearchOption enum you can tell it whether you want only the images in the top directory or the top directory and all … | |
Re: If you haven't added your own Paint event, you can use base.OnPain(null); | |
Re: One way is usign delegates, another one which is easier for smaller applciations is using the BackgroundWorker class, here is an example: [CODE]void StartWork() { BackgroundWorker worker = new BackgroundWorker(); worker.WorkerReportsProgress = true; worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted); worker.DoWork += new DoWorkEventHandler(worker_DoWork); worker.RunWorkerAsync(OptionalObject);// can pass any object … | |
Re: file://localhost/c:/Program%20Files/ Thats what my browser opened if I pointed it to a local path, did you try "file://[B]localhost[/B]/c:/Program%20Files/" ? | |
Re: Or you could just use the FormClosing event and pop a MessageBox asking the user if he wants to save his work. | |
Re: [CODE]if (e.KeyData == Keys.LControlKey) { isCtrlDown = true; e.Handled = true; }[/CODE] Use e.Handled to tell whether the key should go through to the active window. Also I've made such an app myself and one problem I had was that the SendKeys method did not work for fullscreen games(such as … | |
Re: Can you please send me code to access Area51 servers and download everything, thanks. | |
Re: I do like this: [CODE]ProcessStartInfo info = new ProcessStartInfo("http://mywebsite.com"); info.UseShellExecute = true; Process.Start(info);[/CODE] | |
Re: [CODE]MyString.Trim(Path.GetInvalidFileNameChars()).Trim(Path.GetInvalidPathChars());[/CODE] Try that. | |
Re: I'd personally just search for a better audio lib, or you could put the audio player in another thread and just call it from there. | |
![]() | Re: We don't do homework you know. If you want some help then show us that you have put some work into your project. System.IO.Directory you can use that static class to manipulate directories. System.Net.WebClient class to download your files. Use google to find a helpful lib to print the files. ![]() |
Re: Well if you don't have the source code and can't ask the developer to upgrade it to use .NET 2.0: One solution would be to disassemble the application with Reflector to a VS project, open it up in VS fix the problems of the decompilation (there will be some) and … | |
Re: I recommend the [URL="http://code.google.com/p/aforge/"]AForge.NET library[/URL]. Here is an example how it works: [CODE=C#]bool MatchImages(Bitmap WhatToSearchFor, Bitmap TheImageInWhichToSearchFor) { bool result = false; TemplateMatch[] match = Match(WhatToSearchFor, TheImageInWhichToSearchFor); if (match.Length == 0)// no matching images could be found { return result; } if (match[0].Similarity > 0.90)// if a match is found … | |
Re: DateTime datetime = DateTime.ParseExact("10/10/2009 12:00:00", "MM/dd/yyyy HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture); Assuming the 10/10/2009 is day/month/year and really, the above solutions should work just fine. | |
Re: Is the console capable of outputting all that text without the need to scroll up? Are you having to work with someone else's pasta code or is this some sort of frankenstein DB design you have? | |
Re: uSql = "UPDATE Material SET MaterialName=@MaterialName,MatGroupID=@MatGroupID WHERE MaterialID=@MaterialID"; Add a MaterialID parameter and try using the above query. | |
Re: Or you could just use a NumericUpDown control as you SHOULD have done in the first place. | |
Re: Do this: [code=C#]MyForm form = new MyForm(); form.ShowDialog();[/code] What you need is a modal form and the way to pop a modal form up is to use ShowDialog() instead of just Show(). Hope I helped :) | |
Re: Yup as jonsca said, you haven't initialized the array. Either do: [CODE=C#]sprite2D[] AllianceCharacters = new sprite2D[2]; // hold 2 sprite2D objects[/CODE] Or use a List<T>: [CODE=C#]List<sprite2D> AllianceCharacters = new List<sprite2D>;[/CODE] |
The End.