|
A TextBox already has those keyboard shortcuts built in. You don't need to add anything extra. Besides that, a notepad application is relatively simple. Try coding it yourself, and posting when you would like help with specific problems
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
So what's the question?? You haven't asked about any kind of a problem you're having...
|
|
|
|
|
He forgot to ask for the code. This is a first, someone failing at failing.
|
|
|
|
|
I cannot get the System.Net.Mail to send out an email message from my Windows application. The Try Catch reports an the error message 'Failure sending message'. What is causing the error? Below is the code I'm using.
MailAddress objFromMailAddress = new MailAddress("myfromemail@mydomain.com, "");
MailAddress objToMailAddress = new MailAddress("mytoemail@mydomain.com");
MailMessage objMailMessage = new MailMessage(objFromMailAddress, objToMailAddress);
SmtpClient objSmtpClient = new SmtpClient();
objMailMessage.Subject = "Subject line";
objMailMessage.IsBodyHtml = false;
objMailMessage.Body = "Body message";
objSmtpClient.Host = "1and1.com;
objSmtpClient.Port = 587;
try
{
objSmtpClient.Send(objMailMessage);
}
catch (Exception pError)
{
}
|
|
|
|
|
Probably because the host name is bad. You just supplied 1and1.com which is a domain name, but no host. You have to supply the full name of the server, like "smtp.1and1.com" or its IP address.
|
|
|
|
|
Thanks.
I've already tried smtp.1and1.com and could not get it to work.
I will try the IP address.
|
|
|
|
|
Come on. This is where you contact the ISP supplying the SMTP server and get its DNS name, the port number you have to use, and any login information you need.
|
|
|
|
|
You also never set credentials to authenticate yourself with your smtp host.
|
|
|
|
|
hello,
I've wrote an application that connects to mysql DataBase.
The DataBase updates every few minutes with new data,
when the user open the app he has few options to read the data (through ODBC).
when the users install the app on his locall computer,
does he also needs to install ODBC?
(The DB is located on a server and all the users that use the app are in the same network).
Thanks,
Tamir.
|
|
|
|
|
I do not know for sure, but I suspect that they will have to.
The easiest way to check would be to do a test install on one of the user computers without installing ODBC, make sure to select a computer that doesn't already have ODBC. If it works, the users don't need ODBC. If it doesn't work, install ODBC. If it still doesn't work, then something else is wrong.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Can i include the ODBC installation inside the install file that i create?
|
|
|
|
|
You need to install ODBC Only if the app is connected directly to MySQL DataBase. If Server has a service witch will act as a bridge and app connects to it then you dont need ODBC drivers installed anywhere else.
treuveni wrote: Can i include the ODBC installation inside the install file that i create?
Depends on Licence. One whay is to include ODBC Installation (External Execution like when installing Games then DirectX) within your own, or if you have permision you can include within your installer as in no seperate instalation
|
|
|
|
|
Yes, it is as simple as that..
How would you hide the form as soon as it's loaded assuming it's a one-form project "no splash screen"
You cant set the Visible property to false or call the Hide function on the form Load event.
A stupid way to do it was to:
1. set the ShowInTaskbar property to false
2. Set the opacity to 0
3. Call the hide method on the Shown event and maybe set back the above two properties to true and 1 respectively
But I dont want to do that since low graphics screen would treat 0 opacity as black square and the hiding the form on the shown event is not quite practical since the form gets loaded once but shown every time you want it visible.
Please advise!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
What kind of project do you need to use this for? I would personally just use an interactive service, which doesn't show a form at startup at all (unless you tell it to). I'm assuming that you're talking about the form you pass to Application.Run, and not showing a form just to get the piece of code in its events to fire
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Computafreak wrote: an interactive service, which doesn't show a form at startup at all (unless you tell it to).
Hmmm, to be honest, I've never developed a service before.. guess it's about time I give it a try.
Thanks mate!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
A service is the way to go here, but just so you know, if you look in the Program.cs file, you will see a static Main method where your form is instanciated etc. Clear out the contents of the main method if you wish amd do whatever you need. As soon as the Main method exits the application will finish.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hello.
I’m new to this forum and also learning the C# language.
I have a question about type conversion in C#.
In the following sentence, the compiler gives me an error because it cannot implicitly convert a double literal to an int type.
int i = 45.7;
But in the following sentence the compiler does not generate any error.
short x = 45;
every literal has a type. So 45 is a literal constant of type int and I’m trying to assign it to x variable of type short. According to this page, conversion from int to short must be explicit but it is not ! why ?
http://msdn.microsoft.com/en-us/library/yht2cx7b.aspx
|
|
|
|
|
Because 45 falls in the range of a short. No conversion is necessary
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Hi Mani_Amoozadeh,
when you cast as short x = 45;
45 falls in the range of a short.Range for short is -32,768 to 32,767 and hence it do not give any cast error.
But when you explicitly try following
int j = 45;
short x = j;
it gives you cast error because you try to convert value of integer to short.
Thanks
Vaibhav
|
|
|
|
|
|
It looks to me like google will at least explain what those algorithms are. So, how about just writing them yourself, and perhaps writing an article here for the next person that needs them ?
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
|
Hi
in my first db (access 2003), i have some tables which has Text columns as PK, my app create new GUID and convert it to Text, then save back to access db.
Now i want to transfer data from access to sql server, to do this, i must load data from access, convert PK from Text to GUID, then save back to sql server database.
i use this code to load original data and convert PK from Text to GUID :
this.personsTableAdapter1.Fill(this.testDataSet1.Persons);
DataTable dtImported = this.testDataSet1.Persons.Clone();
dtImported.Columns["PersonID"].DataType = typeof(Guid);
foreach (TestDataSet.PersonsRow row in this.testDataSet1.Persons.Rows)
{
Guid g = new Guid(row.PersonID);
dtImported.Rows.Add(new object[] { g, row.PersonName });
}
but the following error message thrown in above line of code :
Cannot set column 'PersonID'. The value violates the MaxLength limit of this column.
can anyBody help me ?
Note : first, i convert my data from sql server to access 2003 by ssis package. now i want to transfer it again from access 2003 to sql server.
|
|
|
|
|
Well, I assume this means that a GUID takes up more room than the datatype in your original table. You're cloning the table, so you're going to have columns with the same size/type as you did before, unlike your SQL DB.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Hi Christian
i didn't understand what you saied. can u give me more explain ?
thanks
|
|
|
|