Make A Form Have The "always Focused" Property Like Showdiaglog()

Mar 12, 2009

When you do frmWhatever.showDiaglog(), frmWhatever stays on top of the calling form even if you click "behind" it. Is there any way to get this behavior on a form displayed by calling frmWhatever.show() ?

View 2 Replies


ADVERTISEMENT

Make A Form Focused Over The Over One?

Feb 2, 2010

I want to beable to make a Form Focused over the over one.E.G. I have 2 Forms Called: MainForm.vb && HelpForm.vb When I Press 'Button1' on 'MainForm.vb' 'HelpForm.vb' Pops-up I want to make HelpForm Focused so that the User cannot continue working on 'MainForm.vb' But when HelpForm is closed i want MainForm to be Enabled again.

View 1 Replies

Make Hotkeys Even If It Now Focused On Form1 With VB 2008

Jun 4, 2008

I want to make hotkeys for my project, it needs hotkeys to complete. how to make hotkeys even if it now focused on form1.

View 3 Replies

On Form Load, .focus On Item In Group Box Not Focused?

Apr 24, 2010

I have a form. On its load event, i have a txtName.focus , this is a text box inside a group box on the form.However when the form loads it does not focus the cursor in to this text box.I tried using the groupbox1.focus but that didn't work either.

View 3 Replies

.net - Make A Class Property Behave Like The Checked Property On RadioButton?

Jun 1, 2012

I have a very simple class that holds a few public properties - ID, Text, Colour, etc. and a Boolean called 'SelectedItem'. Just like the Checked property on RadioButtons, only one item can have its SelectedItem property set to True within a particular group. Note: there will be several separate groups (lists), each allowed to have only one item with SelectedItem = True.

My first thought was that I would probably just have to handle everything outside of the class, setting SelectedItem to False for every other item in a particular list when another item was selected. But that seems rather inelegant to me. So I've been trying to think of how this might be done within the class. For example: could I perhaps have a private string property called say "GroupName" - set in the New sub when adding a new instance of the class - and then use a private shared method to set every item's SelectedItem property to False, provided the item has the same GroupName as the newly selected item? I would have a go at doing this but I have no idea how to enumerate every instance of a class from within that class, or whether that's even possible. Is it? Or is there another (better) way to achieve my goal? Here is a cut-down version of what I've got so far:

Public Class ResourceItem
Public ID As Integer
Public Text As String[code]....

As can be seen: instead of instantiating a new ResourceItem and passing that as an argument to the manager's Add procedure, I'm simply passing the details of the new item and the procedure is creating the item from those. I don't know whether this is a good or bad idea - please advise - but I've done it because I couldn't figure out how to make the SelectedItem property only writeable by the manager, so I wanted to avoid having directly accessible objects that could have their SelectedItem property set to True without it deselecting all the other items in the same group. Of course that still leaves the possibility of setting a variable to one of the manager's list items and setting it from there, so I would still like to know how I could prevent that, if possible.

UPDATE: I didn't use the code above in the end, deciding instead to go with Cyborgx37's solution - which seems to work perfectly well for me despite the warnings about best practice. I also realised I would need to use the same class in another scenario where multiple items could be selected, so it was easy to add a Boolean property to the manager to enable that.

View 2 Replies

IDE :: Make A Property In A Property Grid A List Box In 2010?

Feb 21, 2011

I have the following property in a property grid in VB.Net 2010.

<Description("Rapid Entry Post Car Wash Settings CarWashOptionPushButtons"), _
Category("Post Car Wash")> _
Public Property CarWashOptionPushButtons() As String

[code]....

I need to make this property a list box that gets the values from a database table and populates the list box with the values from the table. I have tried numerous things to no avail.

View 4 Replies

Get Name Of A Focused Control?

Mar 29, 2010

How do I retrieve the name of a textbox that has the focus? I have many textboxes on my form and when the user right clicks anywhere in one of the textboxes I want my code to store the name of the textbox in a string variable such as NameOfSelectedTextBoxString as string.

View 13 Replies

.net - Focused Row Not Working - Gridview?

Nov 4, 2011

I am using Dev Express to develop a form in which i have a GridControl with a View inside a View.It looks like this:

I am then trying to use the event ValidatingEditor to validate the user input.I tried to do that by doing:

Private Sub grvObsAM_Artigos_ValidatingEditor(ByVal sender As Object, ByVal e As DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventArgs) Handles grvObsAM_Artigos.ValidatingEditor
Dim row As Integer = Me.grvObsAM_Artigos.FocusedRowHandle

This, however always returns me something like -99999.. I poked around and tried this other solution using the sender from the event:

Private Sub grvObsAM_Artigos_ValidatingEditor(ByVal sender As Object, ByVal e As DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventArgs) Handles grvObsAM_Artigos.ValidatingEditor
Dim grv As DevExpress.XtraGrid.Views.Grid.GridView = CType(sender, DevExpress.XtraGrid.Views.Grid.GridView)
Dim row As Integer = grv.FocusedRowHandle

