|
hi frein i multiple text boxes in my form and i want tpo highLight Text box when tab Control reach to specific Text Box but when Tab Control Leaves it come back to its Orignal Place
how can i do that
wasim khan
|
|
|
|
|
Do you want to?:
1. Highlight the text that is currently in the text box as the user enters the control.
2. Set the background color of the text box as the user enters\exits the control.
If the answer is 1:
Handle the Enter event for the textbox and then call textbox.SelectAll();
If the answer is 2:
Handle the Enter event for the textbox and set the textboxes Appearance.BackColor property.
Handle the Leave event and set this same property back to its original value.
If its neither then you will need to explain again what you were asking.
I hope this helps.
|
|
|
|
|
you can use Textbox.Focus() methods and Textbox Leave Events and Changes the background color according it !!!
|
|
|
|
|
Hi all,
This is my first C# application. Here what I going to do.
Read a text file and display them in a list view. Simply as line by line. I can read the file and get line by line there easily. My question is how to display them.
Any tutorial you guys know that I can get a better start.
I appreciate your help all the time...
Eranga
|
|
|
|
|
listviewControl.Items.Add("string from file");
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Yes I do,
But I have one question now. I read a file and found those lines to put into list view. A line consist of four words and in between each word there is a tab character. For tabs, on list view display some annoying characters. I put a message box and test at the time I got the line of text. It's ok, no printed and tabs.
How can I avoid it.
I appreciate your help all the time...
Eranga
|
|
|
|
|
value.Replace('\t',' ');
This replaces all occurences of tabs with a space.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Thanks, but what I have done is that, use tab as a delimiter and get substring from the original string.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Hi Friends,
I have developed a Windows service. Now i need icon for this service in
systray and context menu for this icon.
I have added context menu for notify icon but context menu not displaying in systray.
Please let me know how to do this?
With regards,
Dharani.
|
|
|
|
|
dharanighanta wrote: Hi Friends,
I have developed a Windows service. Now i need icon for this service in
systray and context menu for this icon.
I have added context menu for notify icon but context menu not displaying in systray.
Please let me know how to do this?
AFAIK, it won't display. A service is supposed to run without any user interaction. I.E. no System.Windows.Forms . I think you can have the tray icon, but no context menu. Maybe someone will verify this. What I think you will have to do is have your service start a process that is nothing but a tray icon, with the context menu(if that's what you want), and then have that application communicate with the service.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
|
You can't easily do it. It's as simple as that. If you could, this would represent a huge security hole whereby you could get really malicious with the user without them knowing. There's a reason that people switch off cookies and it's really bad practice to try to circumvent that.
|
|
|
|
|
bachirium wrote: But i can't ask every user to enable cookies
Yes you do have to ask. Period.
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
How can I show table into 2 columns - one half of data in the first and other half in the second column in Crystal Report?
In Visual Studio Local Report it's accomplished by setting Report's Body Columns on 2.
Example:
||| => ||| |||
||| => ||| |||
||| => ||| |||
|||
|||
|||
Thanks for any help.
modified on Friday, January 11, 2008 5:30:33 AM
|
|
|
|
|
Hi
I have a sql statement which is in my c# code.
How would I write the following though
Select * from table where field contains a certain value
e.g. select these values from the table
v1106~066
v1106~066_01
where as at the moment it just selects:
v1106~066_01
my current sql statement is select..... LIKE '" + s_number + "'" +
s_number is the value v1106~066_01
thanks!!!
hope it makes sense
|
|
|
|
|
sorted it:
"'+ session_room_code + "%'"+
|
|
|
|
|
In order to match against multiple records, you need to apply the wildcard characters in your search. In other words, you need to use v1106~066% to retrieve the two records. A couple of thoughts though.
1. You shouldn't retrieve all of the columns using *. That's just lazy coding and should be avoided at all costs.
2. You've left yourself wide open to a Sql Injection attack. Read this[^] article.
|
|
|
|
|
I'm not actually using Select * i just put it there becasue I couldnt be bothered to write out all of the fields i was selected which ironically makes me lazy
|
|
|
|
|
Jamie1985 wrote: I'm not actually using Select * i just put it there becasue I couldnt be bothered to write out all of the fields i was selected which ironically makes me lazy
OK. Nice one.
|
|
|
|
|
Thats just a great answer...
|
|
|
|
|
I am working on Generating the Code automatically using CodeDom.
How can I create a solution file and project file through Code.
Ashwani
|
|
|
|
|
I am afraid solution and project files are not covered by CodeDom, as they are Visual Studio specific, and not part of C#. You could probably use Visual Studio object model, or create these by yourself - they are text files after all. Or get SharpDevelop source and see there.
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
how to apply different color for datagrid columns.which property can be set for this.i have set the background of the header with an image.i want to set different color for all the columns.can anyone help me in this regard.
pintoo
|
|
|
|
|
This should help you. You will have to modify it for use, however. That way you will have to do a little work . This method takes a row index, then loops through the columns for that row in the dataGridView , and then sets the backround color to light gray.
private void HighlightSelectedRow(int iRowIndex)
{
for (int c = 0; c <; yourDataGridView.Columns.Count; c++)
dataGridView1[c, iRowIndex].Style.BackColor = Color.LightGray;
}
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Hi
How to include a chm file into a .net application and how to associate the index of the chm file to the form in the application.
Any one who knows the solutions please help me do this.
Thank you in prior.
|
|
|
|