|
I want to know how to use MS Internet Explore in my own form and automaticly fill some HTML elements(such as Text box, dropdown list box or radio box).
Is there any control that wrap the MS Internet Explore and can access the content(html string) and the Html Element?
I use C#.
Thanks in advance!!
Alan Shen
|
|
|
|
|
CodeProject article[^]. In short, the web browser control is obtained by going in Toolbox \ Customize and then insert the Microsoft Web Browser control. The html itself is provided by mshtml.dll one of the Microsoft.NET primary interop assemblies (c:\program files\Microsoft.NET\Primary interop assemblies\mshtml.dll).
|
|
|
|
|
Thank you very much.
Do you know how to control the Html elements in a HTML FORM?
|
|
|
|
|
I could put a few urls, but quite honestly programming is all about enjoying time discovering things yourself.
|
|
|
|
|
Hi All,
I have a program that assigns one TabPage to equal another.
tabControl1.TabPages[1] = tabControl1.TabPages[0]; The problem is this: the TabPages have controls on them and when I assign the pages as above the controls are no longer displayed. The controls are still there (one of the controls is the webbroswer and the page it points to has a popup) but I can't see them and they don't appear to be enabled because I can't tab to them or anything. Does anyone know how to fix this problem? I've tried using the Refresh and Update methods of the TabPage.
I made a small program to demonstrate this. You can d/l it from http://members.shaw.ca/theory/Tabs.zip[^]
Any help or ideas are appreciated. Thanks.
- monrobot13
|
|
|
|
|
What are you complaining about? Assigning a tabpage to another tabpage is wrong, utterly wrong code.
|
|
|
|
|
Well then could you give an example of how it should be done? What I'm trying to do is have an insert function that I can use with a tabcontrol, to insert a page at a specific location.
|
|
|
|
|
As I have said in another post, there is no TabPage insertion helper. If I was asked to insert a tabpage, and TabControl derivation is not an option, I would use Add/Remove and clone the controls of all moving tabpages, to mimic Insertion.
Another option is to create a property sheet from the available WIN32 common controls (probably requires some comctl32 dll interop).
|
|
|
|
|
Do you know how to use the data in “textbox1.Text” (Form1) in a method on another form (Form2) all within the same namespace???
Kevin@upgrade1.com
|
|
|
|
|
You can do it a couple of ways depending on the relationship between Form1 and Form2. (e.g. Form1 creates Form2, Form2 creates Form1 or Form3 creates both).
For "Form1 creates Form2", you can pass an instance of Form1 to Form2
<br />
public Form2<br />
{<br />
public Form2(Form1 f)<br />
{<br />
}<br />
}<br />
...<br />
and then when Form1 is constructing Form2:
Form2 f = new Form2(this);
if "Form2 creates Form1", then you can just setup a public property in Form1 that gets the text from the label but you must keep an instance of Form1 as a field in Form2 so that your function can access it.
And the "Form3 creates both", then construct Form1 first, and then pass its instance to Form2.
--Adam Turner
|
|
|
|
|
kvnsdr wrote:
Do you know how to use the data in “textbox1.Text” (Form1) in a method on another form (Form2) all within the same namespace???
That's only a matter of public/protected/private member visibility.
|
|
|
|
|
Visual Studio 2003 has been released to manufacturing (RTM), and is available for MSDN subscribers to download. In addition, MSDN subscribers should receive a special shipment with VS 2003 in the next 7-10 days. Retail availability will be on April 24th.
See http://msdn.microsoft.com/vstudio/productinfo/vstudio03/default.asp for more information.
The .NET Framework V1.1 has also shipped, and can be downloaded for free at http://msdn.microsoft.com/netframework/productinfo/
|
|
|
|
|
And I'm downloading it right now!
Thanks, Eric!
117,8 Mb remaining...
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
Using C# in a Winform, I have a tab control with 2 tabs... I added methods for Enter and Leave events for tabpage1, but the events never fire when I switch tabs... breakpoints in these methods are never hit...
what am I forgetting or doing wrong...???
thanks.
|
|
|
|
|
The Enter and Leave events are for the TabPage not the TabControl. Once you switch Tabs if you click in the TabPage your event will fire. If you want to do something when the TabControl switches pages it's best to put the code in the SelectedIndexChanged event of the TabControl.
Hope that helps.
- monrobot13
|
|
|
|
|
Use toolbox to drop a tab control onto the form;
use the tab properties menu (Tab Pages - collection) to create one, or more tab pages and their labels;
Right click in the whichever is topmost in the control - you will note that right clicking the mouse within the tab control's page(s) will bring up the properties (or events) menu for the Tab pages - can't set event handlers here - what you have to do is to then left click on one of the tabs - you will see that the properties (or events) menu for the Tab Control is now displayed (see note 1 below). You can now create event handlers for "Enter" and "Selected Index Changed" to give you the notifications you will most likely want to use use in your code - the "Enter" event occurs when the tab control (regardless of whichever page is topmost) receives the focus; the "Selected Index Changed" event occurs when you click on a tab different than the one that is currently topmost.
Note 1: If you are displaying a Tab Page's properties (or events) menu (say for page 2) and you then left click on the page 2 tab to switch to the Tab Control menus you may find that it won't switch - have no fear, simply left click on a different tab. If you have a one tab control then click on the blank space immediately to the right of the tab.
A VERY simple example of a do-nothing "Selected Index Changed" event handler is:
private void tabControl1_SelectedIndexChanged(object sender, System.EventArgs e) {
int index=tabControl1.SelectedIndex; // Tab Control's tab index (0 relative)
int tabIndex=tabControl1.TabIndex; // KB tab-key order
string str = String.Format("tabControl2_SelectedIndexChanged selectedIndex={0} tabIndex={1}", index,tabIndex);
MessageBox.Show(str);
}
Hope this helps.
Spolia Opima
|
|
|
|
|
Are there any C# classes that support compressing/decompressing streams or even strings? One would think that there would be, given .NET's use on the Internet, and with XML, and SOAP especially, creating large objects with little effort at all.
|
|
|
|
|
Here is a compression library for C#: SharpZipLib[^].
Hope this helps,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
I've recently made a small, simple C# windows application that shows what week we currently are in, and some other things as well. The executeable file is apx 13 kBytes, and when I execute the program it takes, all according to Task Manager, 23MB!!! How and why?! If I show the application's GUI and minimizes the application, the memory consumption goes down to < 1MB. The application is in release mode.
// Niklas
|
|
|
|
|
Your 5kb, plus the frameworks VM memory. Fraknly I dont understand why everyone is complaining at less that $1 for 10Mb...
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Well, when my small traybar-based application that shows what week it is requires more memory than say one instance of Internet Exlorer or Opera 7, then I want to complain a little bit
|
|
|
|
|
One thing that you can do to reduce the memory footprint of your application at runtime is to remove any unused assembly references. For instance, all GUI applications seem to come complete with a using System.Xml statement along with a matching reference to the System.Xml.DLL assembly. That's fine if you are doing xml stuff, but if you aren't then the extra assembly is just taking up space... Try it, you'll see what I mean.
|
|
|
|
|
Hi. Let's say you saw a code like this:
Qwe.Asd.Zxc;
As far as I know this Zxc could be:
1. Name of a nested class
2. Property
3. Static member/function
What I'd like to ask is, can it be anything else?
|
|
|
|
|
it could also be a field.
|
|
|
|
|
kensai wrote:
Hi. Let's say you saw a code like this:
Qwe.Asd.Zxc;
As far as I know this Zxc could be:
1. Name of a nested class
2. Property
3. Static member/function
AFAIK:
This is not a valid C# syntax. The problem is on ';'
If you have the following:
Qwe.Asd.Zxc
Then it could be (1) and (2), a field, a type specification (for casting), or a const, and (3) and a non-static method in the context of a delegate instatiation.
If you have the following:
Qwe.Asd.Zxc(
Then it could only be (3).
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|