472,791 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 software developers and data experts.

Problem with hosting forms within forms

I have the following situation:

Need a user resizable user control. After much trying with user control I
came across the idea of hosting the controls in a form marked as not
TopLevel = false. This work fine for most cases, allowing the user to
resize the form (and controls within the form.

The forms them selves are create dynamically when the user drags a node from
a listview to a panel (contained in a Usercontrol which is hosted by the
main form. The location of the from once dropped is at the point where the
mouse was when the control was dropped.

The form itsself hosts a top panel with a label and text box (docked top),
and a CheckListBox docked Fill. Now all the above works fine. The Panel
upon which the controls are dropped is marked as AutoScroll true. Dropping
the "Forms" on the control seems to set the AutoScollMinSize correctly. I
can move the "Forms" around on the Panel and the scrollbars respond to that
movement.

Now the problem:
If I drop the form such that the entire CheckListBox does not show, and then
attempt to click one of the list items (CheckListBox is CheckOnClick = True)
the form will jump on the panel to attempt to show the entire CheckListBox,
the item checked will be incorrect.

If I move the dropped form with the mouse horizontal (CheckListBox is still
not entirely visible) this will sometimes stop the auto move (not from my
code) but not always. If I enter text into the TextBox there is no weird
movement.

I will put the call stacks in a response to this message so that only people
who are interested will have to download them.

Lloyd Sheen


Nov 20 '05 #1
3 1593
Note that first call stack is for form which does not have CheckListBox
showing entirely. The first event caught is the "phantom" move attempting
to click a CheckListBox item. Note the second line of the call stack which
is a OnMove ? Much further down is the WmMouseDown message. The call stack
for the same situation with a CheckListBox showing entirely after the drag
drop is shown at the end of this message.
sqlserver.dll!QueryBuilder.QBFormChangeLocation(Ob ject sender = {QueryTableView}, System.EventArgs e = {System.EventArgs}) Line 262 Basic

system.windows.forms.dll!System.Windows.Forms.Cont rol.OnMove(System.EventArg
s e = {System.EventArgs}) + 0x5e bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.OnLocationChanged(Syst
em.EventArgs e = {System.EventArgs}) + 0x1c bytes
system.windows.forms.dll!System.Windows.Forms.Cont rol.UpdateBounds(int x =
352, int y = -13, int width = 216, int height = 288, int clientWidth = 208,
int clientHeight = 261) + 0xb3 bytes
system.windows.forms.dll!System.Windows.Forms.Cont rol.UpdateBounds() +
0x150 bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.WmMove(System.Windows.
Forms.Message m = {System.Windows.Forms.Message}) + 0x1a bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.WndProc(System.Windows
..Forms.Message m = {System.Windows.Forms.Message}) + 0x654 bytes

system.windows.forms.dll!System.Windows.Forms.Scro llableControl.WndProc(Syst
em.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x6c bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.WndProc(Syste
m.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x37 bytes

system.windows.forms.dll!System.Windows.Forms.Form .WndProc(System.Windows.Fo
rms.Message m = {System.Windows.Forms.Message}) + 0x2ab bytes

system.windows.forms.dll!ControlNativeWindow.OnMes sage(System.Windows.Forms.
Message m = {System.Windows.Forms.Message}) + 0x13 bytes

system.windows.forms.dll!ControlNativeWindow.WndPr oc(System.Windows.Forms.Me
ssage m = {System.Windows.Forms.Message}) + 0xda bytes

system.windows.forms.dll!System.Windows.Forms.Nati veWindow.DebuggableCallbac
k(int hWnd = 459898, int msg = 3, int wparam = 0, int lparam = 655716) +
0x3d bytes

system.windows.forms.dll!System.Windows.Forms.Scro llableControl.SetDisplayRe
ctLocation(int x = 0, int y = -171) + 0x2c4 bytes

system.windows.forms.dll!System.Windows.Forms.Scro llableControl.ScrollContro
lIntoView(System.Windows.Forms.Control activeControl = {SelectedItem=""}) +
0x3de bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.ScrollActiveC
ontrolIntoView() + 0x37 bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.ActivateContr
olInternal(System.Windows.Forms.Control control = {SelectedItem=""}, bool
originator = true) + 0x10f bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.ActivateContr
olInternal(System.Windows.Forms.Control control = {SelectedItem=""}) + 0x13
bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.WmSetFocus(System.Wind
ows.Forms.Message m = {System.Windows.Forms.Message}) + 0x94 bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.WndProc(System.Windows
..Forms.Message m = {System.Windows.Forms.Message}) + 0x747 bytes

system.windows.forms.dll!System.Windows.Forms.List Box.WndProc(System.Windows
..Forms.Message m = {System.Windows.Forms.Message}) + 0x2a2 bytes

system.windows.forms.dll!System.Windows.Forms.Chec kedListBox.WndProc(System.
Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x66 bytes

system.windows.forms.dll!ControlNativeWindow.OnMes sage(System.Windows.Forms.
Message m = {System.Windows.Forms.Message}) + 0x13 bytes

system.windows.forms.dll!ControlNativeWindow.WndPr oc(System.Windows.Forms.Me
ssage m = {System.Windows.Forms.Message}) + 0xda bytes

system.windows.forms.dll!System.Windows.Forms.Nati veWindow.DebuggableCallbac
k(int hWnd = 656482, int msg = 7, int wparam = 394312, int lparam = 0) +
0x3d bytes

system.windows.forms.dll!System.Windows.Forms.Nati veWindow.DefWndProc(System
..Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0xd4 bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.DefWndProc(System.Wind
ows.Forms.Message m = {System.Windows.Forms.Message}) + 0x13 bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.WmMouseDown(System.Win
dows.Forms.Message m = {System.Windows.Forms.Message},
System.Windows.Forms.MouseButtons button = Left, int clicks = 1) + 0x4e
bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.WndProc(System.Windows
..Forms.Message m = {System.Windows.Forms.Message}) + 0x484 bytes

system.windows.forms.dll!System.Windows.Forms.List Box.WndProc(System.Windows
..Forms.Message m = {System.Windows.Forms.Message}) + 0xca bytes

system.windows.forms.dll!System.Windows.Forms.Chec kedListBox.WndProc(System.
Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x66 bytes

system.windows.forms.dll!ControlNativeWindow.OnMes sage(System.Windows.Forms.
Message m = {System.Windows.Forms.Message}) + 0x13 bytes

system.windows.forms.dll!ControlNativeWindow.WndPr oc(System.Windows.Forms.Me
ssage m = {System.Windows.Forms.Message}) + 0xda bytes

system.windows.forms.dll!System.Windows.Forms.Nati veWindow.DebuggableCallbac
k(int hWnd = 656482, int msg = 513, int wparam = 1, int lparam = 1638438) +
0x3d bytes

system.windows.forms.dll!System.Windows.Forms.Appl ication.ComponentManager.S
ystem.Windows.Forms.UnsafeNativeMethods+IMsoCompon entManager.FPushMessageLoo
p(int dwComponentID = 1, int reason = -1, int pvLoopData = 0) + 0x349 bytes
system.windows.forms.dll!ThreadContext.RunMessageL oopInner(int reason
= -1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x1f3 bytes
system.windows.forms.dll!ThreadContext.RunMessageL oop(int reason = -1,
System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x50 bytes

system.windows.forms.dll!System.Windows.Forms.Appl ication.Run(System.Windows
..Forms.Form mainForm = {ToadUI.Form1}) + 0x34 bytes
ToadUI.exe!ToadUI.Form1.Main() Line 11 + 0x1d bytes Basic

Call stack showing the the ItemCheck is called in the case where the
CheckBoxList shows entirely after the drag/drop.
sqlserver.dll!QueryBuilder.ItemCheck(Object sender =

{System.Windows.Forms.CheckedListBox},
System.Windows.Forms.ItemCheckEventArgs e =
{System.Windows.Forms.ItemCheckEventArgs}) Line 244 Basic

system.windows.forms.dll!System.Windows.Forms.Chec kedListBox.OnItemCheck(Sys
tem.Windows.Forms.ItemCheckEventArgs ice = {Index=2 NewValue=Checked
CurrentValue=Unchecked}) + 0x23 bytes

system.windows.forms.dll!System.Windows.Forms.Chec kedListBox.LbnSelChange()
+ 0xfa bytes

system.windows.forms.dll!System.Windows.Forms.Chec kedListBox.WmReflectComman
d(System.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x3f
bytes

system.windows.forms.dll!System.Windows.Forms.List Box.WndProc(System.Windows
..Forms.Message m = {System.Windows.Forms.Message}) + 0x98 bytes

system.windows.forms.dll!System.Windows.Forms.Chec kedListBox.WndProc(System.
Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x66 bytes

system.windows.forms.dll!ControlNativeWindow.OnMes sage(System.Windows.Forms.
Message m = {System.Windows.Forms.Message}) + 0x13 bytes

system.windows.forms.dll!ControlNativeWindow.WndPr oc(System.Windows.Forms.Me
ssage m = {System.Windows.Forms.Message}) + 0xda bytes

system.windows.forms.dll!System.Windows.Forms.Nati veWindow.DebuggableCallbac
k(int hWnd = 656388, int msg = 8465, int wparam = 66564, int lparam =
656388) + 0x3d bytes
system.windows.forms.dll!System.Windows.Forms.Cont rol.SendMessage(int msg
= 8465, int wparam = 66564, int lparam = 656388) + 0x48 bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.ReflectMessageInternal
(int hWnd = 656388, System.Windows.Forms.Message m =
{System.Windows.Forms.Message}) + 0x7f bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.WmCommand(System.Windo
ws.Forms.Message m = {System.Windows.Forms.Message}) + 0x72 bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.WndProc(System.Windows
..Forms.Message m = {System.Windows.Forms.Message}) + 0x252 bytes

system.windows.forms.dll!System.Windows.Forms.Scro llableControl.WndProc(Syst
em.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x6c bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.WndProc(Syste
m.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x37 bytes

system.windows.forms.dll!System.Windows.Forms.Appl ication.ParkingWindow.WndP
roc(System.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x22
bytes

system.windows.forms.dll!ControlNativeWindow.OnMes sage(System.Windows.Forms.
Message m = {System.Windows.Forms.Message}) + 0x13 bytes

system.windows.forms.dll!ControlNativeWindow.WndPr oc(System.Windows.Forms.Me
ssage m = {System.Windows.Forms.Message}) + 0xda bytes

system.windows.forms.dll!System.Windows.Forms.Nati veWindow.DebuggableCallbac
k(int hWnd = 656306, int msg = 273, int wparam = 66564, int lparam = 656388)
+ 0x3d bytes

system.windows.forms.dll!System.Windows.Forms.Nati veWindow.DefWndProc(System
..Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0xd4 bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.DefWndProc(System.Wind
ows.Forms.Message m = {System.Windows.Forms.Message}) + 0x13 bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.WmMouseUp(System.Windo
ws.Forms.Message m = {System.Windows.Forms.Message},
System.Windows.Forms.MouseButtons button = Left, int clicks = 1) + 0xb5
bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.WndProc(System.Windows
..Forms.Message m = {System.Windows.Forms.Message}) + 0x49b bytes

system.windows.forms.dll!System.Windows.Forms.List Box.WndProc(System.Windows
..Forms.Message m = {System.Windows.Forms.Message}) + 0x217 bytes

system.windows.forms.dll!System.Windows.Forms.Chec kedListBox.WndProc(System.
Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x66 bytes

system.windows.forms.dll!ControlNativeWindow.OnMes sage(System.Windows.Forms.
Message m = {System.Windows.Forms.Message}) + 0x13 bytes

system.windows.forms.dll!ControlNativeWindow.WndPr oc(System.Windows.Forms.Me
ssage m = {System.Windows.Forms.Message}) + 0xda bytes

system.windows.forms.dll!System.Windows.Forms.Nati veWindow.DebuggableCallbac
k(int hWnd = 656388, int msg = 514, int wparam = 0, int lparam = 2818106) +
0x3d bytes

system.windows.forms.dll!System.Windows.Forms.Appl ication.ComponentManager.S
ystem.Windows.Forms.UnsafeNativeMethods+IMsoCompon entManager.FPushMessageLoo
p(int dwComponentID = 1, int reason = -1, int pvLoopData = 0) + 0x349 bytes
system.windows.forms.dll!ThreadContext.RunMessageL oopInner(int reason
= -1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x1f3 bytes
system.windows.forms.dll!ThreadContext.RunMessageL oop(int reason = -1,
System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x50 bytes

system.windows.forms.dll!System.Windows.Forms.Appl ication.Run(System.Windows
..Forms.Form mainForm = {ToadUI.Form1}) + 0x34 bytes
ToadUI.exe!ToadUI.Form1.Main() Line 11 + 0x1d bytes Basic


Nov 20 '05 #2
"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> schrieb
I have the following situation:

[...]


Haven't you posted the question already?
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
I thought so, had a problem with my provider and the newsgroup. So did it
again. Sorry if this is a problem. Does anyone have any ideas what might
be happening?

Lloyd Sheen
"Armin Zingler" <az*******@freenet.de> wrote in message
news:40*********************@news.freenet.de...
"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> schrieb
I have the following situation:

[...]


Haven't you posted the question already?
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

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

Similar topics

10
by: amit.purohit | last post by:
hi, I have a very strange problem on my login Page. the Page was working fine a few days back, but now does not generate post back events for controls. this login page uses form based...
7
by: Tim T | last post by:
Hi, I have the need to use dynamically loaded user controls in a webform page. I have the controls loading dynamically, and that part works fine. this is the code used in a webform to dynamically...
1
by: MB | last post by:
Hi guys, I've been experiencing a problem here with forms authentication. When I am on one of my wesite's http (non-secure pages) everything works fine. However, I am using a Shared SSL provided...
1
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
1
by: explode | last post by:
I made a oledbdataadapter with this code Public Sub Novo(ByVal nova1 As String, ByVal nova2 As String) Dim i As Integer Dim nova As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter Dim veza...
2
by: explode | last post by:
I made nova oledbdataadapter select update insert and delete command and connection veza. dataset is Studenti1data, I made it by the new data source wizard,and made datagridview and bindingsource...
5
by: explode | last post by:
I made a procedure Public Sub Novo(ByVal nova1 As String, ByVal nova2 As String) that creates a new oledbDataAdapter with insert update select and delete commads. I also added that commands can...
0
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I am unable to execute the following statement in my current project. The class PosExplorer is in a dll file. PosExplorer explorer = new PosExplorer() but now I get this dreaded exception...
5
by: Martinez | last post by:
Hello I try declare Dim db as New BtDatabase() and execute metod db.open(par1,par2,par3) but i get error : System.NullReferenceException was unhandled
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.