And using this second solution i managed to get the focused row handle. Even though this worked this time (because the event was triggered by the view itself and i had access to the sender) this doesn't solve my problem as there are other events where the sender is not the view and the problem persists.Usign Me.grvObsAM_Artigos."insert anything here" doesn't seem to work properly.

View 1 Replies

C# - Focused The Next Texbox1 To Textbox17?

Jun 16, 2012

I have a Class(ChorNumbers) and in this class i have a Function that test textbox1...17 is a Character or a Number.I create a WindowsForm that have 9 textboxs. And if i enter 1 in the textbox1 that must jump to next textbox2 (that do this) If i enter A in the textbox2 that must jump to textbo3, but they does not jump. Where is the Problem why it doesnt not Jump?And i want a use one textbox1_TextChanged Function.

private void textbox1_TextChanged(object sender, EventArgs e)
{
TextBox myText = (TextBox)sender;
ChorNumbers myNR = new ChorNumbers();

[code]...

View 4 Replies

VB2010 Me.Focused = True?

May 28, 2011

Is there anyway for a form to become in focus.. basically something like Me.inFocused = True, In order to print a form, it must be visible and in focus, so I need to focus on it without the user having to click it so that I can send the form to a printer

View 1 Replies

VS 2010 Focused On The Sprite?

Apr 9, 2012

I am creating a 2D RPG game similar to the pokemon interface. After solving my problem with walls, I came across another problem. If I make the panel show the whole map, it would be too small. Thus, I tried to increased the size to 1200,1200, but it wouldn't let me because my screen is smaller than that. Then I thought about it and realized that most games limit the sight of the map to the characters surroundings.

[Code]...

View 2 Replies

Cannot Be Scrolled Out And Stay Topmost While The Whole App Is Focused

Mar 18, 2010

With that program, it has extra dialogs within it. They cannot be scrolled out and stay topmost while the whole app is focused. How can I do that?

View 1 Replies

Check Focused TextBox In Winforms?

Apr 12, 2011

I have multiple textbox in a form. How do I know what textbox the cursor currently is? Trying to do something like this:

If TextBox2.Focus() = True Then
MessageBox.Show("its in two")
ElseIf TextBox3.Focus = True Then
MessageBox.Show("its in three")
End If

But I think its not working.

View 3 Replies

Check If Focused On Multiple Textboxes?

May 31, 2012

I have my menustrip with the standard edit items. I know I can do this:

If TextBox1.Focused = True Then
TextBox1.Undo()
ElseIf TextBox2.Focused = True Then
TextBox2.Undo()
'Ect. Ect. Ect.

End If until I type out every textbox. However, I have like 30 textboxes and don't want to type out every textbox to see if they have focus. Is there a work around for that?

[Code]...

View 6 Replies

Get A Keydown Event Even When Application Is Not Focused?

Jun 1, 2011

How do you read a key down event when your application is not focus but other are?

View 2 Replies

Remove The Border 'focused' Buttons Get?

Dec 27, 2011

I have several buttons, all of which use flat appearance. I made them look just how I liked,but once you focus one, the 2px border (from 1px) ruins everything.

View 4 Replies

Auto-caps Lock On When Textbox Is Focused?

Jun 3, 2011

i want to automatically turn on the caps lock when the cursor is focused on a certain textbox

View 7 Replies

Capture Keypress Event When Window Is Not Focused?

Jul 11, 2010

i am trying my hand in visual basic 2010

it's a windows form program, what am i trying to do is, when i press ctrl+v (yes pasting) in other program, whether it be notepad or a text box, something also happens in my program.

So i need to capture the keypress event when my form does not have the focus.I would hate to create a windows service for this, but if there is no other way i might have to do it.

View 14 Replies

Data Grid View Cell Focused?

Oct 26, 2011

I have a datagrid view that loads data from a database. This is unbound datagridview.The columns are Description, UPrice, Quantity and TotalDescription UPrice come from database then quantity is typed. I want it so that when my datagrid loads, cursor goes to Quantity column and it is shown blinking like we have in text boxes.

View 1 Replies

Getpixel + Printwindow : Getting A Pixel From A Program That Is Not Focused?

Jul 21, 2009

what i have been trying to get to work is getting a pixel from a program that is not focused (so minimized). I tried Getpixel but only got it to work when the window is active(focus). It seems it only works for active window.Then i thought making a temperately screenshot of the program and get the pixel. I came across PrintWindow. Right now im searching to make a temperately screenshot of a minimized program and read the pixels of it. So far i had no success.

View 1 Replies

Two Gridviews Within A Gridcontrol - Cannot Get Focused Row Handle For The Inner Grid

May 5, 2011

Using DevExpress 10.2 within Visual Studio 2008 with VB.Net I have created a single gridcontrol that contains two different gridviews. The gridviews are related using an id column. Basically if there are related details about a row in the first gridview then the user can click on the plus sign to see all the related details. When I have any row on the first gridview I am able to get the focused row. Yet when I have the focus on any of the rows in the second gridview I am unable to get the focused row or the content of the row.

[Code]...

Is there any way to get the value in id from the focused inner gridview? Or at least figure out the parent row and grab the id value from there?

View 1 Replies

Forms :: When A Button Is Focused By Pressing Tab Key A Rectangle Appears On It

Nov 13, 2010

When a button is focused by pressing Tab key, a rectangle appears on it. Even if the button's TabStop property is set to false, when the button is clicked with mouse the rectangle appears. Is it possible to stop the rectangle from appearing?

View 1 Replies

VB6 - Video Series Is Focused On The Interop Forms Toolkit ?

Jun 10, 2010

Visual Basic Interop Video Series This how-to video series is focused on the Interop Forms Toolkit and working with Visual Basic .NET and Visual Basic 6 together. The Interop Forms Toolkit allows Visual Basic developers to migrate their Visual Basic 6 applications over to .NET using a phased migration strategy. Instead of having to convert the entire VB6 application at once, the toolkit enables .NET Forms and User Controls to run directly in Visual Basic 6 applications so that you can build the pieces that you need over time.

Download the Code: Videos 13

You will need: Visual Studio and the Interop Forms Toolkit 2.0 in addition to Visual Basic 6.0

#1 | How Do I: Build Interop Forms? (11 minutes, 28 seconds)

View 1 Replies

Getting Parent Form's Property Values In A Child Form

Feb 20, 2012

I have a custom form that I use instead of msgbox for a number of reasons. The initial reason was to keep the message centered on it's parent rather than the screen. There are many articles about this but I still have not found an elegant way to get access to the Parent's properties from inside the Child without passing them in (by one way or another).

In the child form the me.parent, me.parentform are not instantiated and apparently can not be used.

The point is to have this form be totally encapsulated with the logic being self contained. This is not an MDI child, and I do not want it to be due to the limitations on MDI children.

My current workaround looks like this I use a ShowMsg Function in my MyMsgBox form which looks like this:

[Code]....

View 6 Replies

How To Make Property Read Only

Feb 25, 2009

I have a class which contains the object and a collection for that object. I want to make a property readonly to external calls, but allow access to that property from the collection class. I know I can use:[code]But, I want to the PreviousRow property to actually show as "ReadOnly" in the intelisense of the calling code of client app. The above does not. The only way that I see to make it show as "ReadOnly" in the called code is to mark the whole property as ReadOnly, but the problem with this is that my collection class code can no longer access this property:[code]I tried using the "Friend" declaration, but that seems to still allow Write access to the calling code.I only want write access from within the RowCollection class.

View 9 Replies

Is There Tab Property Can Assign To Make A Given Tab Not Only 'top'

Nov 28, 2009

Is there a tab property I can assign to make a given tab not only the "top" (or active) tab but also the left most or is there another way to do this?(It seems pretty straight forward to make a tab the top or active tab.)The requirement is that I've got one tabcontrol that contains a potentially large number of tabs. Each member tab has a right fair number of controls and dialogs.These tabs are all grouped by fours sequentially. For example, tabs 0-3 are one group, 4-7 the next group, etc.I'd like to control the display of this tabcontrol from a different tab control. This second tab control contains high level information about the 1st tab control as well as a lot of other things pertaining to all four tabs that the user needs to see as well.For example, if I've got 8 total Tab1's, then I've got 2 Tab2's.When Tab2(0) is selected, I'd like Tab1's leftmost item to be Tab1(0). When Tab2(1) is selected, I'd like Tab1(4) to be my leftmost tab in Tab1, rotating the lower 4 out of view for the time being.

View 4 Replies

Make Custom Property?

Mar 10, 2009

this is the code for my property

Dim _playernumber As Integer
Property Player() As Integer
Get

[code].....

View 3 Replies

Listview Hide Selection - Row To Stay Focused While Editing A Textbox

Jan 4, 2009

I have a listview that is populated with data. When I select a row the data is added to my textboxes for viewing editing etc. I want the row to stay focused while I am editing a textbox. I have set the property Hide selection to false for my list view but I still lose focus of the row.

[Code]...

View 3 Replies

Sendkeys To A Not Focused Running Application Visual Basic 2008

Jun 24, 2009

i allready know i cant use sendkeys.send, whats the other code to do this?

View 2 Replies

How To Make Distinction Between Property Name And Structure Name

Aug 13, 2009

Is there a way to tell VB.Net to use a type instead of a local property name when there is a naming conflict in your code?

Public Class MyClass
private mBedrag as single
Public Property bedrag() As Single
Get

[Code]...

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved