15,891,136 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 toATwork (Top 39 by date)
toATwork
21-May-13 2:38am
View
If you have the data in a List, you can just call Remove(<item>). In a string array you must create a new array and copy all items (except the removed one) in the new array.
toATwork
21-May-13 2:28am
View
I am sorry, what do you mean by the selection size?
toATwork
15-May-13 11:24am
View
You are welcome. Please accept the solution.
toATwork
15-May-13 10:54am
View
I will post an answer with some explanation
toATwork
15-May-13 10:46am
View
Either call Invalidate() or Refresh() on the control
if (roundButton[1].backgroundColor == System.Drawing.Color.LimeGreen)
{
roundButton[1].backgroundColor = System.Drawing.Color.Red;
roundButton[1].Refresh(); // that should do the trick
}
toATwork
15-May-13 7:33am
View
does it stay LimeGreen all the time? If so try to Refresh your control.
toATwork
14-May-13 6:36am
View
1. create a new list
2. iterate through the checked items
3. if the Tag of the checked item is a DirectoryInfo, cast it to DirectoryInfo, and add the FullName to the list
toATwork
14-May-13 5:33am
View
http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.checkeditems.aspx
toATwork
14-May-13 5:24am
View
So you are looking for the selected items? Then use ListView.SelectedItems.
Or have you set the ListView.CheckBoxes property to true.
You are not providing sufficient information.
toATwork
14-May-13 5:11am
View
I would rather use a list of strings. When the button is clicked, iterate recursive over all nodes. If it is checked and then add the path of the DirectoryInfo to your list.
toATwork
14-May-13 3:07am
View
Why "just" a vote of "3" for a correct solution?
toATwork
14-May-13 2:45am
View
No, I do not think that this is your problem. If I see your code above, you never assign the Tag of the new node!
toATwork
14-May-13 2:29am
View
Are you sure that you have assigned a DirectoryInfo object to the Tag of the "C:\" node? Otherwise the tag would not be null.
toATwork
25-Apr-13 4:31am
View
Sample is rather difficult.
You could change the constructor of your UserControl1 that it requieres a variable with the type of your parent control.
In your parent control define a public method which handles all the adding of new controls.
Then you can simply call in your control the function of the main (parent) control.
toATwork
25-Apr-13 3:36am
View
You have 2 possibilites. Either handle the add in your control and add a new UserControl1 to the (parent) flowpanel there. Or call the add functionality from the main form.
toATwork
2-Apr-13 14:19pm
View
You are welcome. I hope you figure it out.
toATwork
2-Apr-13 12:03pm
View
I am sorry but I do not have any further suggestions
toATwork
2-Apr-13 11:05am
View
Try to do it by keybord as described in the given link, e.g. left half snap (Windows + left)
toATwork
2-Apr-13 10:49am
View
Is left+right enabled? Can you do it by keyboard:
http://superuser.com/questions/285356/possible-to-snap-top-bottom-instead-of-just-left-right-in-windows-7
toATwork
2-Apr-13 10:45am
View
I was referring to the aero dock preview working on the top but not left or right
toATwork
2-Apr-13 10:34am
View
This I have never seen before.
toATwork
2-Apr-13 2:49am
View
It is used to determine where the mouse cursor is in the given Form, e.g. border, caption...
Check this out:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms645618%28v=vs.85%29.aspx
toATwork
1-Apr-13 12:09pm
View
Dou you have a caption bar? Did you overwrite the HitTest function?
toATwork
1-Apr-13 12:07pm
View
Have you enabled exceptions? Did you step by step debug the saving?
toATwork
31-Mar-13 12:46pm
View
What is the exact error?
toATwork
29-Mar-13 9:56am
View
I think I do not understand.
If you deactivate all buttons then enable (or set visible) the activate items.
toATwork
28-Mar-13 9:37am
View
You need to enable the "activate" ToolStripMenuItem when you disable the button
toATwork
27-Mar-13 3:59am
View
In my opinion it should work always. My offer is still valid.
toATwork
27-Mar-13 3:41am
View
I sent you an email, please check your mailbox.
toATwork
22-Mar-13 7:43am
View
I am not confident in posting my mail addresse publicly. Is there any chance for private messages?
toATwork
22-Mar-13 7:18am
View
Which one is the line 462 as mentioned in:
at AnnunciatorMonitoringTool.Annunciator_Devices.Annunciator_Devices_Click(Object sender, EventArgs e) in C:\AnnunciatorMonitoringTool\AnnunciatorMonitoringTool\Annunciator Devices.cs:line 462
toATwork
22-Mar-13 6:06am
View
This function is causing your Dispose:
Annunciator_Devices_Click(Object sender, EventArgs e)
Please provide the code of it.
toATwork
22-Mar-13 5:38am
View
try to dump the StackTrace:
System.Console.WriteLine(Environment.StackTrace);
toATwork
22-Mar-13 5:31am
View
Is the issue resolved now? Which part exactly did the disposal?
toATwork
22-Mar-13 5:06am
View
Somewehere you are disposing your Form along the way. The code you have posted is not sufficient.
toATwork
22-Mar-13 4:51am
View
And line "form2.Show();" causes the exception?
toATwork
22-Mar-13 4:40am
View
You mean that the code you posted above still causes the problem?
private void btnOk_Click(object sender, EventArgs e)
{
if (form2 == null || form2.IsDisposed)
{
form2 = new Annunciator_Window(descriptionName, btnName.Text, Port, devicescount, SlvID);
form2.MdiParent = MdiParent;
form2.WindowState = FormWindowState.Maximized;
// myPictureForm.FormClosing += form2_Closing;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
}
this.Hide();
form2.Show();
}
toATwork
22-Mar-13 3:43am
View
How do you switch back from Form2 to Form1?
toATwork
21-Mar-13 9:16am
View
Manually won't work. Default visibility of class is internal.
If you have the source of the other dll ensure the class is declared public. Then you can instantiate it from other assemblies.
Show More