|
lunch time. bye..after 1 hr.
|
|
|
|
|
if u want to close application on close button
then write this code on close button click
Application.Exit();
|
|
|
|
|
write above reply mail on close button of login page.
and replay me
|
|
|
|
|
gng for lunch.
tell u later.
nekshan
|
|
|
|
|
Arey, 'close' is not my button, it is the form close button on top right side with minimize n restore buttons.
|
|
|
|
|
Private Sub formName_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Application.Exit();
End Sub
this is the even of form this is called at the time of form closing. ok
and formName is the name of form.
|
|
|
|
|
thanx, yes it is working.
take care. cu
|
|
|
|
|
how can i add .netframework to my application..
while i deploy i saw prerequsites but it is not adding
the downloaded .netframework which i have on my local desktop
thanks bye
|
|
|
|
|
You can't add the framework to your app, you need to deploy it seperatly.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
private void button1_Click(object sender, EventArgs e)
{
conn.Open();
System.Windows.Forms.Form login_ = new login();
login_.Show();
if (login_.Close())
{
Application.Exit();
}
conn.Close();
}
|
|
|
|
|
Can anyone know how to export SQL Server database to MS Access using C#
Know Yourself Then Grow Yourself.
|
|
|
|
|
Hi
Create two connection. First connection open sql server db and access in next con. Write a loop that fetches data from SQL server and inserts into access.
Cheers
Navaneeth!!
www.w3hearts.com
|
|
|
|
|
I am just learning C#, and am having a problem with it that I don't know what I'm doing wrong with.
I have a method that asks for and recieves two numbers. These are parsed into two int's, and then stored. The next method is supposed to add the two numbers together, and give a return, i.e. sum. I also have outside the methods but inside the class "int firstNum, secondNum" declared.
When I try to call the method using;
DetermineNumberSum(firstNum, secondNum);
I am told that my firstNum and secondNum are errors because of "Use of unassigned local variable 'firstNum/secondNum".
I have not got a clue as to what is going on. Can anyone point me in the right direction so that I can solve this problem.
Thank you in advance for your input.
|
|
|
|
|
just Initialize like below.
firstNum =0,secondNum=0;
i hope it will work
Know Yourself Then Grow Yourself.
|
|
|
|
|
I'm sorry, I think that I didn't express myself correctly. the two numbers are initialized by whatever the user puts into the the original string. The string is then parsed into an "int".
public static void fetchTwoNumbers(out int firstNum, out int secondNum)
{
Console.WriteLine("Type in the first number.");
string strFirst = Console.ReadLine();
firstNum = int.Parse(strFirst);
Console.WriteLine("Type in the second number:");
string strSecond = Console.ReadLine();
secondNum = int.Parse(strSecond);
}
As you can see some input is needed to initialize them.
Thank you though.
|
|
|
|
|
You are using the variables firstNum and secondNum, and have not assigned them a value. Local variables must have a value assigned to them before they can be used.
You said something receives two numbers and parses them into ints, I can only assume it looks like this:
Int32.Parse(strFirstNumber);<br />
Int32.Parse(strSecondNumber);
Well, when you do that you must not be storing those values into either firstNum or secondNum. So after declaring firstNum and secondNum, aka "int firstNum, secondNum;" you need to say something like:
firstNum = Int32.Parse(strFirstNumber);<br />
secondNum = Int32.Parse(strSecondNumber);
Then call:
DetermineNumberSum(firstNum, secondNum);
|
|
|
|
|
This is the coding I have at present. I think it is what you are saying.
public static void Main()
{
int firstNum, secondNum;
DetermineNumberSum(firstNum, secondNum);
fetchTwoNumbers(out firstNum, out secondNum);
}
public static void fetchTwoNumbers(out int firstNum, out int secondNum)
{
Console.WriteLine("Type in the first number:");
string strFirst = Console.ReadLine();
firstNum = int.Parse(strFirst);
Console.WriteLine("Type in the second number:");
string strSecond = Console.ReadLine();
secondNum = int.Parse(strSecond);
}
public static int DetermineNumberSum(int firstNum, int secondNum)
{
int numberSum;
int first = firstNum,
second = secondNum;
numberSum = first + second;
Console.WriteLine();
Console.WriteLine("The sum of the numbers is: {0}", numberSum);
return first + second;
}
It should work but, I am still getting the "Use of unassigned local variable 'firstNum/secondNum'. I don't know why. Thank you for your input though.
|
|
|
|
|
JMOdom wrote: int firstNum, secondNum;
DetermineNumberSum(firstNum, secondNum);
No, this cannot work. You need to assign values to firstNum and secondNum, OR use them as out parameters. You try to use them BEFORE using them as out parameters, and you didn't give them values to start with, which is always bad programming. You should also create one variable per line, for readability.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Using pdflib library in C# I have created a pdf file which is
protected using owner password .Different options are disallowed like
print, copy contents etc. Things were working very fine untill i came
to know about some password crackers which could easily crack the
file , eliminating the password , thus making it possible for
operations like printing, copy etc .
The study showed that using user password as well will make the file
strong enough to be decrypted ,but "user password" is not a solution
in my case .
The code which actually creates a pdf file using pdflib is as under :
PDFLib obj = new PDFLib();
obj.begin_document(FileName, "masterpassword=23wdlm3ldjwld4w
permission={noprint}");
Now i wonder even that the file is encrypted using 128-bit
encryption , how a password cracker can retrieve that stored password
form the encrypted file .What operation is performed by the cracker to
remove the password and making the file accessible for all options .
Can any one please help me in this ....
Regards,
Madni
Madni
|
|
|
|
|
Please don't cross post.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi there,
I use LPT for printing my documents because i want to control my pages and lines,but when i want to print an image it takes too long to convert the image into monochrome bitmap for black/white printers and also there is a puase between each line of printing.I want to know how Windows prints images so fast...
thanks
|
|
|
|
|
Converting an image to greyscale shouldn't take very long.
I imagine that Windows really just passes the images to the print driver, and the driver does the rest.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
it is so,but the point is when we are using windows to print,there is no control over pages and lines of printing which causes so many trouble in continuos papers.
|
|
|
|
|
How do you mean by 'using windows to print' ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i mean when we are using .net to print
|
|
|
|