473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Any safe way to do this?

Joe
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
Jan 25 '06 #1
4 1135
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

Jan 26 '06 #2
Joe
I don't have direct access to the tabcontrol. I only have a single method to
call this dialog. The dialog is coming from a third party library.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:22**********************************@microsof t.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

Jan 26 '06 #3
Ah, you didn't quite make that part clear in your post. Suggest reading the
vendor's documentation carefully.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Joe" wrote:
I don't have direct access to the tabcontrol. I only have a single method to
call this dialog. The dialog is coming from a third party library.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:22**********************************@microsof t.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


Jan 26 '06 #4
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



Jan 26 '06 #5

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

Similar topics

4
by: steve | last post by:
I understand that fget is not binary-safe before php version 4.3.3. To me that means fget cannot read binary data (or clips it to 7 bits). Is there another php function equiv. to fget that is...
18
by: srijit | last post by:
Hello, I would like to know the definition of type safe and whether Python can be considered as a type safe language. Similarly are Java, C# or C++ type safe? Regards, Srijit
42
by: Irmen de Jong | last post by:
Pickle and marshal are not safe. They can do harmful things if fed maliciously constructed data. That is a pity, because marshal is fast. I need a fast and safe (secure) marshaler. Is xdrlib the...
2
by: qazmlp | last post by:
Say, ptr=0 / ptr=NULL. delete ptr; //is safe // Is delete ptr; // also safe ?
2
by: Lou | last post by:
Ok, I added my prject to source safe. It worked good for a week, then, one time I couldn't get to source safe and VB propmted to work offline, no I can't get any of my files back into source safe....
2
by: Darren Clark | last post by:
HOw do i get source safe working with .net? I have source safe the server setup on our server... however on my machine when i go File > Source Control > All options are always greyed out. ...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
1
by: jecheney | last post by:
Hi, Im currently using the following code for reading/writing to a network socket. private StreamReader clientStreamReader; private StreamWriter clientStreamWriter; .... TcpClient tcpClient...
4
by: George2 | last post by:
Hello everyone, Here is Bjarne's exception safe sample, http://www.research.att.com/~bs/3rd_safe.pdf template <class Tclass Safe {
44
by: climber.cui | last post by:
Hi all, Does anyone have experience on the thread-safty issue with malloc()? Some people said this function provided in stdlib.h is not thread- safe, but someone said it is thread safe. Is it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...

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.