473,785 Members | 2,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Position owned form relative to owner form on screen

I would like to show an owned form at a predetermined spot on the screen
relative to the the owner form's position on the screen (example:
frmOwner.Top + 100 and frmOwner.Left + 50). How to do?

Thanks,
Dean Slindee
Nov 20 '05 #1
2 2109
Hi Dean,

Thanks for posting in the community.

First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you wants to display the owned
form at a predetermined spot on the screen.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

Here I write some code for you, if you have concern on this issue, please
post here.

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim fm As New Form2
fm.StartPositio n = FormStartPositi on.Manual
fm.Owner = Me
fm.Top = Me.Top + Int32.Parse(Tex tBox1.Text)
fm.Left = Me.Left + Int32.Parse(Tex tBox2.Text)
fm.Show()
End Sub
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #2
Hi Dean,

Thanks for posting in the community.

Did my suggestion help you?
If you have any concern on this issue, please post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
19864
by: Wade Chy | last post by:
Hi All I am in a situation where I have to grant select privileges on tables owned by a different owner to a specific role. I am logged in as system/sysdba. I have created a new role FIN_READ_ONLY. I need to grant SELECT privileges on all the existing and future tables owned by FIN. I tried to grant SELECT on FIN.ACCT_REF to FIN_READ_ONLY. But was not successful due to insufficient privileges since SYSTEM does not own the table or dont...
2
4399
by: Robert Chan | last post by:
I have a form that is 2000x700 it is meant to be run across two monitors I want to get the mouse position relative to the form not to the screen is there any kind of way to reference the forms position on the screen, to tell where the mouse is in relation to the form and so that I can know which part of a panel someone clicked on. thanks in advance --rob
0
972
by: Ioannis Demetriades | last post by:
Hi On my main form I have a menu with menu shortcuts and I noticed that when I display a new form as an MDIChild form the shortcuts work fine from within the mdi child form. If however i display an owned form (as opposed to mdichild) the shortcuts don't work unless the owner form has the focus. Is there an easy way of making those shortcuts work with owned forms as well?
3
1805
by: Jerry Wei | last post by:
Dear all: I have a problem about how to handle the events. For example, there are two forms, Form1 and Form2. Form2 is owned by Form1 and there is a button,Button1, in Form2. It is no problem for Form2 to handle the event "Button1.Click" . My problem is how to handle the Button1.click event in Form1 as Form2's owner. Is there any way to achieve this demand??? ================================================================= owner and...
6
1623
by: pamelafluente | last post by:
Hi guys I am puzzed (???) with a probably stupid problem (VB2003). I must be doing something dumb ... I want to open a owned form (must *not* be mdi child) over an Mdi Container, when the Mdi container starts. I have a small demo program made of: Form1, Form2 (empty) and a "StartProgram" class which contain the following code. The startup object is set to be: Sub Main
1
6059
by: John | last post by:
Hi How can I set the left position of a form relative to screen? Thanks Regards
2
5781
by: tony | last post by:
Hello! Assume I catch a double click in a form by using the event handler that forms designer create for me. Now to my question when I double click in the form the event handler is trigged but when I'm in this event handler I want to find out the cursor position(x,y cordinates) where the double click occurred how is that done? //Tony
3
55993
by: Andrew Hall | last post by:
Hi all Can anyone advise how to get the position of an open form and how to set the position of an opening form within the access window. I have: MA Access97 (because I do not have the funds to obtain a more recent version nor the time to learn the new interface) Form1 and form2. Both forms are an identical size because of the length of the captions of the controls on the forms.
0
767
by: =?Utf-8?B?SkI=?= | last post by:
I would like to create an owned form that is owned by a modal dialog rather than a modeless form. The idea is the following Dim dlg as new Mydlg with dlg .ShowDialog .Dispose end with class mydlg
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.