VS 2008 DatarepeaterItemTemplate Focus?
Jul 21, 2011
I'll try and describe this correctly. a simple datarepeater (databound, winform) with a button on it, clicking the button on the datarepeater opens another form with an uploading routine, you select the file from your hardrive, and you can send the file to it's destination on a server. the problem is when the button is clicked, the previous datarepeater template or instance still has the focus and the file gets uploaded to the wrong place, how can i, when the button is clicked, give focus to the datarepeater template that the button is on. if i click on the template, and then click the button, then the proper focus is true.
View 11 Replies
ADVERTISEMENT
Nov 7, 2009
I am having problem setting focus on specific cell in my Datagridview1 . On Form1 when clicking on cell 3 in any row, I am callig a Dialog1. However, when done working with it, and closing the Dialog1, the focus returns to cell 3 in my Datagridview1 . I like to set the focus on the next cell(4) making it the current cell.
I have tryed :
DataGridView1.SelectionMode = DataGridViewSelectionMode.CellSelect
DataGridView1.CurrentCell = DataGridView1.Item(4, e.RowIndex)
DataGridView1.CurrentCell = DataGridView1.CurrentRow.Cells(4)
And few other things, I am always getting this exception: Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.
View 2 Replies
Feb 16, 2011
Is there a more efficient/easier way changing the backcolor of a control when it has focus and lost focus? Let's say I've got 10 text boxes. Right now I would have 20 different events...10 for Enter event and 10 for Leave event. Of course, entering would change the back color to "green" and leaving would change it back to "white".
[Code]....
View 4 Replies
Mar 10, 2009
Here is what I've done:1) Created an Excel COM add-in for Excel 20032) Added a NotifyIcon to the Windows taskbar notification area (aka system tray) during ThisAddIn_Startup3) Added a ContextMenuStrip with a ToolStripButton to the NotifyIconWhy is it when I right click on the NotifyIcon, Excel gains focus? If after clicking on the NotifyIcon to display the ContextMenuStrip I choose not select an option on the ContextMenuStrip and instead click back on the Excel window, I get a weird flashing cell in Excel.I've created a video of the problem to help you see what I [url] anyone know how to prevent this? Ideally, I'd like to be able to click back on Excel and only have the ContextMenuStrip close and Excel regain focus.
View 1 Replies
Nov 26, 2009
I have two forms in an application. One is he background and then I show another keypad form called with the show() method (not showDialog) because I need to perform some validations on btn click.
The kepad has 10 buttons and an Enter Button. The problem is that the form keeps loosing focus (I checked this with a messagebox which keeps poping up once for focus=true and again for focus=false, it continuously keeps losing and gaining focus) so it does not process any keypress events untill i click somewhere on the form. I tried using me.focus() in form load event but to no avail. The forms TopMost property is also set to true.
View 5 Replies
Jul 18, 2010
recommend a book that focuses on the .NET framework in general and isn't too language specific.
View 3 Replies
Mar 21, 2012
I have a textbox on a form that when it loses focus it updates other text boxes on the form. But before it updates the other textboxes I check the input value in the textbox lostfocus event if it is undesired I return focus to the the textbox and alert the the user with a msgbox. However where my problem is, is that when the cancel button is clicked I don't care what the input in the textbox is because the changes are being canceled but if the value is undesired the it keeps returning focus to the textbox instead of canceling the changes. Is there a way to see what control was clicked on before or in the lost focus event? Can't seem to figure it out tried enter and leave events but no luck!
So for example something like this...
Code:
Private Sub TextBox1_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.LostFocus
If Control that was clicked <> btnCancel then
[Code].....
View 2 Replies
Sep 30, 2009
How can I see if a specific window is in focus?
View 6 Replies
Oct 19, 2011
I want to show a message box to as the user if he/she wants to save changes. The problem is that the message box shows up behind my current form, and the current form does not have focus and is disabled. I have to switch a another program/window then when I switch back to my application, it finally shows the message box. Same thing happens when I compile and run it compiled. I also tried "MsgBox" with the same problem.
This is the code i'm using:
vb.net
Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim ret As DialogResult = Windows.Forms.DialogResult.No
[Code] .....
I am doing this on a Windows XP (SP3)
View 13 Replies
Jun 23, 2009
I have a DGV1 and when clicking on cell, I am able to execute a code in: Sub Mouse_Click()
If DataGridView1.CurrentCells(4).Selected = True then
Label1.Show()
End If
End Sub
I like to do the same thing using Tab key when a cell in my DGV1 gets focus or the Tab enters a cell. Could someone show me which Sub I need to use.
View 1 Replies
Aug 25, 2009
I've got a dialog form that I do a .ShowDialog from my main form In the load event
[Code]...
View 8 Replies
Feb 16, 2009
I am trying to find the code to move the focus to a text box in a "Settings" tab on a form "tabSettings".
[Code]...
View 3 Replies
Sep 9, 2008
i am working on a System. But everytime i show another Form, or Focus Something Else, One Particular Form gains Focus on it's own right after. Does anyone know how i can Fix this?
View 6 Replies
Jan 11, 2010
Much like you'd do a formname.show. I'd like to make a tabpage come to view. I've tried the tabpage#.show and it didnt bring it to focus.
View 2 Replies
Apr 24, 2010
How do I check if a Window is in Focus? Like, I want to put in a Process Name, and see if its the Window in focus.
View 5 Replies
Jul 31, 2010
I am working on a timing program and have a start button programmed to clear all the variables and start timing events. I have another button programed to stop the timing and show the data. The problem is that when I place the cursor on the start button and press the left mouse button it workes fine, but when I move the cursor to the stop button and press the left mouse button the start buttons 3D showes that it was pressed? Since the start button clears all of the data there is nothing to display in the text boxes. If I press the left mouse button again the stop buttons 3D shows that it was pressed. Have looked everywhere for a hint as to what to do but have found nothing yet.
View 12 Replies
Jun 24, 2010
I have an app that calls another executable and then minimizes it until I need it. But when I do this, my app loses focus and when the user types into my app it inputs unwanted input to the minimized external application.
Is there a way to give and take focus between my vb app and the external one?
View 1 Replies
Apr 3, 2009
I want to know how when you focus on a textbox in your form, how you get the cursor to go to the first character, instead of the middle/last/etc.
View 4 Replies
Jul 26, 2010
form1 (startup) has buttons which show form2 and form3. when I press the button to show from2, form3 or form4 and set focus to a txtbox in form2, it does that, but after 2 to 5 seconds focus jumps back to form1 without my doing anything. This happens only on starting the program - if I click on form2 where I want to be, everything does OK from then on, but I don't want the user to have to do that. There is no timer on any of the forms. forms 1, 2, and 3 stay visible at the same time per design, but the focus always reverts to form1. I have tried many combinations of showing form2 and form3 (and form4), but with no change. I have also changed properties of the forms which I think may have something to do with the problem - no luck.I can't find anything in the help file which addresses "form focus changing". [code]
View 1 Replies
Aug 6, 2009
Here is my
Clipboard.Clear()
Activate()
[code].....
View 5 Replies
Aug 21, 2009
I have the design done and the key sender. I test it and it works but i have to see it doing what is does and i can't go to internet or anything Cuz the program will press the keys in what ever i open so i need to put a focus in SRO_Client
View 2 Replies
Jun 14, 2009
I have 2 window forms, form1 has a button, which will send a msgbox when I click on, and form2 closes when it's deactivate-event raised. If I have form2 focused, and I click on the button of the form1, form2 will get focus and then close, but no msgbox showed from form1, what should I do to get the msgbox in that case?
View 5 Replies
Jan 20, 2010
DataGridView has 3 columns as
Sno----name----marks
While entering data, if sno column is empty and user press Enter or Tab then
Focus must go to me.textbox1
View 1 Replies
Jul 12, 2009
I have wrote a program that uses sendmessage to automate clicks. I have also made it where it can minimize to tray, hides form & shows an icon in tray. The problem is that when it's minimized it takes focus from whatever else I'm doing, like if I'm typing in Notepad when the program sends the message it takes the focus from notepad.
View 2 Replies
Mar 12, 2012
OK in the frmMain_Load sub I have this: tab page control with two pages. On page 1 I have a textbox.I also have the following Set the focus to the first textbox control on the first tab page.txtbMonthlyUsage.Focus()I can not get the focus into the textbox although its Enabled = True, TabIndex = 1, TabStop = True.
With all that I can not get the focus to work.But when I activate the 2nd page and come back to the 1st page when the form is displayed, it works like its supposed to.What am I missing?Do I need to activate page 1 as the form is loading? How do I do that?
View 3 Replies
Oct 25, 2011
After I did a sendkeys to another program from my form, i wanted to return focus to the form. i tried me.focus = true but that doesn't work.
View 1 Replies
Mar 27, 2009
In the Solution Explorer window, is it possible to change the highlight color of selected items *when the form does not have focus*?For example, selecting a module in the Solution Explorer highlights that module's name in Blue, then when the focus is lost by moving to another window in the IDE, that blue highlight becomes a very, very light gray (on some LCD monitors in particular). I'd like to make that light gray a bit easier to see.Is this possible? I'm running VS2008 SP1 on Vista 64.
View 2 Replies
Nov 16, 2010
I am currently translating a windows form application, written in VB6, to a webpage written in Visual Studio 2010. In VB6 it is easy to find out which control has focus on the form using '.getFocus()'. I have come to the conclusion it is not that easy, if at all possible, in vb2008.
View 2 Replies
Mar 3, 2010
I've a multiform project, and one of the forms within it is a loginform created using one of the templates built in with Visual Studio. This form, when opened has no code in any of the open events, yet still manages to:
- put the cursor in the password field ready for text entry
- highlight the "OK" button
- press the "OK" button if the enter key is pressed.
How can I replicate this behaviour on other forms? I've copied the properties of the button to OK buttons on other forms but can never get them to behave in the same way.
View 12 Replies
Jan 18, 2011
I have a form from which I am visually representing data (from access database). I have set up a user log on a separate form (allows user to make comments as they scroll through the data and see any points of interest etc). The second form is linked via a textbox in terms of a common field in this case the field name is "Datetime".
What I want to do is be able to scroll through the data and make notes on the second form and add them to another table in the database. I have managed to do all the above but obviously loose focus of the second form when i scroll through the data on the first. Is there any way of being able to interact with both forms at the same time?
View 6 Replies