|
From Address is the person sending, To address is the receiver, in this case you.
The SMTP server needs to be any server for which the user who is sending the email is authorised to use. It doesn't matter who the target (TO) address is, it is dependant on who the sender is.
SMTP servers generally need to be authorised, as there are very few open relays now due to the abundance of spam and abuse they receive.
|
|
|
|
|
Thanks Dave, I found my way and also solved the confussion.
But am just wondering 1 thing. In my form I already have ToolStripProgressBar. When the Send(mail) is being executed, for a short while I see 2 progress bars. Then 1 disappears. Can't find what is going on. Does Send() shows a progress bar by default - didn't find any such info in MSDN.
Can you tell what must be the reason of seeing 2 progress bar for a short while when Smtp.Send(mailMessage) function is being executed.
In MSDN I also found that when send is eecutes, it blocks so its safe to set timeout. Can you tell what value should be set in timeout - 100000 (100 secs) is good enough or should be more !
Thanks a lot.
Thanks & Regards,
|
|
|
|
|
Thats good to here.
your welcome.
|
|
|
|
|
When I run my application I am initializing some boolean flags - all of them are set to false at the begining, then just before the Load function ends - I am enabling another windows form full of buttons which are meant to be changing the flag statuses depending on which button the user presses. So when user presses the button on the second form - it run the function which is supossed to change flag status on the first form and after that it closses second form.
The thing is, that the flag status is not being changed, so if I want to set this flag status to true, it's all the time false. I don't know why. Below is the example code:
// declaration of values
private bool isFirstActive;
private bool isSecondActive;
private bool isThirdActive;
//splash screen form
private SplashScreen splashScreen;
//second menu form
private SecondMenu secondForm;
// initialization in constructor
public MainForm()
{
//show the splash screen to the user while loading
splashScreen = new SplashScreen();
splashScreen.Owner = this;
splashScreen.Show();
Application.DoEvents();
this.Enabled = false;
InitializeComponent();
isFirstActive = false;
isSecondActive = false;
isThirdActive = false;
}
private void MainForm_Load(object sender, EventArgs e)
{
//enable the main form
this.Enabled = true;
this.Visible = true;
//close the splash screen
splashScreen.Close();
//enable the second form
secondForm = new FacultyMenu();
secondForm.Owner = this;
secondForm.ShowDialog();
}
So now the user will see second form with some buttons, below the code for the second form with example button click:
private MainForm firstForm;
public SecondMenu()
{
firstForm = new MainForm();
InitializeComponent();
}
private void btnChangeSecond_Click(object sender, EventArgs e)
{
firstForm.changeSecondFlag();
Close();
}
So when user press the button, it will call the following method on the first form:
public void changeSecond()
{
isFirstActive = false;
isSecondActive = true;
isThirdActive = false;
}
Then it's closing the second form and goes back to the main form. but the isSecondActive valuse is still false.
Why?
|
|
|
|
|
acont wrote: So when user press the button, it will call the following method on the first form:
No, it will call a method on an object that has the class-type as defined for the class "MainForm". There's two of those objects; one that's your actual mainform, and that you use to open the second form, and then there's a new object of the same type, created in the SecondMenu method.
acont wrote: Then it's closing the second form and goes back to the main form. but the isSecondActive valuse is still false.
It's closing the second form, and the mainform contained therein (in the private variable firstForm). Then it goes back to the original mainform. The boolean is set in the second instance, the original object isn't changed.
How about passing a reference to your mainform in the constructor of the second form? You could cache a reference to that instance, changing things on that would correctly change the original object.
I are Troll
|
|
|
|
|
forget about this forum to get any help; its useless
|
|
|
|
|
|
imak wrote: Its not a repost
Then add the extra information to your original question, do not delete it and start a new thread.
It's time for a new signature.
|
|
|
|
|
Richard MacCutchan wrote:
Then add the extra information to your original question, do not delete it and start a new thread.
just read the information provided to get that extra info
|
|
|
|
|
No your asking us to do your work for you.
D@nish gave you a perfectly valid answer: it is possible.
You can't expect people here to just write the code for you, we all donate our time for free here. If you want somebody else to write your program then go and hire yourself a programmer and pay him.
If you want our help you'll have to proof to us that you at the very least tried to do it yourself (so post you code and where your stuck or have an error).
|
|
|
|
|
imak wrote: Is it doable via refelction?
Yes it is. But it will be quite bad considering application performance.
imak wrote: If so can you please post some example code?
Well, you should try yourself first and then ask with specific details. That is what the guidelines say.
|
|
|
|
|
Hello Friends,
I have developed a desktop software with VB.NET. I want to create some security measurements through which, after purchasing one copy, customer cannot copy to several computers or distribute freely. Their may be customers who may need the product to be run on N number of machines independently (not on Network). In that case also, the customerId may be same but each machine must have independent copy of the product.
How can I achieve such security measurements for newly developed desktop software?
Any helpline, guidance is highly appreciated.
Thanks & Regards,
modified on Friday, September 3, 2010 9:16 AM
|
|
|
|
|
I can think of two ways of doing it.
1. Have a product key and validate it on your server. You can keep the IP and the key to be sure your software has been installed. This will require the users to have internet connection at least while installation.
2. I am not sure how this can be done, but here's the thought. If you can get the details of the computer where your application is installed in the setup some how while installation, next time when the same setup is used, it can prompt that the S/W has already been installed on another computer.
|
|
|
|
|
d@nish wrote: 1. Have a product key and validate it on your server. You can keep the IP and the key to be sure your software has been installed. This will require the users to have internet connection at least while installation.
Can you tell how does this product key option works. I feel the logic & flow should be such as :
1 User is installing
2 While installation it talks to a other app lying on the Server.
3 The server app, keeps the IP address, checks in another DB lying at server.
4 If the IP address is new, provides a Product key and stores the same against the IP on the DB located at Server.
5 If IP address is not new, displays appropriate message and doesn't allow to install the app.
Can you confirm with the above logic. And also if possible provide any code for me as help to proceed.
REG 2nd Point - what kind of computer details can be retrieved and checked out. Any clue.
Thanks & Regards,
|
|
|
|
|
For the first approach, you can use following logic:
1. Provide a key along with the setup. When the user enters that, pick up the IP address* and send them both to server.
2. Server should then check in the DB that the sent product key is already registered with some other IP*.
3. If yes, and IP* is same, let the user install and if IP* is different, deny installation.
*Many people have dynamic IPs and hence this logic looks flawed. You can get the Mac address since it is a unique number for each computer. Although, if the end user has tried Mac spoofing ie changing Mac address, there might be some problems. Still this IMHO will be a bit more secure way.
For approach two, Mac address can be a number you can track.
Since I have never implemented anything like this I cannot provide code sample right away. Although googling something like "product registration" might give useful results.
|
|
|
|
|
All Time Programming wrote: I want to create some security measurements through which, after purchasing one copy, customer cannot copy to several computers or distribute freely.
Some things to consider;
- Can I still reinstall Windows, or would I have to purchase a new version?
- What happens if I buy a new PC? Can I keep the software, or do I have to purchase a new version?
- Reading what you wrote, it implies I am allowed to install it on a single server and use some remote-desktop software to share it with some friends?
- For IP: will the software continue to work if I switch my internet-provider?
- Are you loosing money on those illegal copies, and how much of your precious time is it worth?
I are Troll
|
|
|
|
|
I have never done this as I tend to write web applications, but, I have heard of people doing the following with a good success rate.
When the user installs the application the must activate it, much like Windows now does. On activation, the software gathers certain information about the computer, some examples are processor id, memory id, motherboard manufacturer, ect. You grab this info and smash it together into say a string and that is not the computers unique ID. You also send the user a key that you generate. When the program trys to activate you check first that the generated key hasn't been used, if it has, check that the unique ID matches.
There is one flaw to this type of validation. If the user upgrades that computer, they will get a new processor id, or memory id, ect (depending on what they upgrade of course). There are solutions to this issue as well but I'll leave that all up to you.
Hope that helps, if you need some more help on this I have thought about this fairly heavily and maybe be able to provide more suggestions.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Thanks to All of you for these good suggestions and hints. At present, I have managed to work out with unique Serial Key with the product managing algorithm of my own. Customer downloads from net or anywhere without this he want be able to install only & without installation, it wont run only. Lets see ahead what is required and how.
Once again Thanks to all. If I need any further assistance in this matter, will definetely ask you guys again. Your ideas heled me bring up something differnet but safe.
Thanks
Thanks & Regards,
|
|
|
|
|
hi,
can someone tell me how to change the color of a part of a string in a cell from a datagridview.
for example
if the text of a cell is "125/art"
how can i show the "art" in red color ?
i know, i can use the Richtextbox but i dont want to change the color of the complete text.
thanks for your help
jogi
|
|
|
|
|
You can't unless you write your own code to custom draw the cells. There is no built-in support for what you want to do. The cells in the DGV work nothing like a RichTextBox.
|
|
|
|
|
The simple way is by creating two columns, and setting the ForeColor to red in the second column.
An alternative would be painting the cell yourself, using the CellPainting [^] event.
I are Troll
|
|
|
|
|
Yes, I also agree with Eddy.
If you want you can make the 2 cols width (in Properties of that particular col) very small - just till what your text fixes, alos make Resizable = False & Padding (Cell style) = 0, 0, 0, 0. With this atleast you can amke min space/gap between both the cols and paint the other col or set its background/foreground color as per your choice.
To set properties of a particular cool, select grid, Column Collection, and then select your col & proceed.
Thanks & Regards,
|
|
|
|
|
Hi all,
I want to copy image stroed in the imagelist controle.
which location these images are stored?
Is any way by which we can find/copy these image Design or runtime?
|
|
|
|
|
Do you mean sort of this ImageList1.Images(i).Save(ByVal filename As String)
|
|
|
|
|
Dear Goutam , I have tried this
ImageList1.Images(i).Save("C:\Test.jpg")
Each time file is storing in a given path but when I am trying to open the image then image is not showing.
image size is 1 KB.
Thanks.
|
|
|
|