2,157 Posted Topics
Re: You may want more than one random number generator so that you have more than one sequence at a time. Also, if it were static, you'd have to include code to make it thread safe across the entire system. | |
Re: > their only options when mouseless is to hold down the power key (not counted as a keyboard key) for a minute or bring up task manager (no personal clue how to do that without a mouse), Control-Shift-Escape | |
| |
Re: Line 15 should be <=, not >= . It's also standard to start at zero, not 1, so the line would look like `for (int totRoll = 0; totRoll < 360; totRoll++)` What are dice1 and dice2 for? No one asked you to store the individual rolls or a count … | |
Re: > I am afraid that if I don't post to this, the information contained in the thread will be lost. Why would you think that? It's been here for 6 years so far. And a simple web search turns up thousands of pages that tell you what you want to … | |
Re: He posted this nine years ago, why on earth would you reply to it? | |
Re: You are adding all the panels to panel1 and all the buttons to panel1. If you added the buttons to the panel it is to affect, then you could use the buttons Parent property to get the panel you need. | |
Re: You should have a class for each type of report and a class for displaying each type of report. You then have a class (Report class) that takes an instance of the class for the report and the class for displaying the report. Then you'd have a factory class that … | |
Re: I suggest you learn how to use a seach engine. | |
Re: You'll never get them at exactly the same time unless each frame from the camera comes with a timestamp, and even then it will depend on clock resolution. How long does it take to capture a frame? Are you multi-threading the capture process? Is the system doing anything other than … | |
Re: To explain what the original problem was is that while line 7 allocates space to hold references to your class, it doesn't actually create the classes. You can see in ddanbe's code, on his line 7, creates a new Person object and assigns it to the array. Also, your property … | |
Re: If it takes 10 seconds to iterate through your controls, you have other issues that need to be resolved. | |
Re: Well the video player is still on top of the panel, so of course you can't see what's on the panel. Try hiding/removing the video player. | |
Re: There is no need to pass any of that stuff by reference, remove it all. You mix modes (windows controls writing to the console). Your methods have overly complicated signatures and almost all that code (if not all of it) should be inside a different class, not in your form. … | |
Re: You can only update controls on the thread that created them. Your new thread isn't that thread so you have to [Invoke](http://msdn.microsoft.com/en-us/library/zyzhdc6b%28v=vs.110%29.aspx) the controls | |
Re: Did you check the results for error messages? | |
Re: You don't seem to have a question in there, just a statement of what you want to do. Since we don't do your work for you, you'll have to do some and then if you get stuck, ask :) I will tell you that depending on choices you make about … | |
Re: So you want a six digit number that doesn't have repeating values in it (382945 is good, 235782 is bad). Well, one way to look at the problem is that you want a combination of the set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} in a group … | |
Re: Which would have taken you 10 seconds to look up on MSDN instead of wasting everyones time posting here. | |
Re: http://msdn.microsoft.com/en-us/library/bew39x2a%28v=vs.110%29.aspx | |
Re: Wouldn't the Text property always contain the value they want? If they selected one from the list, it would be displayed in the Combobox input area (the Text property). If they typed it in, again it's in the Text property. | |
Re: The line actually consists of two actions: 1) randomNumbers.Next( 1, 7 ) - This generates a number from 1 to 6. We'll call this X so it doesn't confuse you in the next part 2) ++frequency[X] - This gets the value at index X. We'll call that value Y. It … | |
Re: Holy resurrection, this thread is almost 5 years old. That said, how to calculate a factorial has already been given. Since you are doing small number factorials (20 is small) the methods here will be fast enough. All you need to do is figure out what numeric type to use … | |
Re: Since we don't know your table definition, I can't point to the exact problem, but you are trying to store something in a field that isn't large enough to hold the value you are attempting to place there. This most likely is a numeric field. You are also attempting to … | |
Re: Set the registry key to this value: HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr = dword:1 | |
Re: Unless you're making them guess a novel as the 'word', you don't need specialized string matching. Most languages have a 'find this string in that string' command already that will work just fine. | |
Re: http://en.wikipedia.org/wiki/DICOM has links to the DICOM standard | |
Re: [code]using System; using System.Diagnostics; using System.IO; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { String line; Process p = new Process(); p.StartInfo.Arguments = "/c dir"; p.StartInfo.UseShellExecute = false; p.StartInfo.FileName = "cmd"; p.StartInfo.RedirectStandardOutput = true; … | |
Re: Four year old thread, everyone involved is dead now. | |
Re: You'll have to explain more what you want. Progress Bar object that are referenced as Control objects can be converted with an explicit cast. If they aren't Progress Bar objects, they can't. | |
Re: Wrong forum :) But it skips the first column because you haven't added a name to the ListViewItem, just added SubItems. item1.Text = "something" should go in the first column. The listview should already be part of the controls collection if you added it to the screen in the designer. … | |
Re: You are going about finding printers in an odd way, just use [URL="http://msdn.microsoft.com/en-us/library/system.printing.localprintserver.aspx"]LocalPrintServer[/URL]. Other than that, I'm not sure if you can. You don't actually print to a printer anymore, you print to a print queue (which then gets sent to the printer). The print queue takes on some of … | |
Re: Take a list of words and build a Trie from them, make random choice at each branch for which letter comes next. You'll need to learn what a Trie is, and how to use it :) | |
Re: > As we know, local variables are destroyed automatically when the control flow goes out of the scope of the method it belongs. So, is it necessary to dispose a brush object every time if it is local? While the reference is on the stack, the actual brush object is … | |
Re: Line one should read string[] allFiles = System.IO.Directory.GetFiles(textBox1.Text); | |
Re: Are you paying him to write your code? No? Then make some effort on your own. | |
Re: I think finding a 4 year old post and berating the poster (who also hasn't log on in 4 years) shows what a bad forum user you are :) | |
Re: Use an OpenFileDialog box to have the person select the file. Use File.ReadAllLines to get what is in the file. Use String.Split to split the line into it's three parts. Use Double.TryParse to convert the strings into doubles. Do your math. Set Textbox.Text to the result, converted to a string … | |
Re: That's because you dispose of the graphics object in your RotateImage method. DOn't do that, the system needs it. Dispose of objects *you* create, not ones the system hands you. So get rid of the 'using' statement and the Dispose statement | |
Re: namespace is a block statement, which means it only operates on the next line, or on anything within the {} that define the block. You don't have {} around your code for the namespace. | |
Re: If you set the KeyPreview property of the Form to true, it will get to see if it wants to handle the keypress before it's passed on to whatever control has focus, so you don't need a handler for all the controls, just one for the form. | |
Re: There is no need to pass ImageData as a reference, you're just making it use a more and more indirect way of accessing your list (objects are passed by reference already). That's also a ... unique way to add your data. The rest of us create object, populate their fields … | |
Re: 1. Convert the number to a string. 2. Realize that a string can be treated as an array of characters. 3. Profit! | |
Re: Get your results into a collection, then use [String.Join](http://msdn.microsoft.com/en-us/library/dd783876.aspx) | |
Re: Create a new form, make it boarderless and the exact size of the date picker. Add a date picker to it. In the TextBox.Click event, open the form in and let them pick a date. Take the date from the form and put it in the textbox. Write some code, … | |
Re: Read [this](http://win8review.com/2011/10/2008-is-not-a-valid-warning-number-and-intellisense-problems-in-visual-studio-2010-after-installing-vs11/) | |
Re: You are missing a reference in your solution. Right click the 'references' in your project explorer, select add, .NET tab and System.ServiceModel. You may have to add other the the ServiceModel references as you start using their classes. | |
Re: So what is it doing? Did you call Refresh() on the ListView so it would redraw? Why are you looking at the one previous to the first selected in line 8? Maybe you can explain better what you want to have happen by showing an example. |
The End.