|
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.
|
|
|
|
|
Use HelpProvider component in Visual Studio 2005.
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Hi,
I am trying to install a .pfx certificate in personal folder using a C# application. Every thing goes fine and certificate is installed. I can see that certificate in the Personal folder of both Current User and Local machine. But when i try to run my application and use that certificate, it throws exception with the message:
The credentials supplied to the package were not recognized
Stack Trac at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc)......
But when i import this cert manually, it works just fine. Below is the code i am using for installing the certificate:
Dim cert_personal As X509Certificate2 = Nothing<br />
Try<br />
cert_personal = New X509Certificate2<br />
cert_personal.Import(Application.StartupPath & "\Chain\Personal.pfx","My Password" , (X509KeyStorageFlags.UserKeySet Or X509KeyStorageFlags.Exportable))<br />
Catch ex As Exception<br />
MsgBox(ex.Message)<br />
End Try<br />
If cert_personal Is Nothing Then<br />
Return False<br />
End If<br />
<br />
''XXXXXXXXXXXXXXXXXXXXXXXX PERSONAL XXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br />
Dim store As New X509Store(StoreName.My, StoreLocation.CurrentUser)<br />
Try<br />
store.Open(OpenFlags.ReadWrite)<br />
Dim findVal As String = cert_personal.Thumbprint 'Thumbprint <br />
Dim certColl As X509Certificate2Collection = store.Certificates.Find(X509FindType.FindByThumbprint, findVal, False)<br />
<br />
If certColl.Count <= 0 Then<br />
store.Add(cert_personal)<br />
<br />
End If<br />
Catch ex As Exception<br />
MsgBox(ex.Message)<br />
Finally<br />
store.Close()<br />
End Try<br />
<br />
And almost same for installing in Local machine. The complete chain is also fine. But the problem is still there.
I can't use CertMgr since this cert is from a third party which is not , as per my info, supported by that.
Any suggestion, code sample, advice would be highly appreciated.
Thanks in advance,
Wasif Ehsan.
|
|
|
|
|
Has anyone been successful in impementing the ObjectPicker dialog and getting
additional attributes by using C# + Interop?
The problem comes in when you need to marshal the string array and while reading
the attribute values back ino the managed code.
Thank you very much for any advise here.
Thanks,
...G.
|
|
|
|
|
hi
how can i get the Battery and Memory Level in C# code for PPC ?
how can i make Sounds in c# code for PPC ?
thanks alot for any Help
|
|
|
|
|
pls help me with the code for A* algorithm for finding the shortest path between two points
|
|
|
|