Delete events properly in C#?

Hey I'm new to C# and I've been told by the instructor that if I want to delete an event I just remove it and when I go back to the design an error pops up, I just double click the error and remove the code from designer.
Is there a simpler/cleaner way to do this? I remember with vb, it was easy to just delete the event without any problems to the form design.
So it this method safe? Are there alternative/better ways?
Thank you!

The definition in the designer never gets removed so you have to delete the code from the designer just like you did.  There is nothing wrong with modifying designer code as long as you are very careful.  Often I will change position
(left, top) of a control by modifying the designer code to get a precious location.
When I start a new project, sometimes I will copy sections of an old designer.  To avoid modifying designer code I will set the control properties in my own code.  I will add controls on the form and initially set a default position/size but then
adjust the position/size in module code.
jdweng

Similar Messages

  • Can't clear deleted events from my hard drive

    I guess I'm pretty new at this. I deleted a few events by hitting the delete key but my hard drive is still nearly full. I can't find them now under events or rejected clips or in my movie folder at all. I guess I need to learn how to delete them properly. But how do I now find those (now seemingly hidden) files and delete the properly?

    It's not that. My trash can is empty and re-emptying it doesn't help. The files are apparently hidden from my sight so I don't know how to select them and delete. I tried to do a word search for the title, but that also brings nothing. I had 44 gigs free before this new movie event and now I have only 5 gigs free. So it's got to be somewhere.

  • Dangerous deletion events Photoshop CC - MachinePrefs.psp

    Hi,
    I was trying out Photoshop CC and discovered it has a dangerous tendency of deleting certain folders (or sometimes only their content) on my computers when the "MachinePrefs.psp" file is missing from the AppData\Roaming\Adobe\Adobe Photoshop CC\Adobe Photoshop CC Settings folder.
    The MachinePrefs.psp file is where the scratch disc drive is designated. If, for some reason, this file is missing, or no scratch disc is expressely designated in the MachinePrefs.psp file, it will delete the contents of any 'first' (alphabetically) folder both relative to the location Photoshop is installed in, and the first folder on the C:\ drive. This doesn't happen to folders protected by the system, so it won't happen to the first folder in Program Files or any such location (well, on Windows 8, that is). But if you have a custom folder on C:\ and run Photoshop without the MachinePrefs.psp file (or with the file but no scratch disc designated), it will delete that folder on C:\. For example, I created C:\appie. When I ran Photoshop from a custom location outside system folders, and then exited Photoshop, C:\appie got deleted!
    Normally, when you install Photoshop CC it will create the MachinePrefs.psp file and in the .psp file it will designate C:\ as the scratch disc. When MachinePrefs.psp gets deleted somehow, and you run Photoshop, it re-creates MachinePrefs.psp. But, when it does, even though under Preferences it will say "default(C)", the selection box will not actually be selected, and inside the psp file it will not list C:\ as the scratch disc location (can be checked with Notepad). If I then run Photoshop (I've been running it from a non-default install location -- not in Program Files), it will delete the (alphabetically) first neighbor-folder or its contents. To clarify, I might have a folder called "my apps" on C:\ and it has app folders in it:
    C:\my apps\7-Zip
    C:\my apps\Adobe Photoshop\Photoshop.exe
    C:\my apps\Defraggler
    (etc.)
    Now, when I run Photoshop.exe without the MachinePrefs.psp (or without the scratch disc properly designated in the automatically re-created .psp file) and close Photoshop, it deletes the contents of C:\my apps\7-Zip folder! (Or any other folder that happens to be alphabetically first in the 'my apps' folder.)
    OK, if, at the same time, I have another alphabetically first folder on the root of C:\ (so one directory up) -- for example I had a security monitoring app installed to C:\dvr -- it will delete that entire folder as well upon exiting Photoshop! So what it is doing is consistently deleting any first folder relative to the Photoshop.exe location, as well as any first folder on the root of the drive it is on. No way should an absent or improperly configured .psp file make Photoshop delete any folder of file at all!
    So this is a major bug and a very, very dangerous one. I have confirmed this to be the case on both Windows 7 and Windows 8, both with and without UAC enabled, etc. When I performed system snapshots I was able to tell that Photoshop creates a temp file, which, upon exiting Photoshop gets deleted. It seems that, along with the deletion of this temp file, those 'first folders' on C:\ and the root folder in which the Photoshop app folder sits, get wiped too.
    Please look into this bug. I have tested CS6 and earlier to make sure it is not contingent on the MachinePrefs.psp file only, and it is not deleting anything with earlier version of Photoshop. Only Photoshop CC/CS7 is doing it and it is doing it consistenly over several test machines.
    Thank you.

    Here is a snapshot of a PS CC install causing the deletion event on a freshly installed system, when the MachinePrefs.psp is deleted or not properly created:
    // Snapshots Comparation (C:\mypps\System.Explorer\snapshots\2013_08_25
    [Upon closing Photoshop CC, when MachinePrefs.psp is deleted or corrupt, the following happens (abridged):]
    Dir    Added    C:\Users\dobby\AppData\Local\Temp\lilo.3968
    File    Added    C:\Users\dobby\AppData\Roaming\Adobe\Adobe Photoshop CC\Adobe Photoshop CC Settings\MachinePrefs.psp
    Dir    Deleted    C:\Users\dobby\AppData\Local\Temp\lilo.3180
    Dir    Deleted    C:\hiha     [This is a folder I created, alphabetically first, on C:\. As can be seen, it got deleted after closing Photoshop.]
    File    Deleted    C:\hiha\contents.txt
    Dir    Deleted    C:\myapps\7-Zip     [This is 7-Zip installed in the same folder as Photoshop; it precedes the PS folder alphabetically and it got deleted.]
    Dir    Deleted    C:\myapps\7-Zip\Lang
    File    Deleted    C:\myapps\7-Zip\Lang\de.txt
    File    Deleted    C:\myapps\7-Zip\Lang\en.ttt
    File    Deleted    C:\myapps\7-Zip\Lang\es.txt
    File    Deleted    C:\myapps\7-Zip\Lang\fr.txt
    File    Deleted    C:\myapps\7-Zip\Lang\it.txt
    File    Deleted    C:\myapps\7-Zip\Lang\nl.txt
    File    Deleted    C:\myapps\7-Zip\7-zip.chm
    File    Deleted    C:\myapps\7-Zip\7-zip.dll
    File    Deleted    C:\myapps\7-Zip\7-zip32.dll
    File    Deleted    C:\myapps\7-Zip\7z.dll
    File    Deleted    C:\myapps\7-Zip\7z.exe
    File    Deleted    C:\myapps\7-Zip\7z.sfx
    File    Deleted    C:\myapps\7-Zip\7zCon.sfx
    File    Deleted    C:\myapps\7-Zip\7zFM.exe
    File    Deleted    C:\myapps\7-Zip\7zG.exe
    File    Deleted    C:\myapps\7-Zip\History.txt
    File    Deleted    C:\myapps\7-Zip\License.txt
    File    Deleted    C:\myapps\7-Zip\descript.ion
    File    Deleted    C:\myapps\7-Zip\readme.txt
    It has nothing to do with system peculiarities. This is consistent over several testing beds.
    If I had to argue this issue from a standpoint of reason, as you do, I certainly would not have come up with anything like this either. But this is not a thing of reason, it is a bug. Hence, repeating what it should do or however many times something has been tested, will not help in this case. What would help is if someone would repeat the process and find it out for themselves as well (validate it). Based on reason and probability I would perhaps say the same thing you have. But what I'm trying to show here is a little more than a hunch and a little more than the peculiarities of any one system. I think I have done that rather exhaustively. What is needed now is to reproduce it and fix the bug. Adobe fixes many bugs in incremental releases, so it shouldn't be a surprise if indeed something like this happens.
    There is no third-party utility involved, and no plugin. It would be hard to get a more pristine and up to date Windows install than the ones that stem from my sysprep and capture sessions

  • Deleting event in iCal 5.0.1 not syncing with Google Calendar

    When I delete an event from iCal, it does not sync with Google Calendar.  However, when I create an event in iCal, it syncs just fine with Google Calendar. Creating and deleting events from Google Calendar syncs fine with iCal.  Has anyone else experienced this problem?

    12/13/2011 - call to google tech support
    Recent support call with Google: iCal deleting events still broken.  this is big for us.  We have users that have accounts for and/or subscribe to multiple calendars, and took a while to teach them to use iCal, so web based calendars will be foreign to them (even though I like the web based).  There is no timeline in place according to Google Tech Support.  I feel like the issue is really Apple's issue, so Google is waiting on them to fix, this type of urgency(or lack of) is right up their alley.  Oh well.
    Does anyone have any suggestions on alternate calendar apps for Mac?  Specifically for google calendars?
    "Regarding the issue about not being able to delete Google Calendar events within iCal, as mentioned it is a known issue which unfortunately we don't have a time frame to offer you.
    You can visit  http://support.google.com/calendar/bin/static.py?hl=en&page=known_issues.cs for Google Calendar known issues.
    You can submit a feature request at https://www.google.com/moderator/#16/e=ba1ca which is also located at the bottom of your Control Panel as ‘Suggest a feature.’ "

  • HT2513 I can't delete events recurring annually...not part of birthday calendar, one's I've added manually.  I've tried delete key, cut event, changing to no recurrence, they just revert to original recurrence and will not be removed from my calendar.  Th

    I can't delete events recurring annually...not part of birthday calendar, these are events I've added manually.  I've tried delete key, cut event, changing to no recurrence, they just revert to original recurrence and will not be removed from my calendar.  Events that occur weekly I'm able to delete, this is only happening with events recurring annually.  Very frustrating.  Thanks for any ideas.

    If you are using a PC, log on to iCloud using Safari (rather than Explorer) to reset the photostream. Then turn iPhone/iPad photostream off and back on. I was getting the same server error as you and this advice from another blog worked for my iPhone and iPad.  But I still can't get photostream deleted from my apple tv. There does not seem to be a photostream on/off control In Apple tv 4.4 software.  I tried switching the screen saver to one of the ones that comes preloaded on the device, then back to photostream but all the old photos are still there.  If anyone can help with this, I would appreciate it.

  • Error while deleting events from the integration event queue

    I am trying to delete all the events from the integration event queue after reading it, like this (this is in Java):
            IntegrationEventWS_DeleteEvents_Input input = new IntegrationEventWS_DeleteEvents_Input();
            input.setDateTime("");
            input.setLastEventId("");
            try {
                 ((Default_Binding_IntegrationEventWS)onDemandStub).deleteEvents(input);
            } catch (Exception e) {
                 log.error("Deleting events from integration queue failed: ", e);
            }Alas, I get the following error message:
    Invalid method parameter(s): 'File Id'(SBL-ODS-50007)What does this mean? What is this mysterious "File Id" it supposedly gets? I don't see it anywhere in the SOAP message I'm sending and it isn't mentioned anywhere in the docs.
    Thanks in advance for any input.

    Dont keep this attributes null
    input.setDateTime(""); //Put a Default Time way in
    the past. Ex:"1/1/2000"
    input.setLastEventId(""); //pass the eventIdThe documentation states that those two are optional (although they are not nillable, for some reason). I tried to set the date to today, but I got the same result. Since setting a date is supposed to delete all events older than that date, I don't think setting it in the past will delete anything.

  • How do i delete events in i movie 11?

    how do i delete events in i movie 11?

    Hey,
    You just need to select an event, right-click, and select delete event. It will then give you an option of how you want to delete it.
    The iMovie Guy

  • How can I make albums from events then delete events without deleting the album?

    Hey, just need a little help!
    How can I make albums from events then delete events without deleting the album?
    Many thanks

    You'll be more likely to get help with this if you ask in the iPhoto forum:
    https://discussions.apple.com/community/ilife/iphoto
    You'll need to tell people what version of iPhoto you have so they can give you correct advice.
    Regards.

  • My IPAD (original version) is deleting everything over 30 days from my calendar.  How can I prevent this and how can I get the deleted events back?

    My IPAD (original version) is deleting everything over 30 days from my calendar.  How can I prevent this and how can I get back the deleted events? 

    You are most welcome

  • After deleting events they reappear

    Using  MacBook Pro, running 10.6.8, I setup an event up in iCal and when editing to correct information the event was duplicated, one with the correct information one that was originally edited to correct information. Now when deleting events they disappear for about 20 seconds and then reappear.
    How can I correct this?

    I want to let others know I have resolved this issue.

  • Correlations in Workflow - wait for Delete event problem

    Hi All,
    I am working on version ECC5.
    I have a workflow that needs to wait for any changes to i0008, i0007, i0509 and i2001 for the person who is the subject of the workflow.  I have used correlations to do this and it is all working fine except for the Delete event.
    For each infotype I wait for each event ie. Approved, Changed, Created, ApprovedCancelled and Delete.  When the events are published the wait event is triggered and the workflow goes to the next steps where it does a recalculation,  fires off a new workflow and ends the current one.  This is working for all of the events except Delete.  The Delete event is set up exactly the same as the rest, but somehow the workflow wait event is not triggered.  It is happening with the Delete event for all the Infotypes I am waiting for.
    Does anybody have any suggestions as to what may be the problem. 
    Thanks
    Sandra

    Arghadip/Martin thanks for your replies.
    Yes, the delete event is being published.  I am using the same object e.g BasicPay for the delete event that I am using for the other events - Approved, Created etc. that are working.   The correlation and the wait for event steps are set up exactly the same way as they are for the events that are working.  I find it curious that the delete event doesn't work for any of the infotypes.   Why?  Could it be that when a record is deleted the object no longer exists?
    Any suggestions?
    Thanks
    Sandra

  • Process Task Child Table Delete Event passes empty values

    Hi All,
    I'm trying to implement a delete event in a process task for a child table. I am assuming the value to be deleted
    should be getting passing into the adapter but it's passing empty strings instead. The insert event is working fine however.
    Any one else using the delete event that works?
    Thanx
    Fred

    Hi Kevin.
    Any idea how to programmatically access the "old value" variant of a form field?
    It's the sort of thing one needs occasionally when a value changes and some associated capability needs to be updated. The old value specifies what needs to be removed while the new value tells the system what is to be added in its place.
    (It so happens in our environment that we have dozens of these values per user profile, so it would be very painful to store "old" values in a parallel set of fields.)
    Thanks,
    Dan

  • ICal 4.0 and Snow Leopard: can't add / edit / delete events + workaround

    Hi,
    iCal 4.0 under 10.6.1, any changes I made in iCal was reversed when I quit and reopened iCal. Plus my changes didn't sync to my iPod.
    When looking at the Console.app, I saw:
    2009/09/15 13:31:51 iCal[11918] save failed: Error Domain=CalCalendarStorePersistenceErrorDomain Code=1 UserInfo=0x115d4c780 "The end date can’t be set to occur before the start date. Change the end or start date." {
    NSLocalizedDescription = "The end date can\U2019t be set to occur before the start date. Change the end or start date.";
    I tried to export / delete / import all my calendars, that didn't help. Then I noticed I also have the calendar automatically generated for the birthdays from my address book.
    I unchecked "Show Birthdays calendar" from the General preferences. Now iCal works again (I can add / edit / delete events and the error message doesn't show in the Console.app anymore)
    Cheers,
    Janus

    I have updated my OS to 10.9 hoping this to fix my problem.... but nothing... It's still the same....

  • Ical displays alarm for deleted event and calendar

    Ical is displaying a message alarm on my screen for about 5 deleted events. The calendar that contained the events has been removed as well.
    how can I stop the message notifications from appearing on my screen.
    Cheers,
    Noah

    figured it out

  • How I can delete event from calendar (iOS7)??

    How I can delete an event from calendar (iOS7)?? I can't find any icons, any gesture for that!!!

    I've never used the calendar app until I read this, so I created a test event and then spent about 15 minutes trying to figure out how to delete it, but I finally figured it out!  Here's how to do it:
    1) Tap the event to bring up the info panel about it.
    2) Tap "Edit".
    3) A long panel will appear, letting you set all sorts of info about the event, but there doesn't appear to be any way to delete it, but...
    4) Pull up on that long panel, and way down at the bottom is a red "Delete Event" button.  Tap it and confirm the deletion in the message box that appears, and the event it gone!
    Ken

Maybe you are looking for

  • Unique ID or reference number?

    How do I create or enable a form to generate a unique ID or reference number when submitted? The person that receives a copy of his form should see the number as well as the author.

  • Can I use the install disk on two computers?

    I haven't actually installed it on my computer yet, I just allowed whatever was going to install itself to come up. If I have another computer, can I use the install disk to put OSX on there or not? If so, can I still use it in case I need a backup l

  • SWF Loader scaling my SWFs

    Hello all, I have a Flex app that loads in a swf using 'SWFLoader' tag. the SWFloader and the swf being loaded in are the same height and width (see attached code) Now, the SWF getting loaded in is also 468 X 351 however the designers that made it ha

  • Download of Reader Error in Program Association

    Ive tried to download reader via firefox and IE.  When installation ends other software programs have adobe icon.  Opening REader or the other infected programs have an error message "this file does not have a program association with it for performi

  • MY DVD Drive is not recognized by the Device Manager

    Hi, I own  a Presario 6608AU version notebook. The prob is since i removed Windows Vista from my notebook and install WIN XP my DVD drive is not working. Neither is it recognized by the Device manager too. I have tried for all solutions available on