Click here to Skip to main content
15,911,360 members
Home / Discussions / C#
   

C#

 
QuestionDynamically placing Forms onto TabControl Pages - need to add threading Pin
boreland24-Oct-11 13:29
boreland24-Oct-11 13:29 
AnswerRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
Luc Pattyn24-Oct-11 14:19
sitebuilderLuc Pattyn24-Oct-11 14:19 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
boreland24-Oct-11 17:48
boreland24-Oct-11 17:48 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
BobJanova24-Oct-11 23:04
BobJanova24-Oct-11 23:04 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
BillWoodruff25-Oct-11 3:20
professionalBillWoodruff25-Oct-11 3:20 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
boreland25-Oct-11 3:53
boreland25-Oct-11 3:53 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
Pete O'Hanlon25-Oct-11 4:10
mvePete O'Hanlon25-Oct-11 4:10 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
BillWoodruff25-Oct-11 14:53
professionalBillWoodruff25-Oct-11 14:53 
Hi, I hope my responses are received by you as in the spirit of appreciation for your curiosity and experimental attitude !

I think (if I understand what you are pursuing here) the broad question you are asking is:

"How can I have a WinForm based UI, like-a-TabControl, with each thing-like-a-TabPage within the like-a-TabControl hosting an ActiveX control which runs in its own thread."

An interesting question ! If you care to comment, I'd like to know what you envision as the practical functionality or benefit such an architecture would enable.

A few minor comments:

1. TopMost and TopLevel are not the same creature. TopMost[^] is used to guarantee that a Form ... not a Form within a Form ... stays, while shown, in the same z-order as other Forms in the same application with TopMost=true. And other windows of your application will not be allowed to visually appear between the main form and the form(s) with TopMost = true. This is useful for 'floating' tool palettes.

And, an alternative to 'TopMost' is to set the Form.Owner property[^] of a Form (which can only be another Form): that's useful for other types of interfaces in the 'kind-of-modal' domain. ... edit ... out of order comment moved ...

Another alternative out-of-the-box way of approaching your application you may wish to explore is to modify the Program.cs file so it does not launch a Form to begin the application, but calls some function (perhaps in a static class) that launches various Forms. This technique requires you to make sure that when all Forms you've launched are closed the Application is terminated, or you will have the App running 'forever' with no UI Smile | :) ... edit ... this comment moved here ... where it should have placed ... I like to call this the "down with the Tyrant Main Form" architecture Smile | :)

That's easily done by a trivial modification of each launched Forms 'FormClosing event to examine the count of open Forms in Application.OpenForms and do the right thing if you are closing the only-one-left-standing.

So, you have a 'vast palette' of Forms related properties, and possible relationships between Forms, to work with. And you ... are the artist.

Curiousity is good !

best, Bill
"Last year I went fishing with Salvador Dali. He was using a dotted
line. He caught every other fish." Steven Wright


modified 25-Oct-11 23:30pm.

GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
boreland25-Oct-11 15:49
boreland25-Oct-11 15:49 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
BillWoodruff25-Oct-11 17:51
professionalBillWoodruff25-Oct-11 17:51 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
boreland25-Oct-11 19:29
boreland25-Oct-11 19:29 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
Pete O'Hanlon26-Oct-11 3:23
mvePete O'Hanlon26-Oct-11 3:23 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
BobJanova26-Oct-11 0:35
BobJanova26-Oct-11 0:35 
GeneralRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
BobJanova26-Oct-11 0:34
BobJanova26-Oct-11 0:34 
AnswerRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
BillWoodruff25-Oct-11 18:01
professionalBillWoodruff25-Oct-11 18:01 
AnswerRe: Dynamically placing Forms onto TabControl Pages - need to add threading Pin
boreland7-Nov-11 13:39
boreland7-Nov-11 13:39 
Question2010 C# linq Pin
dcof24-Oct-11 12:28
dcof24-Oct-11 12:28 
AnswerRe: 2010 C# linq Pin
Not Active24-Oct-11 12:57
mentorNot Active24-Oct-11 12:57 
QuestionPoint conversion. Pin
paper6724-Oct-11 8:05
paper6724-Oct-11 8:05 
AnswerRe: Point conversion. Pin
Eddy Vluggen24-Oct-11 8:34
professionalEddy Vluggen24-Oct-11 8:34 
AnswerRe: Point conversion. Pin
Luc Pattyn24-Oct-11 9:09
sitebuilderLuc Pattyn24-Oct-11 9:09 
GeneralRe: Point conversion. Pin
Keith Barrow24-Oct-11 9:11
professionalKeith Barrow24-Oct-11 9:11 
GeneralRe: Point conversion. Pin
Eddy Vluggen24-Oct-11 9:49
professionalEddy Vluggen24-Oct-11 9:49 
GeneralRe: Point conversion. Pin
Richard MacCutchan24-Oct-11 10:18
mveRichard MacCutchan24-Oct-11 10:18 
GeneralRe: Point conversion. Pin
Eddy Vluggen24-Oct-11 10:29
professionalEddy Vluggen24-Oct-11 10:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.