2,157 Posted Topics

Member Avatar for castajiz_2

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.

Member Avatar for Ketsuekiame
0
368
Member Avatar for kimbula...

> 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

Member Avatar for kplcjl
0
5K
Member Avatar for lxXTaCoXxl
Member Avatar for padillian
0
2K
Member Avatar for theashman88

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 …

Member Avatar for cgeier
0
441
Member Avatar for kristy48

> 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 …

Member Avatar for Momerath
-5
322
Member Avatar for coBra

He posted this nine years ago, why on earth would you reply to it?

Member Avatar for Momerath
0
660
Member Avatar for BogdanCov

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.

Member Avatar for BogdanCov
0
192
Member Avatar for Bitgod

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 …

Member Avatar for Momerath
0
219
Member Avatar for AmrMohammed
Member Avatar for lj81

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 …

Member Avatar for Momerath
0
405
Member Avatar for <HHH>

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 …

Member Avatar for <HHH>
0
393
Member Avatar for waseem1345

If it takes 10 seconds to iterate through your controls, you have other issues that need to be resolved.

Member Avatar for waseem1345
0
160
Member Avatar for BogdanCov

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.

Member Avatar for Momerath
0
181
Member Avatar for waseem1345

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. …

Member Avatar for waseem1345
0
539
Member Avatar for Dziri_1

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

Member Avatar for Naravia
0
226
Member Avatar for waseem1345
Member Avatar for Ajay_9

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 …

Member Avatar for castajiz_2
0
259
Member Avatar for GrantB

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 …

Member Avatar for Ketsuekiame
0
2K
Member Avatar for SkyCross

Which would have taken you 10 seconds to look up on MSDN instead of wasting everyones time posting here.

Member Avatar for ZER09
-1
421
Member Avatar for Johnathon332
Member Avatar for tanatos.daniel

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.

Member Avatar for tanatos.daniel
0
447
Member Avatar for Ajay_9
Member Avatar for theashman88

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 …

Member Avatar for castajiz_2
0
444
Member Avatar for phephe

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 …

Member Avatar for Armen_2
0
2K
Member Avatar for SkyCross

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 …

Member Avatar for Momerath
0
791
Member Avatar for nemzmiyaw

Set the registry key to this value: HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr = dword:1

Member Avatar for RGSOHEL
0
2K
Member Avatar for Ari_Larsson

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.

Member Avatar for Momerath
0
67
Member Avatar for priyanshu.net
Member Avatar for c1ockwerk

[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; …

Member Avatar for newdev
0
4K
Member Avatar for dearrajaguru
Member Avatar for Mike Askew
0
523
Member Avatar for castajiz_2

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.

Member Avatar for castajiz_2
0
322
Member Avatar for Doctor Inferno
Member Avatar for beginnerinneed

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. …

Member Avatar for hreylorbe
0
8K
Member Avatar for Xcelled194

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 …

Member Avatar for sahil000005
0
1K
Member Avatar for castajiz_2

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 :)

Member Avatar for castajiz_2
0
284
Member Avatar for priyamtheone

> 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 …

Member Avatar for Momerath
0
214
Member Avatar for bullet_1

Line one should read string[] allFiles = System.IO.Directory.GetFiles(textBox1.Text);

Member Avatar for Momerath
0
198
Member Avatar for sch85
Member Avatar for pitic
0
285
Member Avatar for wendas

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 :)

Member Avatar for Momerath
0
276
Member Avatar for Xakzi

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 …

Member Avatar for Xakzi
0
231
Member Avatar for castajiz_2

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

Member Avatar for castajiz_2
0
320
Member Avatar for null_pointer

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.

Member Avatar for KushMishra
0
226
Member Avatar for erdhimant.patel

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.

Member Avatar for Momerath
0
220
Member Avatar for JOSheaIV

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 …

Member Avatar for JOSheaIV
0
214
Member Avatar for mslittle1

1. Convert the number to a string. 2. Realize that a string can be treated as an array of characters. 3. Profit!

Member Avatar for mslittle1
1
472
Member Avatar for rahulsingh725

Get your results into a collection, then use [String.Join](http://msdn.microsoft.com/en-us/library/dd783876.aspx)

Member Avatar for JOSheaIV
0
209
Member Avatar for </scorpion>

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, …

Member Avatar for </scorpion>
0
236
Member Avatar for darrylnuyda

Read [this](http://win8review.com/2011/10/2008-is-not-a-valid-warning-number-and-intellisense-problems-in-visual-studio-2010-after-installing-vs11/)

Member Avatar for darrylnuyda
0
125
Member Avatar for maurices5000

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.

Member Avatar for maurices5000
0
266
Member Avatar for iFrolox

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.

Member Avatar for iFrolox
0
2K

The End.