In a form, when I cut a control (a label) which has an event attached to it (click event), i noticed that the event attached to it doesnt work anymore when you paste it (the label I cut).
I have a Windows Forms app, with a TabControl. On the first tab (which is a bunch of textboxes), the CTRL-x/c/v keyboard shortcuts for cut/copy/paste work as expected. On the second tab (which is a DataGridView), the keyboard shortcuts don't do anything. How do I hook up these keypress events to my cut/copy/paste routines? I already have great cut/copy/paste routines for my DataGridView--and they work fine when launched from the tooltip buttons or menus. I just need to hook up those subs to the CTRL-x/c/v keypress events.
I have a small copy/paste type of program. You put text in the boxes, click copy and it copies it to the clipboard. I have a text file attached to format the text when it is copied. what I want to accomplish is...If I don't fill in every single textbox with text, I don't want that particular field to show when I paste it. Example, I have the layout like below on the text document.
textbox1. textbox2. textbox3.
No matter what, when I click copy, the text document is going to copy textbox1,2,and 3. If I only put text in textbox 1 and 3, I don't want it to copy textbox2 if its empty.
In the key down event for a text or rich text box:If (e.Control) And (e.KeyCode = Keys.V) Then e.SuppressKeyPress = TrueTo prevent pasting for all text boxes on your form, set form KeyPreview to true and add the above code to form key down event.
I have a webbrowser control which I have created a contextmenu for. I have added a paste button and do docbrowser.body.inner.body = clipboard.gettext. The problem with this is when I copy text from a word document and paste it I loose all the formatting. If I remove my context menu and use the default and paste I keep my formatting.
I have been trying to implement the jQuery weekcalendar using .net. What I can't seem to figure out is why weekcalendar states events.events is undefined after I make an ajax call to a webmethod I created which returns JSON. Below is the relevant code:
If I have two buttons, one to start a song being played and one to stop it. The start button has enabled set to true and the stop button is enabled to false. What I want to happen is the stop button to only become active when the start button is pressed. I was thinking of putting stopMusicButton.enabled(True) within the start method, but this doesnt seem to work
I have a form with a button which is disabled by default, and a CheckedListBox with 68 items in it. What is the simplest way of enabling the button, when an item in the CheckedListBox is selected or unselected? I'm looking for something like If CheckedListBox1...any of the items state changes...Then Button1.Enabled = True End If
I attached a picture of how my project should look and what the labels are. There are a total of 12 books and 4 different age groups. In each age group there are 3 books. There is also a previous and next books button which will show the next book in that age group. I want to make it so that previous button is disabled when it is on the first book of each age group and so that the next book button is disabled when it is at the last book. The only issue that I am having is that after the button is disabled it is not enabled again after. Here is my full code for this part as of now. As you can see I made it so that everytime I click on a new age group the previous button is disabled initially.
I took some unnecessary code out of here because I don't want anyone from my class finding this and coping all of my work.
Public Class BookInfoForm ' use this array to display information in this form Private books(,) As BookInfo = getBooks()
I am trying to assign a keyboard shortcut to a macro but "Press shortcut keys" textbox does not accept input. The "Remove" and "Assign" buttons are disabled. I have a command highlighted and I've tried in all the available "Keyboard Mapping Schemes". I've noticed that on some of the samples on "Modifying Keyboard Shortcuts" there were buttons for creating new mapping schemes. I'm assuming those are a visual studio version prior to mine - maybe 2003. Mine only contains the reset button.
Is it possible to disable a maskedtextbox and not have it greyed out? I have several on my form, some of them I allow input and some I don't. I'd like to have the enabled boxes one color and the disabled another color.
I created a timer in the main form - form1 which then updates some text in form2 each 100ms. Now When I click a button in form1, the timer stops. Why? Happens no matter if timers are on or off by default. I have to open/close form2 to make my status updates work again - that's where I run the timer on form load and stop the timer on form close.
Was doing it in windows 2010 express.
So this is what I have in form1:
Public Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick 'some stuff
I created a table in VB.NET by using a query which joins some tables. Then, I created a DataGridView to show the records of the result of this query. The toolbar has the buttons to add a new record and to delete a record. My problem is that I also need to update my database, and the button for the update in this case is disabled. How can I update my database?
I decided to get rid of some of the junk in my computer, so I selected all the .tmp files and deleted (nearly) all of them. I then emptied the recycle bin... Then I set to work on trying to get some code to work (in an excel 2007 macro enabled workbook).
I now have two problems: 1) excel will not let me record a macro and 2) when I run one sub routine, excel tries to run every sub routine associated with the workbook.
other than removing and re-loading Office 2007? I'll try logging off and then logging on again - if that works, I'll let you know.
firstly i wanted to say sorry for my english. And my problem is a windows xp which is almost all of parts disabled. i'll try to explain with a screenshot
this is a sample pc not the real pc that has the problem All the start menu items , and the other stuff like group policy , run menu , task manager , my computer , control panel also internet access disabled except 1 or 2 site and internet explorer's Options menu also disabled
Local area connection's Options menu disabled too for change Icons on desktop like My computer , files disabled , and you can't access the C:/ folder via the browser it is disabled too which libraries do i supposed to use ? or could you guys give me some info for how to do ? i know i didn't explained myself enough but i really have to enable all options on that pc , including all start menu items , group policy access , and access to drives .
one last question , my first aim is surfing on the internet sites without restrictions , it is a router sided restriction i think , if i use softwares like Hotspot shield , can i surf on the internet without restrictions ?
That's the source code I get through the browser but the textArea is still editable in the browser. There is no javascript modifying myTxtA, and the only other reference to myTxtA in my codeFile is the following :
If somethingNotHappeningHere Then myTxtA.ReadOnly = True End If
I can't see why my textarea is still editable. Can the class of the div containing the textArea modify its behaviour ?
PS: I am not concerned about if the data is sent or not. I'm just looking for the textArea to be uneditable.
Edit: Same problem on IE7 and Firefox 3.5
Edit 2: When I copy all the html source from my browser into a new html file the textarea is properly disabled...
Put a Datagridview on a form, fill it with data. dgv1.enabled = True and dgv1.enabled = False are almost the same look to the eye unlike other controls (textbox,combo, listview, etc ...) where there back color changed to light grey and you can distinguish if that control is enabled or disabled but not for Datagridview.
How do you maintain the appearance of a disabled button in VB.Net? Basically, when I click a button, I want its background colour and font colour to stay exactly the same as before I clicked it.
Is there an "easy" way to change a control's ForeColor when it is diabled? Yes, I know that this goes against the Windows standard.
On our forms, we have buttons with a dark blue background and a white foreground (the design is dictated by marketing). When the buttons become disabled, the ForeColor goes to a dark color making the button unreadable.
Is the a way for a ClickHandler to work IF the control is Enabled = False? Like for example to show a messagebox with the message "Unable to change this data".
I've been searching all over the interwebs this afternoon trying to find a way to change the color of a disabled text box. As it stands, I'm still working on my first program (A very simple, select a shape from a combo box and input values and the program gives you the area) and I have it working well enough, I'm just working on cleaning up my code and changing that disabled text box color. As it stands, the default disabled color is very similar to the enabled color, and I don't want to just change the enabled color. I'd rather change the disabled to work with the scheme a little better.
im wondering if it is possible at all to bisable a button after it being clicked because i have no idea on where to start on doing this. I only know how to get it to disable for the one session but when the program is run again it is enabled again. Is there any way to just keep it disabled because it nly ever needs to be clicked once.