407 Posted Topics

Member Avatar for vicky30312

At a quick glance, your `switch` statement should look like this: switch(HighLow) { case 1: ... break; case 2: ... break; default: ... break; }

Member Avatar for vicky30312
0
167
Member Avatar for srikanth2321

Few questions: Are you using WinForms or WPF? What panel control are you using? Is the panel doing the layout or are you (i.e. do you specifically set the position of each textbox)? What's your code for rearranging the order/layout of the textboxes?

Member Avatar for nmaillet
0
177
Member Avatar for ushananthini
Member Avatar for UNDER-18 FG

Your `isPrime()` method cannot be contained within the `main()` method. You have to keep them separate, like this: public class PrimeNumber { public static void main(String[] args) { ... } public static boolean isPrime(int n) { ... } } You could then call the method, from `main()`, by doing a …

Member Avatar for jalpesh_007
0
703
Member Avatar for sofy

> for i = 3 to i * i < number // start at 3 since 1 and 2 are prime Shouldn't it be `i * i <= number`? Otherwise some square numbers will be improperly considered prime (e.g. 9 or 25).

Member Avatar for sofy
0
363
Member Avatar for amrita111

An external variable has a specific type. Therefore the compiler will do type-checking when compiling. You can also assign a value to a global variable at run-time. As WaltP said, Macros are very different. When a Macro is referenced, the compiler simply copies the value and pastes it in the …

Member Avatar for amrita111
0
155
Member Avatar for naui95

> Well you could parse the c-string with strtok. And why would you rely on a simple C function in a managed language? > how can I put an incrasing variable (for n splitted words) instead of 'Console.WriteLine(word)' I honestly have no idea what you're asking here. Could you elaborate?

Member Avatar for JOSheaIV
0
271
Member Avatar for itla

Please show your code, and explain what the issues are before expecting any help here. We're not here to do your homework for you.

Member Avatar for itla
0
279
Member Avatar for richjohn.bulante
Member Avatar for yigit.hatipoglu

You should create a `Random` class at the beginning of the method, instead of using the `Math` class. The `Random` class gives you the option to generate `int`s directly. `nextInt(n)` returns an integer in the range 0 (inclusive) and `n` (exclusive). So, in your case, you would need to use …

Member Avatar for nmaillet
0
206
Member Avatar for rahul.ch

It is as **JamesCherrill** said. I'll try to explain each of your question as best I can. To simplify, let's assume there's a class called `NewGenericDemo<E>` that derives from `GenericDemo<E>`. K, here we go: 1. In your class, `E` refers to a class which dervices from `GenericDemo`. When it does …

Member Avatar for ~s.o.s~
0
250
Member Avatar for //Gonz

It's possible... you'd have to use Reflection (essentially it makes the program source code aware). I would highly recommend you do not do this, as it can be very prone to bugs/errors and is generally reserved for debugging (or possibley very speciallized circumstances). What are you trying to achieve?

Member Avatar for //Gonz
0
250
Member Avatar for //Gonz

