|
I only know the benefit that you can make a universal use of classes.
You can change in runtime your DB for example.
Or if you change your Application into a Web Application, you only change the Visual Layer and the rest of all layers aren't changed
Thats all that i know;)
|
|
|
|
|
how much a dal can be useful for intranet based web applications. i mean advantages/disadvantages with respect to connection pooling, and data access.
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
Hi..
In an MDI application if i have a parent form & 2 child forms. In that application how i can get values of parent form controls(e.g. textbox text or a boolean variable) form child form & from child form how i can get values of parent form controls (e.g. textbox text or a boolean variable).
Thanks,
Vinay
|
|
|
|
|
You can use this fragment:
YourForm frm;
foreach( Form mdi in this.MdiChildren) {
frm = mdi as YourForm;
if( frm == null )
continue;//this is other form
//frm.YourProperty;
//frm.YourPublicFunction();
return;
}
|
|
|
|
|
Hi...
I am trying what u suggested here & I think with this i can get Child form control values from Parent form but how i will get Parent form control values from child forms & values of controls in two child forms(say 2 child forms . Actually i have a password form as a child of a parent form & in parent i have a MenuStrip & i want to disable that Menustrip until user enters correct password in Password child form.
Can u suggest anything for my application...?
Thanks,
Vinay
|
|
|
|
|
Your LoginForm can use delegate to LoginMethod in MDIContainer Form. Until user not correct enter name and pwd, Menus will be not enabled.
If you want, i create project 4 you.
Sry 4 my English.
Tom
|
|
|
|
|
Thanks for reply...
if its Possible for you then you can create a project or tell me the logic i'll try...
in my application after displaying the parent form i should display password form(Child form) on parent form with disabled MenuStrip.
i just want to disable MenuStrip if i havnt not logged in my application(from my child PasswordForm)...
Regards,
Vinay
|
|
|
|
|
there are two ways to achieve your aim.
1.Create an public static bool LoginOk; in you parent form
and set its Value true or false as per your login result.and check this value just after you child window get close.
2.set DialogResult for your child window as per your login result.and check this value just after you child window get close.
e.g;
child.ShowDialog();<br />
if(child.DialogResult==DialogResult.OK)<br />
{<br />
} <br />
else<br />
{<br />
<br />
}
sameer
|
|
|
|
|
i declared a varible(LoginOk) as you told in Parent form but can u tell me how i will change that value from child form.
Thanks for your reply,
Vinay
|
|
|
|
|
one can access static variable with class name e.g
public class Parent
{
public staic bool LoginOK;
}
//access it like
Parent.LoginOK =true;
|
|
|
|
|
hi,
you can get the values by assigning a get function as public for every textbox or label in each of the parent and child form. and send a reference for each form in the constructor. for example u can send a reference of the parent form in the constructor of the child form and using the get functions u can get the values respectivaly.
hope it helps
Jamil Abou Khalil
|
|
|
|
|
Thanks,
I am new in C#...Can you told me little bit in detail...
How to send ref of parent form in constructor of child form ...?
regards,
Vinay
|
|
|
|
|
I am going to Start the work on the Data Mining for my graduation's final year project.I want to use the Visual C# Tool for this purpose.So Please any one can help me to find some exact tutorial of data mining.Is any one have some basic Code of data mining in C# that gives some basic idea of Data Mining in C#.
Salman Khlaid
Salman Khalid
|
|
|
|
|
I want to set location of textboxes and labels at runtime. i get the coordinates from sql tables but when the location changes of 50 textboxes and labels the entire screen flickers and looks very bad. suggest me a way to change location without flickers.
thanks.
|
|
|
|
|
Try to use : SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
|
|
|
|
you can use the form_onload event of the form and set there everything u need for the textboxes and for the labels. this event fires only once when the form is first loaded for the first time.
hope it helps
jamil abou khalil
|
|
|
|
|
Maybe this?
theTopLevelForm.SuspendLayout();
theTopLevelForm.ResumeLayout();
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
hi,
thank you,
but i dint get the solution,
actual problem:
iam working on a web portal,
in this project, i have to send the data from one page to another page in a secure way.
so iam encrypting the data and iam sending that through the url.
ex:
iam creating a Encryptdata class in that class iam taking two methods encrypt_Data(string dataToEncrypt) and decrypt_Data(string dataToDecrypt)
"http://mywebsite/webform2.aspx?eD=" + Encryptdata.encrypt_Data("17");
next in webform2.aspx file
string data=Encryptdata.decrypt_Data(Request.QueryString("eD"));
in this situation iam geting error,some data it is not decrypting like 17,34,icici,...etc
and for some data it is working fine
it is giving INVALID LENGTH FOR BASE-64 CHAR ERROR
in my project i have to encrypt the data using a key
iam using Rijndael alg
plz send the soulution for my prob
M.S.N.Murthy
|
|
|
|
|
I am a new student in C# using .NET framework. I am trrying to solve the following problem:
Calculate the value of pi from an infinite series, pi = 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11...
Print a table that shows the value of pi approximated by computing one term of this series, by two terms, by three terms, etc. How many terms of this series do you have to use before you first get 3.14? 3.141? 3.145? 3.1459?
I understand there is a pattern with the numerator (increment by 2), and you have to add or subtract the values (i.e., odd value, add; even value, subtract), and you increment the number of terms to find pi. I also know that you need a if...else statement to get the loop going. Other than that, I am lost...PLEASE HELP!!! Thanks...
|
|
|
|
|
> How many terms of this series do you have to use before you first get 3.14? 3.141? 3.145? 3.1459?
That's easy. The answer is no number of terms will give you these exact values!
You need to tell the teacher that one of the most important parts of numerical analysis is specifying your desired precision. You should really be asking something like "how many terms does it take to get a value between 3.19999 and 3.14001?" or something along those lines. Otherwise this question is intractable.
Other than that, I'm sorry, but if you can't write this code, you need to change your area of study.
Please, search the internet for "How to Ask Questions the Smart Way"[^]
You should write the code yourself and post what you've written with any specific questions or problems you have.
|
|
|
|
|
I have a little asynch. socket listener that notifies me when data is read. inside of the OnRead callback event it seems that my notifications were overlaping (future notifications triggered before past notifications 1.2.3.4.5. becomes 1.2.5.3.4.). The code goes like this:
private void OnReadComplete( IAsyncResult ar )
{
... copy the m_byBuffer data into byOut ...
... do some work ...
lock(m_ReadLockObject) <-- should block the next read attempt.
{
if (m_netStream.CanRead && (m_Socket.Connected || m_netStream.DataAvailable))
m_netStream.BeginRead(m_byBuffer, 0, m_byBuffer.Length, m_callbackRead, null);
if (bytesRead > 0)
ExecOnDataRead(this, new CClientInfoEventArgs(m_EndPoint, byOut));
}
...
}
The data keeps comming in all jumbled up. Now I can patch this by putting in a sufficiently large delay, like a trace before and after I call ExecOnDataRead to check the current thread ID, OR I can re-arrange the ExecOnDataRead before the BeginRead. The thing is that I know ExecOnDataRead can be quite expensive and I do perform some work before I pass the data on, so I want the next BeginRead to be running while I'm doing that.
Note that a simple trace or debug seems to straighten out the data (obviously time sensitive) so I can't observe what is happening except through the end results. Even putting in a second lock inside ExecOnDataRead, or a static mutex.WaitOne() does not seem to straighten out the data, but as soon as I put in a Trace to print out the thread ID's that are running the ExecOnDataRead to see if they are overlapping, everything straightens out!! Ahrrgg! It's almost like the lock is not locking.
Thanks in advance
Assert(this);
|
|
|
|
|
hi all can any body help me
I'm in my way to start in my graduation project which is a GIS tracking system using a C# programming language to operate with the GIS can any body help me in finding tutorials in this topic
thank you very much
|
|
|
|
|
I have a toolstrip defined with a single toolstriplabel defined. When a user initiates an action, I would like to display the status of what I'm doing while they wait. Seems obvious. The problem is, the information is never displayed. To be more speicific, have a form with one button and a tool strip. Click the button. The click routine then goes a reads a bunch of files. As each file is read, I update the toolstriplabel.text with the file name. However, in my application, the text does not show until the very last file.
What do I need to do?
|
|
|
|
|
You have to call DoEvents to give the label the opportunity to recieve the change message.
---
b { font-weight: normal; }
|
|
|
|
|
I guess I'm feeling a little slow on this one. What do you mean "DoEvents?" Some code is below so that you know exactly what I'm doing.
Thanks so much.
I've got the status strip defined as follows:
this.ssHistoryStatusStrip = new System.Windows.Forms.StatusStrip();
this.sslHistory = new System.Windows.Forms.ToolStripStatusLabel();
// ssHistoryStatusStrip
//
this.ssHistoryStatusStrip.Items.AddRange(new
System.Windows.Forms.ToolStripItem[] {this.sslHistory});
this.ssHistoryStatusStrip.RenderMode =
System.Windows.Forms.ToolStripRenderMode.ManagerRenderMode;
this.ssHistoryStatusStrip.Size = new System.Drawing.Size(691, 22);
this.ssHistoryStatusStrip.TabIndex = 5;
this.ssHistoryStatusStrip.Text = "statusStrip1";
//
I set the text through a function call like this:
private void SetHistoryStatus(string newHistoryStatus)
{
sslHistory.Text = newHistoryStatus;
}
|
|
|
|