15,891,253 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 10410972 (Top 41 by date)
Member 10410972
30-Jan-24 4:09am
View
PIEBALDconsult thank you very much for your two offers.
I'm sorry but I don't know how to use TryMatchHashSet or TryMatchRegex in button1_Click.
I am asking for one more help. Thanks in advance.
Member 10410972
28-Jan-24 18:30pm
View
Thank you. The question is:
In textBox3.Text I want as result longest word from textBox1.Text than letters from textBox2.Text
In this example it would be the word: successfully
Please look at the picture from the link above, the picture says it all.
My code is not working...
Member 10410972
31-Jan-23 14:36pm
View
Thanks for your reply but I tried to use "string filter" but didn't get a solution... If possible please help me with the code below. Thanks again.
string filter = $"colName = {textBox1.Text}";
string colName = dataGridView1.Columns[1].Name;
((DataTable)dataGridView1.DataSource).DefaultView.RowFilter = string.Format(colName, filter);// there is a problem in this line
Member 10410972
19-Jan-23 16:47pm
View
Thank you very much, it works fine for me. Best regards.
Member 10410972
6-Oct-22 15:59pm
View
Thank you very much George, it works for me. Best regards.
Member 10410972
6-Oct-22 4:28am
View
Thanks for your reply, I tried to apply the Regex method but it doesn't work. I have no experience with Regex method...
I am asking for your help specifically in my example, if possible more detailed help... I apologize, thank you.
Member 10410972
17-Sep-22 12:17pm
View
As the author of this program did, so do I want.
Please look at the picture from the link below:
https://i.postimg.cc/CxsJ29Kk/2.png
Member 10410972
17-Sep-22 2:57am
View
The question is very simple, I want to open directly the Exclusion window of Defender as in the picture on the link below.
Using a CMD command or a PowerShell command or something like that….
https://i.postimg.cc/15n3Vk7s/1.png
Member 10410972
19-Mar-20 12:20pm
View
Maciej Los thank you so much. The problem is solved.
Member 10410972
18-Mar-20 12:39pm
View
Ok, sorry, forget it ... I'll handle it myself.
Member 10410972
18-Mar-20 12:39pm
View
Deleted
Ok, sorry, forget it ... I'll handle it myself
Member 10410972
16-Feb-20 2:15am
View
Thank you very much. It does what I wanted it to do. Thanks again.
Member 10410972
14-Feb-20 6:18am
View
OK thanks. Is there another way to block run certain applications using c# ?
Member 10410972
11-Feb-20 10:36am
View
Thank you, this works.
The problem is solved.
Member 10410972
11-Feb-20 10:35am
View
Deleted
Member 10410972
4-Feb-20 15:27pm
View
Richard thank you very much.
This is the way it works !!!
I don't know better ... If you have a better way please help. Thank you.
private void Button1_Click(object sender, EventArgs e)
{
Registry.SetValue("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Hidden", 1);
this.WindowState = FormWindowState.Minimized;
SendKeys.Send("{F5}");
this.WindowState = FormWindowState.Normal;
}
Member 10410972
4-Feb-20 14:59pm
View
I tried something like this but not good enough. I ask for your help.
private void Button1_Click(object sender, EventArgs e)
{
Registry.SetValue("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Hidden", 1);
SendKeys.Send("{F5}");
}
Member 10410972
4-Feb-20 9:52am
View
What does "none work" mean? Are you getting an error?
There is no error, simply nothing happens after the code is executed.And I would like to run a vbs file...
You don't need a VBS file to modify the registry; you can do that directly from your .NET code.
I know it can, but then I need to restart machine so that the effect is visible ...
You can also send keys to an application from C#:
Please could you be more specific, I didn't understand ...
Member 10410972
12-Jun-18 11:20am
View
Thanks ppolymorphe, the problem is solved.
Member 10410972
11-Jun-18 14:29pm
View
Thanks Gerry, but I do not know how to do it...
Member 10410972
10-Apr-18 12:02pm
View
Thanks a lot works well.
Member 10410972
10-Apr-18 7:10am
View
Okay, I do not think you understand me well.
To say more simply:
I would like to move every third line in the textBox1.Text on the end of the line that is above that line.
For example:
If my textBox1.Text contains (before executing the code):
First line
Second line
Third line
Fourth line
Fifth line
Sixth line
Seventh line
Eighth line
Ninth line
Tenth line
Eleventh line
Twelfth line
After executing the code
First line
Second lineThird line
Fourth line
Fifth lineSixth line
Seventh line
Eighth lineNinth line
Tenth line
Eleventh lineTwelfth line
Note:
textBox1.Text has about 200 lines.
If it's possible, how can I do it and, if not possible, I apologize.
Thank you.
Member 10410972
10-Apr-18 2:54am
View
Thank you, Bill, but I thought in fact that every fourth line starts with "some", but the rest of the text of those lines that begin with some is not the same (it differs).
For example:
If my textBox1.Text contains (before executing the code):
First line
Second line
Third line
some text
Fifth line
Sixth line
Seventh line
some different text
ninth line
tenth line
eleventh line
some bla bla
After executing the code
First line
Second line
Third linesome text
Fifth line
Sixth line
Seventh linesome different text
ninth line
tenth line
eleventh linesome bla bla
Member 10410972
30-Apr-17 6:59am
View
I wish that when I add an item to listView1 to then always add a same image (maybe from imageList1) in listView1...(Each item has the same image)
I want the same as at the link below. Please see the link below:
https://s30.postimg.org/jypx9z5wx/image.gif
Member 10410972
23-Mar-17 9:35am
View
Okay now I understand. Thank you.
Member 10410972
4-Mar-17 5:10am
View
Thank you very much, the problem is solved!
Member 10410972
4-Mar-17 5:10am
View
Thank you very much, the problem is solved!
Member 10410972
4-Mar-17 5:10am
View
Thank you very much, the problem is solved!
Member 10410972
24-Feb-17 2:27am
View
Thanks Valery.
but this code is deleted only item in listView1, but not deleted the same item in txt.File, and I want that when i deleted an item in listView1 to simultaneously delete the same item in txt.File. Thank you.
Member 10410972
23-Feb-17 16:57pm
View
I agree with you.
But in this case I need only what I put in my question. Thank you.
Member 10410972
7-Oct-16 10:51am
View
Thanks you.
Member 10410972
7-Oct-16 10:51am
View
Thanks you.
Member 10410972
7-Oct-16 10:51am
View
Thanks for your solution, I accepted.
And whether it is possible and something like this:
foreach (string sLine in listBox1.SelectedItems)
{
//sb.Append(sLine + Environment.NewLine);
sb.Append(sLine.Replace("1.", "" || "2.", "") + Environment.NewLine);
}
Member 10410972
6-Oct-16 8:36am
View
Thank you, which is now working well.
Member 10410972
6-Oct-16 7:55am
View
I'm sorry, the problem was solved thanks to you. Thank you.
Member 10410972
6-Oct-16 7:39am
View
Thank you, but it is not wrote correctly, so I have not solved the problem.
Member 10410972
6-Oct-16 7:37am
View
Thank you, how to get a result in Label1.Text?
Member 10410972
4-Oct-16 11:25am
View
Thanks a lot. Works great!
Member 10410972
4-Oct-16 11:21am
View
Thanks a lot.
Member 10410972
4-Oct-16 7:52am
View
A big thank you! Works great!
Member 10410972
6-Jan-16 3:55am
View
I thought, that if exist any of the same items in Text.txt and listBox1, that such items can not be imported to the listBox1. Thank you.
Show More