There is an exception being thrown, you can see it by changing your event handler: private void watcher_Changed(object sender, FileSystemEventArgs e) { try { ... } catch(Exception exc) { MessageBox.Show(exc.ToString()); //Or Debug.WriteLine(exc.ToString()); ... } } The issue is that the FileSystemWatcher fires the event from a different thread then the …

Member Avatar for //Gonz
0
638
Member Avatar for hanvyj

You generally can't, but you can try the Flag Bad Post link to get the attention of the moderators. Quick thing, Visual Studio Express doesn't have an evaluation period; maybe you downloaded the trial version by mistake...? Try this [link](http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express), and download Visual C# 2010 Express. The programs are split …

Member Avatar for hanvyj
0
235
Member Avatar for paolieanne

According to the second line, its occurring in the `ProjectGUI.findbuttonActionPerformed()` method at line 278 in the ProjectGUI.java file. We'd need to see your source code to help you figure out why...

Member Avatar for nmaillet
0
147
Member Avatar for sivate
Member Avatar for yellowman0021

Is there a question here other than doing your assignment for you? Show some effort and ask some specific questions if you want help here.

Member Avatar for nmaillet
0
74
Member Avatar for tboctavan

The spec tells you to use void methods for everything except for the calculation of gross pay, and they are referring to the return type. They want you to use the [out](http://msdn.microsoft.com/en-us/library/ee332485(v=vs.100).aspx) and [ref](http://msdn.microsoft.com/en-us/library/14akc2c7(v=vs.100).aspx) modifiers to "return" the value to the calling method. Check the links for more info, but …

Member Avatar for nmaillet
0
238
Member Avatar for anisha.silva

`Thread`s only support two types of delegates, ones with no parameters, and ones with a single object parameter. You can use structs (or classes, depending on the circumstances) to pass in multiple parameters, like so: public struct MyParams { public string Name; public int Id; } ... public void RunThread(object …

Member Avatar for nmaillet
0
153
Member Avatar for dhatsah

If you want to set an instance variable an any Object (including a Form), the variable itself must be public. The access level of the function it is instantiated in doesn't matter. If it is declared in a function, then it is a local variable to that function, and inaccessible …

Member Avatar for jireh
0
126
Member Avatar for zee89
Member Avatar for TnTinMN
0
91
Member Avatar for anisha.silva

You shouldn't have to download it; it should be included with the .NET Framework. If you are using Visual Studio: 1. Right click on **References**, in **Solution Explorer** under the project you want the reference included in. 2. Click **Add Reference...**. 3. Click the **.NET** tab. 4. Select **Microsoft.VisualBasic**. If …

Member Avatar for nmaillet
0
288
Member Avatar for anisha.silva

Could you post some code to show what you are trying to accomplish? And please quit bumping your posts; I can't speak for others, but I tend to read posts with 0 replies first.

Member Avatar for nmaillet
0
186
Member Avatar for SuburbanSamurai

What about `SetTimer()` (see [Timers](http://msdn.microsoft.com/en-us/library/windows/desktop/ms632592(v=vs.85).aspx))?. This allows you to specify a Window handle, so a `WM_TIMER` message will be posted to the message loop when it expires. Keep in mind that this won't be incredibly accurate.

Member Avatar for Ancient Dragon
0
210
Member Avatar for jakub.peciak

You just need another `For Each` loop, instead of the `If` statement, to iterate through each `XElement` of `product.Elements("productsessiondata")`.

Member Avatar for jakub.peciak
0
400
Member Avatar for jaydipzatakiya10

Nobody is going to do your work for you. Give it a try, show us some work and ask specific questions if you run into any issues, if you want any help.

Member Avatar for nmaillet
0
88
Member Avatar for rajilakshmi

You could use the [Card Layout](http://docs.oracle.com/javase/tutorial/uiswing/layout/card.html) for this. Basically, you add `JPanel`s to a container, and call the `show()` method on `CardLayout` object to specify which panel to display.

Member Avatar for stultuske
0
130
Member Avatar for kirtee2209

Just so I'm clear, you are instantiating a new instance of your Form (i.e. `new SomethingForm();`) before each call to `ShowDialog();`, correct? I tried your code, and it seems to be working. Also, a stack trace is nice, but what is the actual exception you are getting (class and message)?

Member Avatar for kirtee2209
0
2K
Member Avatar for ShEeRMiLiTaNt

It's shorthand for: carry = carry / 10; You can use it for many operators, see the **Compound assignment** section of [this article](http://www.cplusplus.com/doc/tutorial/operators/).

Member Avatar for Agni
0
248
Member Avatar for nitin1

That seems way more complex then it needs to be. You should be able to do that with one for-loop and without the `dp` array. You can use a few of variables, such as `count`, `max_count` and `max_num`. Use `count` for each sequence. Once your done with a sequence (i.e. …

Member Avatar for nitin1
0
282
Member Avatar for prince.chindah

This isn't a free tutoring service. There are plenty of free easy online tutorials for just about any programming language.

Member Avatar for MandrewP
0
181
Member Avatar for 9tontruck

If we're just talking about C#/.NET, I've had a much better experience with WPF over WinForms. As long as you know what you are doing, it can be pretty easy to make some fairly complex GUI's work very well across different systems. No solution will ever be perfect though...

Member Avatar for 9tontruck
0
191
Member Avatar for Andy90

Try [this](http://www.dreamincode.net/forums/topic/45693-controlling-sound-volume-in-c%23/). Changing the system volume relies on the Windows API, which requires [COM Interop](http://en.wikipedia.org/wiki/COM_Interop), so there will be no simple way to do it (aside from finding a third-party library that provides a simplified interface, which I haven't seen). There is no way to do it directly with the …

Member Avatar for nmaillet
0
149
Member Avatar for Cameronsmith63

How is it any different? What's your code for exporting in a Form? And what's not working about it in a console application? You might simply be missing references...

Member Avatar for NanaYee
0
155
Member Avatar for semicolon

> is there some code sample to extract? When you install UnRAR.dll, it has some code samples, including one for C#. Look for `UnrarDLL\Examples\C#\` in your Program Files folder.

Member Avatar for nmaillet
0
231
Member Avatar for mcmanuel20
Member Avatar for shanki himanshu

The `^` is used for XOR operations; see [Boolean Operations](http://www.cplusplus.com/doc/boolean/).

Member Avatar for deceptikon
0
140
Member Avatar for ms061210

Couple things: 1. Titles that start with "PLEASE HELP ME" are annoying. 2. Using all caps in bold for your post is even more annoying. Now, as for your code. I don't understand what a "sequence" is supposed to be; it looks like your putting one result into a text …

Member Avatar for Begginnerdev
0
183
Member Avatar for akashi
Member Avatar for nmaillet
0
117
Member Avatar for bobejoe
Re: gui

Here ya go: [Win32 Assembly GUI](http://lmgtfy.com/?q=win32+assembly+gui).

Member Avatar for untio
0
90
Member Avatar for ougesh
Re: ATM

Start by declaring a boolean variable before the for-loop: bool correct_pass = false; Then, you set it to true inside the for-loop, when the password is correctly entered: for (int i=0;i<3;i++) { ... if (pass=2468) { correct_pass = true; break; } ... } Then you just check to see if …

Member Avatar for ougesh
0
111
Member Avatar for sagarpulidindi
Member Avatar for napninjanx

If you want performance, you should use a low level language (such as C/C++). If you want to simplify the coding, you could use a managed language (such as Java, C# or VB.NET). That is not to say that a managed language wouldn't be more than sufficient. For instance, [Paint.NET](http://www.getpaint.net/) …

Member Avatar for nmaillet
0
42
Member Avatar for jontennyeah

If you're using WinForms, you could use the [MaskedTextBox](http://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.aspx) control.

Member Avatar for G_Waddell
0
435
Member Avatar for singh.ranjeet

> Pls Be early To provide code in two three days. And when did you start signing my paycheques? > I am new in programming Well, this is a great opportunity to learn. Give it a try.

Member Avatar for TnTinMN
0
146
Member Avatar for nayna.kujur

From [WM_TIMER message](http://msdn.microsoft.com/en-us/library/windows/desktop/ms644902(v=vs.85).aspx) in the WinAPI documentation: > The WM_TIMER message is a low-priority message. The GetMessage and PeekMessage functions post this message only when no other higher-priority messages are in the thread's message queue.

Member Avatar for nmaillet
0
109
Member Avatar for nayna.kujur

Start with the [basics](http://lmgtfy.com/?q=win32+tutorial) of getting a window to display, and go from there.

Member Avatar for nayna.kujur
0
100
Member Avatar for carba540

I ran your code, and it seems to be working fine (although you should probably use `e.Index` instead of `checkedListBox1.SelectedItem`). Did you register the methods with the corresponding events, either through Visual Studio's properties panel, or with the following code (in the Form's constructor)? checkedListBox1.ItemCheck += checkedListBox1_ItemCheck; checkedListBox1.SelectedIndexChanged += checkedListBox1_SelectedIndexChanged;

Member Avatar for nmaillet
0
195
Member Avatar for paoi00

What do you mean by "upload"? Assuming you want an image to stretch/zoom to fill the PictureBox, you can use the [PictureBox.SizeMode](http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.sizemode.aspx) property.

Member Avatar for nmaillet
0
137
Member Avatar for hwoarang69

Unless you have a system with a MIPS architecture, you'll need to use a simulator to run it. A quick Google search turned up [MARS MIPS Simulator](http://courses.missouristate.edu/kenvollmar/mars/). FYI, a program to converters assembly language into machine code is generally called an assembler.

Member Avatar for nmaillet
0
105

The End.