473,750 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Make forms show up in middle of screen

489 Contributor
Why is it that on laptops with wide screens that my application screens show up on the right side of the screen and the user has to drag the screen into the middle. Is there a way to make the screen always show up in the middle of the screen?
Thanks for any help.
Feb 10 '09
19 18645
CD Tom
489 Contributor
I've doubled checked everything and when I compile I still get the "Compile error Method or Data member not found. When I compile your database I get the same error.
Feb 17 '09 #11
ADezii
8,834 Recognized Expert Expert
@CD Tom
I'll call in some of my colleagues in on this one. If the problem can't be resolved, can you E-Mail me a Copy of your Database so that I may have a look at it?
Feb 17 '09 #12
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi ADezii. Using A2003 I receive two error messages when I compile the code in the sample DB in post # 5. The compile errors both relate to the use of WindowState in class FormInfo.

The first error message relates to sub RetrieveCoords - method or data member not found.

.State = Val(GetSetting( AppName, _
strName, adhcState, Me.WindowState) )

I wonder if the use of Me is incorrect here as WindowState is not a property of an Access form. There is a WindowState property of the form class available in .Net, however - as this MSDN link shows.

The second is in SaveCoords - expected variable or procedure, not enumerated type.

Call SaveSetting( _
AppName, strName, adhcState, WindowState)

Confusingly, there is a WindowState defined as an enumerated type in the class module (hence the error). Given the potential confusion over the .Net form class WindowState property I wonder if this was deliberate overloading on the part of the class designer?

-Stewart
Feb 17 '09 #13
FishVal
2,653 Recognized Expert Specialist
@ADezii
Hello, ADezii.

Unfortunately module of FormInfo class doesn't contain "Get" part of WindowState property. Seems like the file you've attached is not the final working version. ;)

Regards,
Fish.
Feb 17 '09 #14
FishVal
2,653 Recognized Expert Specialist
@CD Tom

Actually, both SaveCoords() and RetrieveCoords( ) methods could be thrown away if you don't intend to store form coordinates in windows registry.
Feb 17 '09 #15
CD Tom
489 Contributor
That does take care of the Compile error and I don't intend to store form coordinates in the registry.
Thanks everybody for your help.
Feb 17 '09 #16
ADezii
8,834 Recognized Expert Expert
@ FishVal and Stewart, thanks guys for all your help, it is always appreciated. I've run this code on three different Access Versions, on three different PCs, and have had no problem. I'm more confused than ever. BTW, the base code was taken from the Access 2002 Desktop Developers Handbook, not exactly a 'shabby' source.

Back again and discovered my mistake. The DB that I Attached was only a subset of the actual Database which contained much more functionality in addition to the Center Form code. Obviously, in trying to make things more simple and compact, I've actually complicated everything and left a few things out in the process. Sorry for the run-around guys!
Feb 18 '09 #17
CD Tom
489 Contributor
ADezii,
Can you send me the complete database I would like to see exactly what was causing the Compile error. I've removed the two sections and it seems to be working fine. Thanks for your help and also FishVal and Stewart.
Feb 18 '09 #18
ADezii
8,834 Recognized Expert Expert
@CD Tom
I will be more than happy to, but its size is beyond the limitation allowed for an Attachment. Simply send me your E-Mail Address in a Private Message (PM), and I'll send it to you that way. BTW, it is full of very interesting and functional code.
Feb 18 '09 #19
CD Tom
489 Contributor
I've never sent a private message, have been looking around and don't see how it's done, sometime I really feel stupid.
Feb 18 '09 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1694
by: BuzzLight | last post by:
This is my problem :- - I have set a form frmSplash as the startup form instead of sub Main. - This means I dont create an instance of it myself at startup.. its automatically created. - I have a timer on frmSplash set to 3000 ms interval - and here is its tick event : Private Sub tmrStartup_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrStartup.Tick Dim frmParent As New frmParent frmParent.Show() Me.Close()
1
1167
by: BuzzLight | last post by:
Thanks alot Charles m8, your suggestion was very useful, Iam very new to vb.net ... I used application.run and it works fine but I do not know what "Application.Run" means.. what it does.. But Thankyou for your help
0
1118
by: Ronald S. Cook | last post by:
Can't make forms authentication for non-ASPX files work In my web app, I want to secure not only .aspx files, but also .htm files. From what I've read, I have to jump through some hoops to protect the .htm files. In IIS, I right clicked on the default web site and clicked on the ISAPI Filters tab. I added ".htm" and chose "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" as the executable.
1
1827
by: DBC User | last post by:
I am wondering is there any way when I do a show and hide of a form, we can do a smooth transition to the new screen like power point presentation in c#?? Thanks.
1
1282
by: den | last post by:
if I want to open a popup at middle of screen in some example I see that is used also Math.round; is obligatory? there are situation where the result of screen/2 if isn¢t an integer can to cause prolems?
3
2079
by: jlb | last post by:
I am converting a VB6 app to .NET Visual Studio 2005. I have about 20 forms. Ths app starts with Main_form, and then passes to a "loop" of about 14 forms that pass from 1 to another, with the possiblity of passing back and forth. The cylce can go on repeatledly without passing back to the "parent" form Main_form. My problem is everything flows along until I try to "repeat" the form.show/form.dialog. Then the form can't display, or I get the...
0
4585
Shashi Sadasivan
by: Shashi Sadasivan | last post by:
Hi All, i Have an application functionaluty which has 4 forms which are needed to interact by the user by dragging data from these forms to one another the main form is located in the MDI Parent and the rest are on their respective screen (3 other secondry screens) At the moment i am testing using 2 screens but i get a very similar behavious when i run it on a 4 screened system. For the 2 screen system: form1 opens in primary screen (ie...
0
9000
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
8838
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9339
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
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
8260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6804
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4713
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...
1
3322
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
2804
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.