|
Dear Sir,
We cant add forms in control collection...
Thanks
|
|
|
|
|
Wanna bet?? The Form class derives directly from the Control class.
|
|
|
|
|
I was using the following code to split textbox text by a single space character:
string words = notesTextBox.Text;
string[] splitWords = words.Split(new Char[] { ' '});
I now need to split the textbox text by either the space character or a carriage return. How can I do this please?
|
|
|
|
|
You can add chars to your array:
string words = notesTextBox.Text;
string[] splitWords = words.Split(new Char[] { ' ', '\r' });
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
If you need to split the text by a carriage return and/or space character, you can use the following code sample:
string words = notesTextBox.Text;
words = words.Replace("\r\n", " ");
string[] splitWords = words.Split(new char[] { ' ' });
This will replace all the carriage returns with spaces, then split the text at each space.
If you do what Moreno said and just add the '\r' and '\n' characters to the array, you will end up getting more split words in your array. You will have to try each way and see which best fits your needs.
string words = notesTextBox.Text;
string[] splitWords = words.Split(new char[] { ' ', '\r', '\n' });
modified on Monday, August 10, 2009 11:55 AM
|
|
|
|
|
Hai Friends,
I want to create a .net application that run on windows startup.
How can i create that.
Guide me with your Ideas.
Thanks,
Vasanth.A
|
|
|
|
|
Create a new registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run and then add a new key-value (MyApp - C:\MyApp.exe)
using Microsoft.Win32;
private void CreateStartup() {
RegistryKey Key=Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
Key.SetValue("MyApp", Application.ExecutablePath);
}
|
|
|
|
|
I think you can also try to create a scheduled task.
|
|
|
|
|
I don't think that will help, schedular task, actually invokes a task or a bartch on a redefined time, its not responsive to windows startup. Its better to to add the entry in registry.
|
|
|
|
|
|
Hai Friends,
I want to make my .NET application into and Executable File.I dont't know how it was so help me.
Thanks Vasanth.A
|
|
|
|
|
???
If you compile your application, the compiler in VS create a .EXE file.
See in \Debug or \Release directory.
|
|
|
|
|
Go to Project->Your project Properties->Application tab->Output Type.
|
|
|
|
|
What type of application template you have selected while creating your application???
|
|
|
|
|
I am creating Windows Based Application using C#.Net 2008
Thanks
Vasanth.A
|
|
|
|
|
after building the application you will find the exe under bin\debug folder of your application folder.
|
|
|
|
|
Hi
i want to connect to mysql database that exists in customer website host via client c# app (via MySqlConnector for .net), but when connection wants to open, i got this error :
Unable to connect to any of the specified MySQL hosts.
where is my problem and how to solve it ?
here is my connection string :
string conStr = "server=hostIPAddress;user id=userName; password=password; database=dbName;";
thanks
|
|
|
|
|
|
|
I have a datatable which I wish to search for 'Like' matches. So searching for "p" would bring up the entries "p1", "Pea green", "p3" etc. I have code
DataRow[] foundRows;
foundRows = debtorDataSet.Tables["AutoText"].Select("Code LIKE " + lastWord + "%" );
if (foundRows.Length == 1)
{
....
}
else
{
....
}
but this is not working. Any pointers much appreciated.
|
|
|
|
|
as it is a string literal you are using, your statement seems to be missing some quotes, try this:
...Select("Code LIKE '" + lastWord + "%'" );
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.
|
|
|
|
|
|
|
If column name is (FIRST NAME)
If I use as Select("FIRST NAME LIKE '" + lastWord + "%'" );
It shows error
|
|
|
|
|
It is a bad idea to post a question to a more than four years old thread. Most users here will not even see it.
If you got an error message, add the full message text to your question. That helps others to help you.
However, your column name contains a space. Then you have to enclose it in brackets:
Select("[FIRST NAME] LIKE '" + lastWord + "%'" );
|
|
|
|