473,574 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1146
Programmaticall y?

TabPage newPage = new TabPage("New Page");
tabControl1.Tab Pages.Add(newPa ge);

-- 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*******@yaho o.nospammin.com > wrote in message
news:22******** *************** ***********@mic rosoft.com...
Programmaticall y?

TabPage newPage = new TabPage("New Page");
tabControl1.Tab Pages.Add(newPa ge);

-- 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*******@yaho o.nospammin.com > wrote in message
news:22******** *************** ***********@mic rosoft.com...
Programmaticall y?

TabPage newPage = new TabPage("New Page");
tabControl1.Tab Pages.Add(newPa ge);

-- 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*******@noem ail.noemail>
References: <#$************ *@TK2MSFTNGP10. phx.gbl> <22************ *************** *******@microso ft.com>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.publi c.dotnet.framew ork.windowsform s,microsoft.pub lic.dotnet.lang u
ages.csharpNNTP-Posting-Host: 69.37.58.70.ads l.snet.net 69.37.58.70
Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP09.phx. gbl
Xref: TK2MSFTNGXA02.p hx.gbl microsoft.publi c.dotnet.langua ges.csharp:3813 05
microsoft.publi c.dotnet.framew ork.windowsform s:93456X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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*******@yaho o.nospammin.com > wrote in message
news:22******* *************** ************@mi crosoft.com...
Programmaticall y?

TabPage newPage = new TabPage("New Page");
tabControl1.Tab Pages.Add(newPa ge);

-- 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
2684
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 binary safe. I am not quite ready to upgrade to 4.3.3. Thanks. -- http://www.dbForumz.com/ This article was posted by author's request Articles...
18
7073
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
2566
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 only option? I would expect that it is fast and safe because it (the xdr spec) has been around for so long. Or are there better options (perhaps...
2
5812
by: qazmlp | last post by:
Say, ptr=0 / ptr=NULL. delete ptr; //is safe // Is delete ptr; // also safe ?
2
2313
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. Its as if the project is now disconnected from source safe. if I run source safe the start my VB app, I never get the source safe login??? -Lou
2
1525
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. do i have to install the source safe client on my machine? i thought visual studio .net woudl at the very least have the client installed by default....
1
3587
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 some files and work on it. Let say, I want add new page to web project named websiteOrder.sln, i will open websiteOrder.sln in my local computer,...
1
4606
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 = new TcpClient(server_host_name, server_port);
4
1914
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
7762
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 possible this function evolves from thread-unsafe to thread-safe in recent years? How could i find out? I am using the C library coming with GNU linux...
0
7808
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8063
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. ...
0
8243
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7822
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8101
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...
0
6456
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...
1
2249
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
1
1347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1062
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...

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.