|
Hi,
I didn't abort the thread. That was just 'speaking'.
I know, i check its state on different places periodically.
The code has grown too big to post it. I've reduced it now.
I didn't see your post yesterday!
|
|
|
|
|
Please i would appreciate any help i can get on getting my project started,cannot integrate the different classes on my server.
|
|
|
|
|
You might need to read through some chapters on .Net remoting in a C# book. They will provide some samples that will start you up.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
I would like to be able to click a button (which is always located in the same area) of a external/downloaded html page?
Any help would be appreciated.
Language C# visual Studio.
|
|
|
|
|
Of specific HTML or all possible pages, including www.codeproject.com, wwww.google.com and others?
Or are you refering to Button submit within Form html tag?
|
|
|
|
|
Of all or any page.
For example... I download or view a page (lets say http://www.codeproject.com/Forums/1649/Csharp.aspx) and via code I click the "Search" button.
|
|
|
|
|
<form method="get" action="/info/search.aspx" name="Search" style="margin:0;">
<b>Search </b>
<input class="small-text" name="artkw" style="width:200px;" />
<select class="small-text offblack" style="font-weight:bold;" name="sbo">
<option value="kw">Articles / Quick Answers</option>
<option value="fm" selected="true">Messages</option>
<option value="s">Jobs</option>
<option value="ctlk">Product Catalog</option>
</select>
<input type="submit" class="button small-text" value=" Go! " />
</form>
As you can see, this is HTML for a submit. aka. Search. This has a GET method. it uses ? inside url. you can easly get what to send and then send it to url. in this case: /info/search.aspx
|
|
|
|
|
Unfortunately this is not what I'm looking for.
What I need is via c# I download a page onto my drive (let's. say http://www.writtenonthecity.com/display.php?image=2301&loc=8&type= ).
Now once the page is loaded I would do a search (in visual studio) in the page for the "Submit" button and via C# code i want to click it as if I was actually sitting there and using my mouse to click the button but via code.
I don't want to generate any buttons or edit box's or change the page's html, I just want to know how to click a button via code as if I was actually sitting there and clicking it with my mouse with a unknown downloaded page. Not a aspx page that I've created with a onclick event.
|
|
|
|
|
There is no simple code to just to call click event, because it doesn't exsist. When HTML parse, uses HTML information to handle that button. Here is examaple:
This is snipset of HTML
<form method="get" action="/info/search.aspx" name="Search" style="margin:0;">
<b>Search </b>
<input class="small-text" name="artkw" style="width:200px;" />
<select class="small-text offblack" style="font-weight:bold;" name="sbo">
<option value="kw">Articles / Quick Answers</option>
<option value="fm" selected="true">Messages</option>
<option value="s">Jobs</option>
<option value="ctlk">Product Catalog</option>
</select>
<input type="submit" class="button small-text" value=" Go! " />
</form>
Important lines:
1st. Line: Form tag has 2 atributes you need to take into an accound. that is Method and Action.
3rd. Line: Input tag is textbox, that has a name as 'artkw'
4th. Line: Is a combo box with a name 'sbo'. All items inside are used with option tag and inportant atribute is a value.
10th. It is an Input with atribute type="submit", witch is a button with a text " GO! " as specified in value atribute.
With this info you can easly request new page. You do not need to type any info or even show the form.
this is how it is processed
<form method="get" action="/info/search.aspx" name="Search" style="margin:0;">
<b>Search </b>
<input class="small-text" name="artkw" style="width:200px;" />
<select class="small-text offblack" style="font-weight:bold;" name="sbo">
<option value="kw">Articles / Quick Answers</option>
<option value="fm" selected="true">Messages</option>
<option value="s">Jobs</option>
<option value="ctlk">Product Catalog</option>
</select>
<input type="submit" class="button small-text" value=" Go! " />
</form>
The final url is "www.codeproject.com/info/search.aspx?artkw=text+to+search&?sbo=kw". And then it the server prepares next page based on variables sent.
ps: If you download page to your computer, next page is still depended on server, unless you are attempting to create a local server, where the requested page should be generated
|
|
|
|
|
Afternoon. Can anyone remind me of the custom attribute you can apply to a type which prevents Visual Studio from attempting to open the file in a designer rather than code view? I can *never* remember it, and Google's not helping. Regards,
Rob Philpott.
|
|
|
|
|
Hi Rob,
I've hidden it in here[^].
I have a similar question: is there anything one can do to prevent custom controls that are part of the solution, to show up in the Toolbox?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
Thanks Luc. I have a feeling it was you who informed me of that attribute's presence in the first place!
You want to prevent things being automatically added to the toolbox? Most people like it the other way round. Only suggestion is try using Visual Studio 2003! Actually, I doubt it can be done.Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: You want to prevent...
Yes, I have a lot of Panel derivattives that I add programmatically, never through Designer, and they clog the Toolbox.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
@Luc
I was facing a similar problem. Thus, I chose to disable loading of such controls in toolbar from AutoToolboxPopulate.
Then I added a toolbar button on menubar for "Refresh Project Toolbox Items".
Now, toolbar is not populated automatically. If I need any components in the toolbox, I simply select that project and click on the toolbar button. All compiled components are added to toolbar.
|
|
|
|
|
I so rarely want the Designer that I simply set the code editor as the default for forms and controls. I have to right-click to open the Designer. 
|
|
|
|
|
I have a custom class TableProperties which has properties for CSS table styles. I have a CustomColor property that has a UITypeEditor to display the ColorDialog control and then convert the color value to a hex string (e.g., ffffff). When I iterate through the PropertyInfo collection the GetValue method returns the property type rather than the value.
foreach (PropertyInfo pi in tableProperties.GetType().GetProperties())
{
name = pi.Name;
ListViewItem lvi = listView1.Items.Add(name);
theType = pi.PropertyType.ToString();
lvi.SubItems.Add(theType);
value = pi.GetValue(tableProperties, null).ToString();
lvi.SubItems.Add(value);
}
The PropertyGrid works fine with the custom properties.
Thanks,
Mark
|
|
|
|
|
There are a few ways to fix this. The poblem lies here:
pi.GetValue(tableProperties, null).ToString();
The ToString() method, unless overloaded will return the type. If you can modify the TblPropTest.CustomColor code, you should overload this method. The code below adds an extension method to the Color class to output the Hex RGB value:
public static class ColorExtensions
{
static string GetHex(byte value)
{
return value.ToString("X");
}
public static string ToRGBHexString(this System.Drawing.Color color)
{
return GetHex(color.R) + GetHex(color.G) + GetHex(color.B);
}
}
This should be of help. If you cannot use this, please post the code for the TblPropTest.CustomColor type, as this is the root of the problem.Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
|
|
|
|
|
Yes I have overloaded the ToString method. Below are the methods in my CustomColor class. My ToString method was incorrect!
public new string ToString()
{
return string.Format("{0:X2}{1:X2}{2:X2}", _Red, _Green, _Blue);
}
public override string ToString()
{
return string.Format("{0:X2}{1:X2}{2:X2}", _Red, _Green, _Blue);
}
Thanks for the help!
Markmodified on Monday, March 1, 2010 11:53 AM
|
|
|
|
|
Hello together,
i actually have big problems to describe the project I want to realize.
First of all:
I do not ask for any finished solutions, but just for some advice.
We have a resource management tool for managing the ressources of our applications (a ton of win- and web-applications)
in a database.
It works very well for years now, but we often have the (I think common) problem, that our translators translate
the resources without the application context, which leads to the fact, that often a resource does not fit into
the button/label in the application.
Of course, we trim the resources to fit into the according control, but that is not a satisfying solution.
You could also say, that our translators should open the applications and have a look, where each resource will be
displayed, but due to the fact, that we have many applications, none of them is really doing it
(because they would have to install every application).
That is why I thought about a form, where they could enter the translations "into" the form of the application.
Each developer could prepare "his" form and would provide a library, that would be included into the resource
management tool.
There, the translators have the ability to open the form, and enter the translation "right into the controls".
Once again, this is no request like 'please code that for me', I am looking just for suggestions (maybe a tool like this
exists? I did not found sth. on codeproject. Or maybe there is some code, to load forms from other dll's).
kind regards
|
|
|
|
|
Hi,
I'm quite new to the whole .NET/C# thingy (reading some books now) and I was thinking of something useful to build @ the office.
This is - basically - what I've got in mind:
We have a server on which we build our application. On the server, there should be an application running which accepts commands. The commands can be sent from an application every workstation has to run. If someone sends a command (like: start new build) this single person has to be notified if it was possible to start the command (perhaps there was a build already running?). If the command is executed, the app on the server has to broadcast a message to everybody who has the app running so they know a new build was started.
At the moment all programmers log in to the server (via remote desktop) and double clicks an icon on the desktop. We - obviously - want to limit the access so programmers don't need to log in on the server.
I am thinking of concepts like TCP/IP and/or WCF. Who can help me on my way? Where to start?
Thanks in advance for any information given!
Regards,
Ted- Life would be so much easier if I had the source code!
- If C# had true garbage collection, most applications would delete themselves upon execution
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:07am.
|
|
|
|
|
I got that far :S I need help getting started up with the whole communication stuff in WCF.- Life would be so much easier if I had the source code!
- If C# had true garbage collection, most applications would delete themselves upon execution
|
|
|
|
|
Hi,
I have a need to screen scrape a legacy windows application. Can anyone give me some pointers as to how this can be done with C# .Net?
All guidance offered will be warmly appreciated.Regards,
Dave
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:07am.
|
|
|
|
|
That's scraping of web pages rather than a Windows gui. Regards,
Dave
|
|
|
|