Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 8th, 2008, 11:49 AM
Authorized User
 
Join Date: Feb 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Window.status Bar

Hi All,

I am working on the project using c# 2.0. I need to get the contents of window.status bar and save into string variable. Please help if you can.

Thanks in advance.

A.Asif
__________________
A.Asif
 
Old January 8th, 2008, 11:56 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Which window? If you have added a status bar control to a form then its simply its Text property.

/- Sam Judson : Wrox Technical Editor -/
 
Old January 8th, 2008, 12:00 PM
Authorized User
 
Join Date: Feb 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

the data is copied to the window.status object of the clipboard.
Please help.

Thanks

A.Asif
 
Old January 8th, 2008, 12:07 PM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

I'm sorry, I still have no idea what you are talking about.

To get text out of the clipboard you just use: Clipboard.GetText().

/- Sam Judson : Wrox Technical Editor -/
 
Old January 8th, 2008, 12:13 PM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Hi

Following your private email which mentions javascript I now realise that you have a web browser control, containing some javascript that sets the window.status property. You want to get this property out of the web browser control.

A quick search on google for "javascript webbrowser control variable c#" reveals that you want to be looking at the HtmlDocument.InvokeMethod method, e.g.:

object result = webBrowser1.Document.InvokeMethod("eval", new object[] { "window.status" } );

result should be a string.

/- Sam Judson : Wrox Technical Editor -/
 
Old January 8th, 2008, 12:39 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Using the WebBrowser control in COM I have also used document.parentWindow.status, where document is a reference to the current HTML document. Not sure if this works via .NET.

--

Joe (Microsoft MVP - XML)
 
Old January 9th, 2008, 05:18 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Yep, turns out there is a WebBrowser.Document.Window.StatusBarText property - who knew :)

/- Sam Judson : Wrox Technical Editor -/





Similar Threads
Thread Thread Starter Forum Replies Last Post
remove the status bar from popup window crmpicco Javascript How-To 1 December 4th, 2007 06:15 PM
Status Bar ironchef Java GUI 0 October 26th, 2006 09:19 PM
how to display message to window.status bar tllcll BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 0 November 22nd, 2005 02:04 AM
hide the status bar of window at runtime yeetesh Pro VB 6 5 January 10th, 2005 02:38 PM
Status Bar soccers_guy10 Pro VB.NET 2002/2003 3 August 12th, 2003 11:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.