473,669 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Which event to use to set initial form position?

In VB6 I used to use the Load event of a Form to set its position on the
screen (based on wherever the user put the form the last time they used it).
This was ideal as it fired before the form became visible.

Since moving to VB.NET I'm finding that the Form is already displayed on
screen when the Load method executes. This means that I get a slight but
noticeable flicker when the form is first opened, as it moves from the
default position to the position I programmaticall y set it to.

Is there a better event that I can use for this than the Load event?

For info, I'm displaying the form as follows:

Dim myForm as New SomeForm
myForm.ShowDial og()

Many thanks,

--

(O)enone
Nov 21 '05 #1
2 1982
Hi,

Use the new procedure instead.

Ken
-------------------
"Oenone" <no***@nowherei nparticular.com > wrote in message
news:d1******** **@titan.btinte rnet.com...
In VB6 I used to use the Load event of a Form to set its position on the
screen (based on wherever the user put the form the last time they used it).
This was ideal as it fired before the form became visible.

Since moving to VB.NET I'm finding that the Form is already displayed on
screen when the Load method executes. This means that I get a slight but
noticeable flicker when the form is first opened, as it moves from the
default position to the position I programmaticall y set it to.

Is there a better event that I can use for this than the Load event?

For info, I'm displaying the form as follows:

Dim myForm as New SomeForm
myForm.ShowDial og()

Many thanks,

--

(O)enone

Nov 21 '05 #2
Ken Tucker [MVP] wrote:
Use the new procedure instead.


Ah yes, that works fine. I thought I'd tried that before and the window
hadn't been initialised (so it had no size or anything) but that must have
been something else I was trying.

Thanks!

--

(O)enone
Nov 21 '05 #3

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

Similar topics

7
3598
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title> </head> <style type="text/css">
6
2426
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: /////////////////////////////////////////////// <% ntlogon = (Request.ServerVariables("LOGON_USER"))
8
2348
by: Steve Schroeder | last post by:
For some reason I cannot get the OnSelectedIndexChanged event to fire for a listbox I have on a page. I'm able to populate the listbox with data from a stored procedure, but cannot trigger the event. I do have EnableViewState = True for the listbox. I'm imagining (wanting) to populate the listbox named: lstNames by using the DataValueField from lstDepartments. It's quite apparent though that the event is not triggering as I can misname...
0
2271
by: Tand35006 | last post by:
Hi, I hope some one can help with this. I have a basic webform with 2 DropDownLists and a single DataGrid. What I am trying to do is populate the first DDList from a dataset on Form_Load. I then want to use this 1st DDList to populate the 2nd DDList via the SelectedIndexChange Event. So far so good. all works up to this point. The next thing I'm trying to do is to use the 2nd DDList value in a queery to populate the Datagrid also...
4
9680
by: mflll | last post by:
I am looking into the different techniques of handling arrays of edit boxes in Java Script. The first program below works fine. However, are there better ways of doing this, where the person writing the JavaScript doesn't have to pass the index in the "onChange" event name. I thought that one might be able to use "this.value" or compare this as
2
1575
by: andrew.roberts | last post by:
This is my second post now on this subject has I seem to be getting no where and the problem is really starting to bug me now. I can get a datagrid into an editable state but then neither the Update or Cancel events seem to be firing and I am at a lost to explan why. My code is below, if any one can tell me what I am doing wrong then that would be excellent! using System; using System.Collections; using System.ComponentModel;
6
9966
by: anirban.anirbanju | last post by:
hi there, i've some serious problem to add rows dynamically in a table. my table contains 5 cell. | check | from_value | to_value | color_text | color_value | --------------------------------------------------------------------------------- | | | | | | | | | | |
3
5176
by: wanwan | last post by:
I made a game with a window form that needs to record the mouse position to an array at 100 samples per second, so I use the mouse move event to do the job. The problem is the mouse move event is raised by my software at max 30 times per second. I have determined I should use a timer event on every 10 msec to raise the mouse event, but then I need the same mouse event that is sent to the mouse move function in the mouse move event how...
1
2858
by: bigijoseph | last post by:
Please help : page load event is not firing. -------------------------------------------------------------------------------- Hi, I am a new to .net. I am trying to learn it. I tried the following code to execute. But the page load event is not firing. I tried , the same function rewriten in C#, then page load event worked absolutely fine. I dont know why the page load event is not firing in VB.net . Could some one try please try my same...
0
8895
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
8658
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
7407
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
6210
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
5682
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
4206
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
4386
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2797
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
1788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.