|
Hi all i want create DLL file and give it trial period (like many software has demo period for month )
Please reply
|
|
|
|
|
In your class' constructor, code the following algorithm before any other code:
1. Check the appropriate registry key for the date of first use of your dll.
2. If it's not there, create a new value and store it in the registry at some proper place.
3. If the test in step 1 turns out to be positive, then check this value against the current system date and throw some custom exception if the period has expired or continue initialization otherwise.
4. You can also use some other trick, if you don't want to use registry, such as some hidden file etc.
Excuse me for buttin' in, but I'm interrupt driven.
|
|
|
|
|
You have Ask two things at the same time.
Creating a DLL , you just create a Class Project from VS and Creating a Trial Period its another thing.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
Hi,
How can I show progressbar while I am seinding email with attachment.
When I send email with any attachment then I get only freezed window,insetead of this I want to show progressbar which will fill until email is sent.
Regards
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Please explain your question more clearly. Are you interfacing directly using SMTP or you're using some thrid party library.
Excuse me for buttin' in, but I'm interrupt driven.
|
|
|
|
|
If you're using standard framework class then use Send method or SendAsync to send an email. The SendAsync doesn't block the thread but you'll receive an event only when it will be finished. I think that you can only simulate the progress of sending message till you got a status event from Smtp.
|
|
|
|
|
Ankit Rajpoot wrote: you're using some thrid party library
No,I am using backgroudnWorker1 compoment.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
You have to put the email-sending code in a thread or BackgroundWorker object.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks for your relpy.
I used component BackgroundWorker1 and it works prety cool.
I have still one question.
When I attach file with seize less then 300KB email is sending very slow!
Where could be problem? Can I make it faster to send?
Regards
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
hello
send code c# Show progressbar while sending email
|
|
|
|
|
Hi all,
Can someone help me how to read varbinary(max)in C#.
I've try this, but gives an error. Number 2 the column index in the table
<br />
byte[] binaryData = (byte[])thisReader.GetValue(2);<br />
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi,
what is the error message? Maybe the column value is DBNull?
Regards
Sebastian
|
|
|
|
|
This is the error I've
"Unable to cast object of type 'System.Int32' to type 'System.Byte[]'.<br />
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Are you sure that you access the correct column? Your column is an integer. Remember that the GetValue()-method starts the column index at 0. So the second column has to be accessed by passing a 1 to the method.
Regards
Sebastian
P.S.: If this doesn't help, please post the sql query.
|
|
|
|
|
Ya, I got the point sir. Refer the incorrect index.
Now can you how can I convert that byte array into a string.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
You can convert the byte[]-field into a base64-encoded string like this
string sEncoded = Convert.ToBase64String(aBytes);
Does the byte-field represent a string or something else (file etc.)?
|
|
|
|
|
I've try this, but shows some characters. But it's not what I expected.
In DB I've added some strings.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
So what it is you are expecting?
|
|
|
|
|
hi all
I want to close all the applications which i opened and kept it in my system, when i close my c#
application
all should get closed when i close my c# application
is it possible to do?...if yes ple help me...
thanks in advance
|
|
|
|
|
Use the System.Diagnostics.Process class along with a List. You can start new processes using the Process.Start method and store the returned components in the list. Now when your application exits, call the Process.Kill method for all the elements in your list.
BTW, you're working for some company?
|
|
|
|
|
|
I tried adding in the list obj which i created but its not adding anything
|
|
|
|
|
Could you post the code?
Btw you cannot add sth to the process list, it is read-only.
|
|
|
|
|
Hello SeMartens,
I'm not talking about adding something to the process list, but to an instance of the
List class. Like the following code:
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
List<Process> list = new List<Process>();
string input="";
Console.WriteLine("Enter path to a program to start it.");
while (true)
{
input = Console.ReadLine();
if (input == "exit")
break;
try
{
list.Add(Process.Start(input));
}
catch
{
Console.WriteLine("Failed to start " + input);
}
}
foreach (Process process in list)
{
if (!process.HasExited)
process.Kill();
}
}
}
}
|
|
|
|
|
Hi Ankit Rajpoot,
I understood your post, but I don't know if sandhya14 did
Regards
Sebastian
|
|
|
|