|
The page is comprised of 100 of these. Its a table. It is consistant as well. I'll look into string mashing if you think it will work.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
The hard part is finding the snippet of text that contains the values you're looking for.
RegEx does give you capture, so it could be better.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Expresso was amazing thanks man.
Christian Graus wrote: and it's certainly at www.expresso.com
It's actually not at that website. I had to Google for it.
Thanks.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi,
I have a form that there's many button on it. when I press each button a usercontrol appear.
there's a button on every usercontrol that use for closing the usercontrol.
Now,I do not know how I should close the usercontrol.
Do you know its code?????
thanks
|
|
|
|
|
A user control doesn't get closed, typically. It is more likely to get hidden, there's a Visible property you can set to false.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i need whern click or double click datagrid clouumnheader to reterive this column number to select or deseclect all sells in that column
thanks
md_refay
|
|
|
|
|
Hi, im using a singelton pattern to ensure that only one innstance of a winfrom can be opened at one time. The problem im having is when I close the form and want to open it again I get a "Cannot access a disposed object." How can I solve this? //thx
|
|
|
|
|
Hi,
if you want to see the same instance of your form class again, you should hide
it instead of closing it; so use Form.Hide() or Form.Visible=false
|
|
|
|
|
Thx, but I don't want to show the same instance of the form. I wan't to be able to create a new instance but only have one open at the same time.
|
|
|
|
|
I think you need to show some code, with form creation, Dispose, your current'
singleton stuff, etc.
And what should (not) cause the creation of a new form ?
|
|
|
|
|
So some samplecode then. when the user clicks the button the new form opens. He should not be able to open any more forms of this type unless he closes the form.
inside main form:
private void button1_Click(object sender, EventArgs e)
{
Form2 form = Form2.Instance();
form.Show();
}
inside form2:
private static Form2 instance;
public static Form2 Instance()
{
if (instance == null)
{
instance = new Form2();
}
return instance;
}
protected Form2()
{
}
|
|
|
|
|
Hi,
from your code it is apparant you implemented a singleton: initially there
is no instance of Form2; once you call Form2.Instance, there is exactly one.
If you call Form2.Instance again, you get the same instance.
This is not what you want for two reasons:
- if you close the "first" Form2, it renders all future Form2 instances useless
since you can close a Form only once
- it does not prevent you from calling Form.Show() twice.
What you need instead is no singleton logic; just create a Form2 when you need one; use it; get rid of it with Close(). And add some logic to prevent two Form2
instances to coexist; possible solutions are:
- disable the button while a Form2 is visible (best, user can see it!)
- or include a test in buttonClick, something like:
private Form2 lastForm2;
if (lastForm2==null || !lastForm2.Visible) {
lastForm2=new Form2();
lastForm2.Show();
}
|
|
|
|
|
The singleton pattern is not for using one object at a time, it's for reusing the same object.
If you don't want to reuse the form instance, you should not use the singleton pattern.
---
single minded; short sighted; long gone;
|
|
|
|
|
Form1 form1;
...
...
...
if(form1==null)
Form1 form1 = new Form1();
form1.Show();
And this's all it takes!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi Muammar, almost; you should drop one "Form1" !
|
|
|
|
|
thx, searched for a while and finally found why I didn't get it to work. Apparently I also need to check if the form has been disposed of.
private Form2 form2;
..
..
private void button1_Click(object sender, EventArgs e)
{
if (form2 == null || form2.IsDisposed)
{
form2 = new Form2();
form2.Show();
}
}
|
|
|
|
|
I believe checking form2.IsDisposed will create the functionality that you are looking for, but from reading this thread, it seems like you are inappropriately applying the Singleton pattern if you are needing to perform this check. You might want to read up on your Singleton & Other GoF patterns[^] The Singleton is not really intended for flow control between forms unless it is necessary that (for some reason) you require the EXACT SAME instance of the form throughout the entire application process.(Singletons are more appropriately applied(for example) to concurrent invocation of a state machine on a remote server....or for the Load Balancing example given at the link I included above) Unless you have a very good reason for doing this, then using a Singleton convolutes your logic, and should be avoided. If you are simply wanting to restrict your user to only maintaining one instance of the form at any one time, then you could simply disable the ability to create a separate instance as was demonstrated in previous replies
Allow user to instantiate a new form(You're probably wanting it to be Modal)
Restrict user from instantiating a second instance of the form
User invokes some business logic on the form
User closes form when finished
If the user wants to replicate the process(let's say...the form allows the user to perform some calculation based upon values selected in an UltraWebGrid), the process would be repeated.
Welcome my son...Welcome..to the Machine
|
|
|
|
|
Hi Guys !
I have a table User include field : ID,Username,password . I want make a page Search.aspx.cs for find a user in table User. Please help me code (I'm newbie learning C#). Help me!
Hello
|
|
|
|
|
haibec wrote: Please help me code
Your first task is not to code but to decide what you want. The description you've given so far is a little vague.
With the columns you have given so far there isn't much to search for. So, what do you want to search for? What do you want returned as part of your search? What are the scenarios in which your search will be used?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Hi.
I want when user type name in to textbox and when user submit result are :
ID Username password
If not find user then appear : Not found
Hello
|
|
|
|
|
haibec wrote: I want when user type name in to textbox and when user submit result are :
ID Username password
You shouldn't be storing the password in cleartext. It should be hashed, salted and basically unretrievable without a lot of brute force effort.
Your request for help contains too many elements in it for a forum post. You need to break down your problem into smaller parts and work on the smaller parts. If you have trouble on any of the smaller parts then we'll be able to help more easily. But asking for a page, even one as simple as this, is a little too much to be answered in a forum post.
You have the following elements:
* The need to accept a username in a text box
* A submit button that initiates the retrieval of the data
* The database look up
* The presentation of the result set returned from the database.
Work on the smaller parts and if you have difficulty on any of those show us what you have done and what you need help with.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
haibec wrote: (I'm newbie learning C#).
The fact that you're asking such a broad question, is evidence that you need to do some more study before taking on this task. If you can't break this down into the various parts that need to be solved, then you don't have a clear enough idea of the task to pursue it.
You really should move past calling yourself a 'newbie' before you start worrying about SQL and databases.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi
Small Part ? I don't know Small Part . Plese help me small Part and Post a problem in to Small Part
Hello
|
|
|
|
|
Why are you attempting this task ? Is it an assignment ? Are you being paid for it ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have a DataGridView with an unbound DataGridViewCheckBoxColumn in it. I'm able to manipulate everything as planned with one exception. I cannot seem to detect the appropriate value change when the user clicks the check box. The only event that comes close is CellEndEdit but the problem with it is that it only fires upon exit of the row...but it is the right value!
My test is:
if (e.ColumnIndex == 0)<br />
{<br />
MessageBox(grdVwReadyOrders[0, e.RowIndex].FormattedValue.ToString() <br />
+ " " + e.RowIndex.ToString() + " " + <br />
grdVwReadyOrders["OrderId", e.RowIndex].FormattedValue.ToString());<br />
}
I know I'm on the right row because I get the correct OrderId but regardless of which event I try, either 1) it doesn't fire upon checking or 2) it seems to only detect the value as it was when the user selected the row.
What I need to do is detect, at the time the user checks the box, the value after it is checked. If it is checked, I need to do processing on other rows in the view. Doing it only as they leave the row is not user friendly.
Thanks.
|
|
|
|