WinForms: Locating The Relative Position Of Two Controls

Jul 9, 2010

I'm writing a VB.Net WinForms application that has multiple data girds on any given form. On one such form, the data grids are loaded into split containers which in turn are located on a tab control. The load method for each data grid is threaded so that an animated "Loading" form can be shown. I would like to position the new loading form (which is smaller than the grid) on top of, and preferably in the center of, the grid that is loading. Whats the easiest way to find the grids location within the main form so that I can adjust the loading forms location?

View 1 Replies


ADVERTISEMENT

Winforms - Form Controls Shift Position When Solution Opened On Laptop?

Mar 8, 2009

I developed a VB Winforms application in VS2010 Pro on my Win7 x64 desktop computer. I also have VS2010 loaded on my Win7 x64 laptop and when I open the same solution the application's form controls are shifted out of alignment and appear slightly stretched horizontally. The VS IDE settings are identical on both computers. Any idea why the solution looks perfect in the IDE when on my desktop, but when opened in the IDE on my laptop, all the controls shift out of alignment horizontally

View 5 Replies

Mouse Position Relative To Form?

Jan 7, 2009

I've used the search function but couldn't yield any solutions. Sorry if I didn't look hard enough. Anyway, it's just a quick question. How can I find the mouse cursor X and Y co-ordinates relative to the form itself and NOT the screen?

View 9 Replies

How To Position Buttons Relative To Edge Of Form

Jul 18, 2012

I would like my 'quit' button to appear in the bottom right hand corner of my menu screen, but it seems that every computer in the office has a different sized screen, different size ration (some are widescreen) and different resolution. When I deploy my program, the quit button may appear off-screen (the user has to scroll down to find it) or it may appear half way across the screen on a widescreen laptop for example. If I set my form to 'maximized', is there a way to position a button relative to the bottom right hand corner of the form? Also, on one maximized form I have two datagridview's side by side. Is there are way to automatically set each one to take up half of the available form width, so they fill the form nicely?

View 2 Replies

Make Relative Cursor Position On The Form?

Jun 3, 2012

I am working on a screen cropping program. The program works by expanding the current for to maximum and the opacity level set to 35% so the screencan be seen from behind. The cropping code is below:

Private Sub disect_mouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
Me.Opacity = 0

[code]....

View 14 Replies

Cursor - Get The Position Of The Mouse Relative To The Browser Control

May 13, 2010

I have a hobby of making webbrowsers. I'm writing a new one, but it has an old webbrowser control in it (CEXWB). This means that I am using IHTMLDocument(s) rather than normal HTMLDocuments. I'm in the process of implementing a ContextMenu, but I need to get the position of the mouse relative to the browser control, so using something like Cursor.Position won't work. The Webbrowser_MouseMove event also won't work. I'm not sure why. I also can't use WithEvents with a HtmlDocument (like in my webbrowser ContextMenu tutorial) as I cannot Convert A System.Windows.Forms.HtmlElement into an mshtml.IHTMLDocument2.

So far, I have this code:

'The event which fires when the ContextMenu for the browser Opens
Private Sub cmenuWB_PopupOpen(ByVal sender As Object, ByVal e As DevComponents.DotNetBar.PopupOpenEventArgs) Handles cmenuWB.PopupOpen

[CODE]...

How I could implement this?

View 3 Replies

IDE :: Set Project Default For Winforms Projects S/ Default Modifier For Controls Added To Winforms Is Private

May 28, 2010

Is it possible to set a project default for VB.NET winforms projects so that the default Modifier for controls added to winforms is Private (not Friend)?I know there's a "modifiers" property in the properties window so I can set it for each individual control however I would like to change the project so from now on myself and other developers have to specifically decide to change from friend to private. (Which I would strongly discourage them from doing).I believe there is no way of doing this, but on another forum a while ago someone mentioned it would be possible with an add-in (but didn't name the add-in or where to get it).

View 1 Replies

Set Control (windows Control) Position To Some Other Control Relative Postion?

Mar 25, 2011

I want to set control position relative to other control so when i make one control hide then other control move up like this.

View 1 Replies

Position Of Controls On Different Computers

Jul 1, 2011

I have a form with a tab control. Above it, there are lables, combo boxes and text boxes.

