|
If you embed the key inside the executable, then there is always the possibilty (however small) that someone will extract the key with a tool like Resource Hacker^ or, if they are really determined, they will do it with a hex editor. So encryption is a must.
If everything was not true, would it be not true that everything is not true? So by saying everything is not true, you are automatically denying that everything is not true. Im so confused...
FreeDOS
- An open source modern
MS-DOS/PC-DOS replacement.
|
|
|
|
|
hi
i need to know about "how to avoid the validation on form closing " .
when iam put some validations for text boxes when i closing the form it will risises the validation even .
|
|
|
|
|
you can either make a class level variable and set it to true in the form_closing event. then in each event, check if the variable is true and if so...get out of the event. you can also check if me.isdisposed and get out if that is true also...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I m using MSChart control in VB.NET 2005. It is working properly in my system(In coding time & after installation).
When i installed setup package in other system not working windows throws a Error.
How can come out from this problem?
|
|
|
|
|
I presume you tested the installation on your dev machine.
When you create a reference (to the control DLL) you need to make sure you set the copy local flag, this will then include the DLLs in your distribution (clickonce) otherwise just make sure the dll is included in your setup package.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I was check it is there
But still problem is there.
|
|
|
|
|
I am Trying to Turn on and off a light base on a value of a sencor
i dont no what i am doing wrong i looked it up and found a few examples and i just can see what wrong
so this is what i have
one text box that is showing the Value of the sencor called TempSensors
I have a other text box that have a input value TempNum
and i have a light called phidgetIFK.outputs
what i am trying to do is when tempsencors reaches or go over what is in TempNum it will triger a light on phidgetIFK.outputs
This is what i coded
Private Sub TempNumH_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TempNumH.TextChanged
Dim Temp As Integer
Temp = TempSensors.Text
If Temp >= TempNumH.Text Then
phidgetIFK.outputs(0) = True
Else
phidgetIFK.outputs(0) = False
End If
End Sub
Thanks for anyones help in advance
|
|
|
|
|
Without knowing what errors you are seeing...
In your If condition (Temp >= TempNumH.Text ) you are trying to compare an Integer value and a String value. You need to ensure that you cast both TempSensors.Text and TempNumH.Text to Integer values before comparing them.
You also need to ensure that phidgetIFK.outputs(0) is an actualy Boolean value as well.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
I tryed this now
Private Sub TempNumH_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TempNumH.TextChanged
Dim Temp As Integer
Dim TempNum As Integer
Temp = TempSensors.Text
TempNum = TempNumH.Text
If Temp >= TempNum Then
phidgetIFK.outputs(0) = True
Else
phidgetIFK.outputs(0) = False
End If
End Sub
and this is what i get
An error occurred creating the form. See Exception.InnerException for details. The error is: Conversion from string "" to type 'Integer' is not valid.
???
i dont no how to check if phidgetIFK.outputs(0) is an actualy Boolean value
I am just starting out and i think i might be taking on to much for starters
Thanks Scott
modified on Friday, August 7, 2009 9:10 AM
|
|
|
|
|
Bob Beaubien wrote: Temp = TempSensors.Text
converting strings to integers probably fails on an empty string.
Bob Beaubien wrote: i might be taking on to much for starters
Here is my recommendation[^] for you.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
try this:
Dim TempSensed As Integer = TempSensors.Text
Dim TempReference As Integer = TempNumH.Text
Console.WriteLine("sensed=" & TempSensed & " ref=" & TempReference)
phidgetIFK.outputs(0)= Temp >= TempNumH.Text
and you will see what is going on.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
modified on Friday, August 7, 2009 7:12 AM
|
|
|
|
|
Hi Luc
I try what you told me to try and this is what i got
The error is: Object reference not set to an instance of an object."}
Thanks
Y
|
|
|
|
|
Do you know how to set a breakpoint and use the debugger to step through your code line by line ?
In your source code you would place the cursor on the line where you want the application to stop executing and press the F9 key; this will set a breakpoint on that line. Now run your application by pressing the F5 key and when the program hits the breakpoint, you will see your source code and you can execute the program line by line by pressing the F8 key.
You should be able to figure out your logic error using this method.
Regards,
David
|
|
|
|
|
dear all
i would like to calculate the ATAN(), but how to add math library or component to project? thanks a lot.
|
|
|
|
|
You should be able to refer to the static Math class, like this
Math.Atan() The Math class is part of the System namespace and should already be available in your project without needing to add additional references.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
|
Well for 1, if all these classes are in the same namespace you wont be able to compile.
You can't have multiple classes with the same name in any namespace (except with partial classes ... but those are really only one class spread over multiple files).
You have declared the Hello class 3 times, that is not even close to valid.
2nd;
in all your classes you override your function 'hi' with a different signature than the one defined in Hello. A signature is a combination of the name of the function and the parameters it expects. For your 'hi' function in [Hello] you declared it as not expecting any parameters, the in your inherited classes you are trying to override it with a function that expects a string as a parameter.
You should really read this article[^] to help you understand inheritance because it seems like your not totally understanding it.
so your code should look something like this; (Probably wont compile because my VB is very rusty)
public mustinherit class Hello
'What you had
public MustOverride Function hi() as string
'What i added because you were trying to override this without having it
public MustOverride Function hi(byVal name as String) as string
end class
public class NorthEasterner
inherits Hello
'this HAS to be overriden because its declared as 'MustInherit'
public Overrides Function hi() as String
'No name was passed in so just welcome the stranger
return "Hello Stranger"
end function
'this HAS to be overriden because its declared as 'MustInherit'
public Overrides Function hi(ByVal name as String) as String
return "How ya doin," & name
end function
end class
public Class DragRacer
Inherits Hello
'this HAS to be overriden because its declared as 'MustInherit'
Overrides Function Hi() As String
Return "Start your engines!"
End Function
'this HAS to be overriden because its declared as 'MustInherit'
public Overrides Function hi(ByVal name as String) as String
return "Start your engines " & name & "!"
end function
End Class
public Class Euro
Inherits Hello
'this HAS to be overriden because its declared as 'MustInherit'
Overrides Function Hi() As String
Return "Caio"
End Function
'this HAS to be overriden because its declared as 'MustInherit'
public Overrides Function hi(ByVal name as String) as String
return "Caio " & name
end function
End Class
You could put all of these classes in separate code files, just make sure they are all in the same namespace and your golden. By default all of the code files you add should share the 'Default Namespace' defined in the project properties dialog.
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
|
Celina69 wrote: I have an assignment
so it is YOUR assignment. we don't do homework here, and your prof probably reads this site too.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Great ...
You NEED to read up on inheritance, especially if this is a project for school.
Inheritance is a very important aspect of the .NET framework ( or any OO language for that matter) and not understanding it will do nothing but cause headaches in the future.
I'm sure you were assigned a book to read that covers this in painful detail.
I AM NOT GOING TO COMPLETE YOUR PROJECT FOR YOU, although I can't blame you for trying.
Not to mention I'm positive your teacher is familiar with CP, and I'm also pretty sure getting code of the net for your project is a big no no.
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
The obvious thing to do is to create a new project (probably a Console app) and paste the code snippets into it (one at a time).
The compiler will tell you if there any syntax errors.
You can fix those and then try running the code to see if there are any run-time errors (step through it with the debugger).
That way you will learn something.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
Do not repost. It is considered rude here.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
|
Sometimes silence can be deafening...
My advice is free, and you may get what you paid for.
|
|
|
|