|
Unfortunately there are a lot of people who just post absolute beginner stuff without doing any kind of research themselves, like we can just somehow magically make them understand everything. I mean honestly, the time it takes to wait for a reply from someone on a forum is probably a lot longer than it would take to figure it out on your own.
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
Exactly, and how hard can it really be to just freakin' google it?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
download bob tubor tutorial videos on microsoft learning (absolute beginners lessons)
download both c# and sql lessons, he teaches you that and it is free
nelsonpaixao@yahoo.com.br
|
|
|
|
|
Is it possible to increase or decrease the brightness of a display (digital display connected via DVI) using API calls ?
If so, does someone have an example of the API usage? I imagine it's part of the DirectX API's.... which I've never used before.
Thankyou very much for any help.
|
|
|
|
|
|
abiemann wrote: Is it possible to increase or decrease the brightness of a display (digital display connected via DVI) using API calls ?
I know NVidia has software that automatically does all that for you, so it is quite possible .
How - I don't know.
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
Click here to view my blog
|
|
|
|
|
this.presetTableAdapter.ExistPreset(txtToolNumber.Text);
I am trying to access a single value from a dataset, this is how i am calling it, how can i access the value from that dataset? It either outputs a 1 or a 0, pretty straight forward right?
|
|
|
|
|
ExistPreset doesn't seem to be framework's method. If this is true, what's the implementation?
|
|
|
|
|
|
Ok. In your post you don't assign the return value to any variable. Is this only missing from the post?
You could use following steps to find out the problem
- execute the procedure directly against the databse in Query window, see that it works
- check the properties of the TableAdapter, everything as it should be
- debug through ExistPreset-method and observe the values in variables, everything as it should be
- use plain SqlCommand to execute the procedure and see what it returns
|
|
|
|
|
|
|
|
Okay,
Since you get an exception, you should be able to see the source from the stack. You're right, it can be any class that is not instantiated, but stack trace should give you a good picture what class is causing the problem.
Also if you define the debugger to stop on exceptions, you should get to the actual location where the exception is occuring, where you can use QuickWatch to see which object is null.
When using debugger, remember that if the dataset definition is created by Visual Studio, it most propably has DebuggerStepThrough-attribute defined. Comment that out and you can debug inside generated code
|
|
|
|
|
|
Possible reasons for "Object reference not set to an instance of an object." on that line are:
- this = null (not likely)
- this.tableAdapter = null, is it?
- txtToolNumber = null, is it?
- return value of (this.presetTableAdapter.ExistPreset(txtToolNumber.Text)) = null (you can see this by debugging inside the method).
If none of those are null the problem is in my understanding inside ExistPreset-method, which (I presume) is genereted by VS, but still debuggable and observable (you can see this by right clicking on the method and selecting go to definition).
|
|
|
|
|
How do you dispose a generic list? Does myList = null solve the problem or does this only remove the reference to the instance and wait for the GC?
|
|
|
|
|
In general, you should wait for the garbage collector to clear up resources.
|
|
|
|
|
Disposing only cleans up the unmanaged resources held by the object. The object itself can only be cleaned up by the GC.
|
|
|
|
|
kensai wrote: does this only remove the reference to the instance and wait for the GC
Yes, that is correct. If you are completely desperate to get the memory back however, it is possible to force the garbage collection afterwards (however I wouldn't reccomend it unless you are having *severe* problems without)
Chris
|
|
|
|
|
Hi,
I am creating a custom action that override the uninstall of my setup.
the aim of the action is to remove files that the application creates (not created by the setup but on runtime).
How can I retrieve the path of where the installation is installed (like Application.StartupPath).
Thanks,
|
|
|
|
|
I worked on a similar functionality before and what I did is added the path as a value to a key in the registry during installation and then used that for uninstall.
|
|
|
|
|
Thanks, But I don't what to use the registry.
Does an another way exists?
|
|
|
|
|
the install directory is stored in the TARGETDIR property - you can pass that as a parameter to your custom action
|
|
|
|
|
Hi,
I got a problem in focus at a treeNode of a treeView on a panel by program.
Even I set treeNode1.Focus(), the node still can't get focus.
There is no problem where the treeView is just on the form without the panel.
How to solve it ?
Thanks
|
|
|
|