|
Frankww wrote: (some of the textboxes do not have name to refer to)
Then you need to change the original code, so they do.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Frankww wrote: My task to fill some textboxes programmatically from C# apps
Is this for the purpose of (a) displaying a pre-filled form to the user (b) submitting the form with some items pre-selected or (c) something else? If it's (b), you can use this[^] class to preset POST arguments and submit the form on your behalf.
/ravi
|
|
|
|
|
Is this for the purpose of (a) displaying a pre-filled form to the user (b) submitting the form with some items pre-selected or (c) something else? If it's (b), you can use this[^] class to preset POST arguments and submit the form on your behalf.
it is for
(a) displaying a pre-filled form to the user
User opens internet with MS Internet explorer gets about 25 textboxes and radio buttons
Then using old stile CICS (main frame) copy and paste text to textboxes and his/her notes.
I can read it directly from DB but how to put it into boxes?
Frank
frankwwttw@yahoo.com
|
|
|
|
|
Frankww wrote: old stile CICS
Yowza! This brings back memories of 14" wide fanfold!
But to answer your question, I expect you could get at the web browser control's Document (which is a HtmlDocument [^], find the appropriate Form , find the appropriate Control and manipulate it.
(Caveat: This is off the top of my head and hasn't been verified.)
/ravi
|
|
|
|
|
which is a HtmlDocument[^], find the appropriate Form, find the appropriate Control and manipulate it.
I am working on it for more then a week.
And all time with
“web browser control's Document”
Nothing is done!
Frank
frankwwttw@yahoo.com
|
|
|
|
|
Frankww wrote: I am working on it for more then a week. And all time with “web browser control's Document”. Nothing is done!
We could try to help if were able to describe a specific problem you're having.
/ravi
|
|
|
|
|
We could try to help if were able to describe a specific problem you're having.
How to say in c# app:
textboxName.text=MyText // if textboxName is in the browser (even if browser is in the form)
i have from browser
input name=hl type=hidden value=en>
|
|
|
|
|
Frankww wrote: How to say in c# app:
textboxName.text=MyText // if textboxName is in the browser (even if browser is in the form)
i have from browser
input name=hl type=hidden value=en>
Here's a code snippet (untested, and with no error checking) that will hopefully point you in the right direction.
HtmlDocument doc = webBrowserCtrl.Document;
HtmlElement ele = doc.GetElementById ("q");
ele.InnerText = "MyText";
/ravi
|
|
|
|
|
Hi.
I'd developed a C# windows application and now I want to convert it to VB.Net project.
Is there any application to do it?
yah, there is some online utilities that can convert a C# code to VB.Net, But I need a software that give a C# application, and returns a VB.Net application.
Best wishes
|
|
|
|
|
SharpDevelop can do this I think.
Tried Google[^]?
I have no idea what I just said. But my intentions were sincere.
Poore Design
|
|
|
|
|
There are heaps of commercial apps that do a good job of this. None are perfect, but once they are done, you can usually clean your code and get it running pretty quickly.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
We produce Instant VB, which will convert a C# app all at once (or an ASP.NET 2 web site, or folders, snippets, etc.).
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter, VB to C++ converter
Instant Python: C# to Python converter, VB to Python converter
|
|
|
|
|
hello again
well can any of u plz tell me how can we dynamically find and let the user connect with any sql server running on a pc, I saw n article here on this topic along time agobut I cant find it. I'm working in windows application C#2.0
thanks in advance
|
|
|
|
|
|
|
Have you found that to be reliable? I've tried a couple of different methods and sometimes they're returned and sometimes they're not. I have a mix of 2000 and 2005 servers.
|
|
|
|
|
I havn't had a problem but it's only been tested on a network where there were 3 2005 and 2 2000 servers and seemed to return them all (well most of the time but the one which didn't show up was mine because my laptop wasn't in work's domain at the time. Since then it seems to be working fine).
I have no idea what I just said. But my intentions were sincere.
Poore Design
|
|
|
|
|
hi every one,
I have two questions for u ppl here
well first one is that when u make a window application u get a form that actually comesup first when u run the application, if laterat some stage u wanna chg that then how do u do it??
2. I made a form and dropped a bindingNavigator objecton it, by default its color is like grey and has a shade on it... later I chaged that color and it was all plain uknwo. So now I wanna get that old color back or get that shade effect on again... so how can I do that??
thanks in advance
Rocky
|
|
|
|
|
Hi,
1)
there are basically two ways to have a switch of main form:
- inside static main() you have something like Application.Run(new Form1());
which creates your Form1, shows it, and runs a message loop on it, until you somehow
close that Form1. So if you need a Form2 after closing Form1, you could add
Application.Run(new Form2());
- an alternative is to keep static main as is, change Form1 to be invisible,
and let it create and show one or more forms at will, as in:
Form2 f2=new Form2();
f2.ShowDialog(); // = show and wait until closed
Form3 f3=new Form3();
f3.ShowDialog();
return;
of course, you can add any logic you need; or you could use Show() to see
several forms at once.
2)
Dont know, seems like a bug: initially blueish gradient, when changed, then
set back to BackColor=Control, it remain Control-gray (and the code is back to its
original !?).
Luc Pattyn
|
|
|
|
|
hmm that one looks helpful but u know I tried to change the color of the BindingNavigator back to control but its not giving the gradient effect on it anymore and it doesnt look good that way... well may be its bug but I hope its not and now I'm trying to do something abt that... hope something good comes up
thanks for ur help
Rocky
|
|
|
|
|
I have an application that will be running in the background and I want it to run every 5 minutes to check a file execute it and then wait another 5 minutes to do this. I tried doing this, but I get the following error.
Unhandled Exception: System.Threading.THreadStateException: Thread is running or terminated; it ca not restart.<br />
<br />
Thread t1 = new Thread( new ThreadStart(myMethod));<br />
bool start = true;<br />
int stop = 0;<br />
while(start)<br />
{ <br />
t1.Start(); <br />
Thread.sleep(5000); <br />
if(stop==1000)<br />
{<br />
start = false;<br />
} <br />
stop++;<br />
} <br />
<br />
|
|
|
|
|
You don't want the application controlling the thread sleeping, you want the thread itself sleeping and determining when to exit.
void MakeThread()
{
Thread t1 = new Thread( new ThreadStart(MyMethod));
t1.IsBackground=true;
t1.Start();
}
void MyMethod()
{
while (++stop != 1000)
{
Thread.Sleep(5000);
}
}
Note setting the IsBackground to true, so if your application exits, the thread will terminate too. Otherwise you can have threads running even when your application has quit.
However, this isn't really what threads are intended for. Sounds more like what you want is a timer that fires every 5 seconds.
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
You are restarting the thread every five seconds, not every five minutes. If the thread ever takes more than five seconds to complete, you will be trying to restart a thread that is still running.
---
Year happy = new Year(2007);
|
|
|
|
|
I concur with the previous remarks, but want to add you constructed a loop that
really deserved a for statement:
for (int i=0; i<1000; i++) {
// do here what has to be done periodically
// ...
// now wait
Thread.Sleep(5000);
}
This approach repeats an operation with (an attempt to) a fixed time lapse in between;
if you want (an attempt to) predictable starting times, you definitely need to use a timer.
Luc Pattyn
|
|
|
|