On the development machine, it works fine but on other machines, where resolution is different, the position of the controls is changed. Somewhere combo box overlaps the tab control, somewhere text boxes and lables are not aligned with each other.

How to set it so that my application maintains the shape no matter what resolution it is.

I tried AutoScaleMode to dpi, inherit etc. but nothing worked.

View 5 Replies

Position Of Controls On Different Computers?

Jul 1, 2011

I have a form with a tab control. Above it, there are lables, combo boxes and text boxes. On the development machine, it works fine but on other machines, where resolution is different, the position of the controls is changed. Somewhere combo box overlaps the tab control, somewhere text boxes and lables are not aligned with each other.

How to set it so that my application maintains the shape no matter what resolution it is.

I tried AutoScaleMode to dpi, inherit etc. but nothing worked.

View 1 Replies

Winforms :: Controls Not Visible?

Mar 26, 2012

I am trying to see all the labels in Me.Controls and when I use:

For Each Control As Label In Me.Controls.OfType(Of Label)()
MsgBox(Control.Name.ToString)
Next

it only shows the labels that have NOT been renamed

View 1 Replies

Cannot Change Position Of Controls On Form

Sep 6, 2010

I am using VB2008 Express. After making changes to the position of controls on the form, the controls position reverts to the original position when the program is rebuilt and run. At first, there is no problem, but after 30 minutes working with the program, the problem begins. I am careful to keep all the files together. I am using XP Professional and .net 3.5

View 21 Replies

C# - WinForms Table Control That Can Contain Other UI Controls?

May 22, 2012

I am currently developing a WinForms application in C# and require a table control that can contain other UI controls.In the following example, I would like the Links column to contain link label controls:

| ID | Name | Links |
-----------------------------------
| 1 | n1 | link1, link2, link3 |
| 2 | n2 | link1 |

Is there one I can use 'out of the box', are there any good third party ones?

View 1 Replies

Multiple Controls From Different Sources In Winforms?

Aug 12, 2009

Has anyone tried using controls from different sources into their application that uses winforms? Will these combination of controls work together?

View 3 Replies

Over 60 Free Controls For WinForms - ASP.Net And SilverLight

Jun 10, 2011

I may have mentioned it before but I can't find a thread in this forum where I may have previously mentioned this!!

[Code]...

View 1 Replies

Sql - Equivalent For Value-property For Controls In Winforms?

May 3, 2012

I'm used to webdeveloping, and when I work with databases, I usually use some text for the Text-property of a radio button, and the row's ID as Value-property. This makes it very easy to save to databases.

Is the an equivalent in winforms for the Value-property, or will I have to identify rows based on the text in the control?

View 2 Replies

Winforms - Drag Data From DG And Other Controls To Another DG?

Feb 15, 2012

I have form in VB.Net 2010:

I want to click-drag multi rows in dgRegister and Date, Course ID to drop in dgCourseStudent with column Date, Register ID, Register Name and Course ID.

How to code this in vb.net language?

View 1 Replies

WinForms - How To Set Tab Controls In Specific Order

Oct 21, 2009

I have a bunch of buttons on a form and when the person presses TAB I want the focus of the controls move in a specific order.

View 3 Replies

WinForms - Dynamically Adding Controls At Runtime

Oct 21, 2009

I have a WinForms application that I need to dynamically add controls to at runtime. I searched for this and I was initially led to the TableLayoutPanel (TLP).

View 4 Replies

.net - Create Custom DataTable Which Is Bindable To WinForms Controls?

Aug 25, 2011

