Hi Joe,
Welcome to MSDN Newsgroup!
Based on my experience, the best solution for this issue is to modify the
source code of dialog and add the specified code to add page to TabControl.
So I want to confirm whether or not you have this dialog's source code. If
not, I think there may be no safe way to do this except the hacking way,
just like using a thread to get dialog's handle.
I hope the above information is helpful for you. If you have any questions,
please feel free to let me know. Thanks and have a nice day!
Best Regards,
Terry Fei [MSFT]
Microsoft Community Support
Get Secure!
www.microsoft.com/security
--------------------
From: "Joe" <jb*******@noemail.noemail>
References: <#$*************@TK2MSFTNGP10.phx.gbl>
<22**********************************@microsoft.co m>Subject: Re: Any safe way to do this?
Date: Wed, 25 Jan 2006 20:07:33 -0500
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <#8**************@TK2MSFTNGP09.phx.gbl>
Newsgroups:
microsoft.public.dotnet.framework.windowsforms,mic rosoft.public.dotnet.langu
ages.csharpNNTP-Posting-Host: 69.37.58.70.adsl.snet.net 69.37.58.70
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.languages.csharp:381305
microsoft.public.dotnet.framework.windowsforms:934 56X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
I don't have direct access to the tabcontrol. I only have a single method
tocall this dialog. The dialog is coming from a third party library.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:22**********************************@microso ft.com... Programmatically?
TabPage newPage = new TabPage("New Page");
tabControl1.TabPages.Add(newPage);
-- there are other properties of course that you can set too.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Joe" wrote:
I need to some how add a page to a tabcontrol. The problem is I have a
single method to bring up the dialog which contains the tabcontrol and
doesn't return until the dialog is closed and I don't have any events
for it.
The only thing I can think of is to start a thread before calling that
method and use FindWindow to get a handle to the dialog and add a page
that
way. But, this is not safe...
Any ideas?
-Joe