[HELP] C# WPF syntax

12/21/2010 08:34 zhalyn#1
Does anyone knows how to convert or what's the right syntax on this C# form application syntax?

Code:
 webBrowser1.Document.GetElementById("name").SetAttribute("value", textBox2.Text);
            webBrowser1.Document.GetElementById("message").SetAttribute("value", textBox1.Text);
            webBrowser1.Document.GetElementById("sumbit").InvokeMember("click");
[B]
i'm having error on "GetElementById" :S just confused.
12/22/2010 10:44 gorgone#2
are u sure to use using Sytem.xml in refernce ?
12/22/2010 14:30 zhalyn#3
Yes i'm sure!
i dont know what's the correct syntax for wpf from
Code:
 webBrowser1.Document.GetElementById("sumbit").InvokeMember("click")
12/22/2010 15:14 gorgone#4
an example

private void web1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (btnstartpress == true)
{
btnstartpress = false;
///Do clicks and inputs
web1.Document.GetElementById("sumbit").InvokeMembe r("Click");
}

}


this an external link about InvokeMEmber method

[Only registered and activated users can see links. Click Here To Register...]
on my pc works
12/22/2010 15:29 zhalyn#5
Quote:
Originally Posted by gorgone View Post
an example

private void web1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (btnstartpress == true)
{
btnstartpress = false;
///Do clicks and inputs
web1.Document.GetElementById("sumbit").InvokeMembe r("Click");
}

}


this an external link about InvokeMEmber method

[Only registered and activated users can see links. Click Here To Register...]
on my pc works
thanks but there's no "GetElementById" on wpf :S
12/22/2010 15:35 gorgone#6
i m so curios wht is the complete code and wht do u try to create ?

[Only registered and activated users can see links. Click Here To Register...]

from miscrosoft page :)
12/22/2010 15:39 zhalyn#7
I'm going to create an AutoRegister Form from wpf, yet i'm having problems on GetElementById.

I have made one from c# windows form and i made it successfully, but when i tried wpf (it should be on same syntax) darm..error. :S
12/22/2010 15:53 gorgone#8
gotcha :)) i missunderstood

[Only registered and activated users can see links. Click Here To Register...]

herre is a blog but if u see WPF is a control that integrate in asp.net page i dk if u can do a method inside WPF

WPF is created to make nice interfaces but the data inside u must made on c# or VB.net
12/23/2010 01:25 Syst3m_W1z4rd#9
add my msn I have used this 1million times for register spamming at private servers.
[Only registered and activated users can see links. Click Here To Register...]

:)
12/23/2010 06:47 _tao4229_#10
Do you mean XAML?
12/23/2010 07:22 zhalyn#11
Quote:
Originally Posted by gorgone View Post
gotcha :)) i missunderstood

[Only registered and activated users can see links. Click Here To Register...]

herre is a blog but if u see WPF is a control that integrate in asp.net page i dk if u can do a method inside WPF

WPF is created to make nice interfaces but the data inside u must made on c# or VB.net
thanks mate =]

Quote:
Originally Posted by Syst3m_W1z4rd View Post
add my msn I have used this 1million times for register spamming at private servers.
[Only registered and activated users can see links. Click Here To Register...]

:)
done.

Quote:
Originally Posted by _tao4229_ View Post
Do you mean XAML?
Yes! hmmm because WPF got nice interfaces =]
12/23/2010 10:35 gorgone#12
i know is so good i used to moddy the Alkemy proxy of Pro4never soon i ll pubblish, but u need to use like control not like main program in this way it s perfect :)
12/23/2010 11:03 zhalyn#13
Quote:
Originally Posted by gorgone View Post
i know is so good i used to moddy the Alkemy proxy of Pro4never soon i ll pubblish, but u need to use like control not like main program in this way it s perfect :)
gimme one copy of it :P
well, still i didn't get the right syntax :(( . Is it possible to combine wpf + windows form? O_O maybe i'm going to make a gui on WPF and code it using windows form
12/23/2010 14:54 gorgone#14
THE MOST IMPORTANT :) WPF and form VB.NET
[Only registered and activated users can see links. Click Here To Register...]


take a look of mix between asp.net and WPF
[Only registered and activated users can see links. Click Here To Register...]

and

[Only registered and activated users can see links. Click Here To Register...]

here are the most easy code that u can try to understood... wpf is nice but only control user or reader clients (an example is Twitter reader where data are from twitter xml source )
12/23/2010 22:44 _tao4229_#15
To do it with code you need to do some COM interop.

First, right-click References... -> Add new Reference to Microsoft.mshtml.
Then at the top
Code:
using mshtml;
Then it's pretty simple
Code:
HTMLDocument doc = webBrowser1.Document as HTMLDocument;
doc.all.item("name", 0).value = "heres the text";
doc.all.item("name of the element", 0).name_of_property_of_element = value;
You should be able to figure it out from there.
The value returned from doc.all.item is a dynamic (in 4.0 or later), so its properties are evaluated at runtime.