Our shop primarily use "ADO objects" (I'm referring to DataSet, DataTable, and DataRow) for marshaling around data and manipulating it on forms and in grids. We are experimenting with creating shop-flavored counterparts to the native ADO objects so that we can impose our in-house standards on top of them. Implementing this is straightforward with one exception: I want our objects to be bindable to controls.

I'm aware of IList, IBindingList, BindingSource, etc. and have looked at and experimented with these, but I am falling short when it comes to making a class with no hard property names bindable. The native ADO objects are not strongly typed by default. You have column values that you access via the Item property (e.g. row("Age") or row.Item("Age")). The binding examples I've found online deal with strong-typed objects (e.g. row.Age). Essentially, we want to create custom ADO objects (not inherited from the native ones) that still retain their ability to bind to controls. In a grid I would expect to see columns Name, Age and Occupation from a row where these properties are exposed via row("Name"), row("Age") and row("Occupation"). This must be doable as this is exactly what the native DataTable and DataRow provide.

View 1 Replies

Save Data From WinForms Controls To A SQL Server Database?

Jun 29, 2010

I do have Visual VB.NET 2008 Express installed, SQL Server 2005 express installed, and I do know how to start a brand new project in VB.NET, and then add the database to the solution explorer, modify the tables/fields, etc. I know how to create a WinForm, add some controls (and name them and whatnot).....

So in MS Access I know how to use VB in the Code-Behind-Form to use the form in an unbound manner, and insert data into the tables via Visual Basic with SQL statements. I am looking to be able to begin the same sort of thing here, because I guess I have to start somewhere?

View 1 Replies

Telerik Winforms Controls Free For MSDN Subscribers?

Jan 6, 2010

for MSDN subscribers:[URL]

View 6 Replies

Way To Build BindingSource Filter From A Group Of Controls [WinForms]?

Dec 29, 2009

Right now I am building a filter based on user input (textboxes and comboboxes) by a bunch of if statements. There must be a better way. Here is my current code:

Private Function BuildProductsFilter() As String
Dim RawFilterResults As String = ""
If Not CompanyNameComboBox.SelectedValue Is Nothing AndAlso Not

[code].....

View 1 Replies

Winforms :: Why Changing Form Font Resize Some Controls

Feb 15, 2011

All my forms inherits from one base form where we handle background paint and set standard properties. Recently, I think of cheching if the app is running on Vista or Later to use Segoe UI font, and I added this. The problem is than inherited forms changed sizes and their inner controls changed also... even PictureBoxes! The controls and forms seems to be thinner (in width), so square picturebox became vertical rectangules!

[Code]...

View 1 Replies

WinForms Text Controls - Keypress Event Handler

Mar 14, 2011

In connection with a windows form's text control the keypress event handler provides a key's identity through the KeyChar property of the event argument. This works fine for all alphanumeric keys and Ctl-a ... Ctl-z, Backspace etc. but does nothing for such keys as Insert, Delete, Home, End, and the navigation keys. I would also want to read Ctl and Alt keys combinations etc. I have done these thing before, too many years ago, but forgotten it all. Tried the reference manual, but have not enough years left to succeed that way.

View 1 Replies

Change Textbox Text Size And Position Of Text In Winforms?

Dec 30, 2011

I have a normal textbox which multiline property is set to true and now I need the text written in the textbox should have a large font size.So is it possible with the normal textbox.[code]...

View 1 Replies

Winforms - "Caret Position" In .NET For Syntax Highlighting?

Dec 17, 2009

I'm trying to make a TextBox with syntax highlighting (for (HTML/CSS) in VB.NET 2008.I figured that if I use RichTextBox.Find(), I can color specific text, but then I need to call RichTextBox.DeselectAll(). The problem is that the the cursor jumps to the beginning of the RTB.

View 1 Replies

Winforms - Controls Based Security In A Windows Forms Application Using .NET?

Sep 5, 2011

I need to implement, Controls Based Security in a Windows Forms Application using VB.NET. I tried google but did not get anything much to work with.

I would like if someone, could suggest some books or tutorials.

View 1 Replies

Tabcontrol - Autoscroll = True - Making Controls Visible And Get Set Scroll Position

May 9, 2012

I am using the Tabcontrol with autoscroll = True feature, when i make hidden controls visible on the tab there position is out of place, one work around for this is to set the scroll position to 0,0 by doing this...

[Code]....

View 2 Replies

Winforms - .NET 2.0 - StackOverflowException When Using Thread Safe Calls To Windows Forms Controls

Sep 22, 2011

I have a Windows Forms app that, unfortunately, must make calls to controls from a second thread. I've been using the thread-safe pattern described on the [URL].. Which has worked great in the past.

The specific problem I am having now: I have a WebBrowser control and I'm attempting to invoke the WebBrowser.Navigate() method using this Thread-Safe pattern and as a result I am getting StackOverflow exceptions. Here is the Thread-Safe Navigate method I've written.

[Code]...

View 1 Replies







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