|
ok you lost me now
let me get this straight -
BaseForm has 2 buttons called 'Form1' and 'Form2' only
Form1 has 1 button called 'disable'
Form2 has 1 button called 'disable'
Now...
when you click 'Form1' you want to hide baseForm and show Form1, right?
then when you click 'Disable' on Form1 you want to hide Form1 and then re-show BaseForm, right?
Same for Form2, right?
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Im sorry i made u confused
You are almost clear with my probs just a lil misunderstood.
Im gonna clear it now.
Form1 has 1 button called 'btnForm1' and text 'Form1'
Form2 has 1 button called 'btnForm2' and text 'Form2'
now when I click 'Form1' I want to hide base form and show Form1
and
Disable the btnForm1 button. Means u cant click btnForm1.
U just can click Form2 button when form1 shows.
I think now I made u clear.
Thanks buddy
|
|
|
|
|
I haven't dealt with an inherited form but I think this achieves what you want - adapt to suit.
using System;
using System.Windows.Forms;
public partial class BaseForm : Form
{
public BaseForm()
{
InitializeComponent();
}
public BaseForm(bool showForm1Button)
: this()
{
btnForm1.Visible = showForm1Button;
}
private void btnForm1_Click(object sender, EventArgs e)
{
BaseForm newBaseForm = new BaseForm(false);
newBaseForm.FormClosing += new FormClosingEventHandler(newBaseForm_FormClosing);
newBaseForm.Show();
Hide();
}
void newBaseForm_FormClosing(object sender, FormClosingEventArgs e)
{
Close();
}
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi SoulIdentities,
I would use an Event Handler, that contains your own bespoke EventArgs. You can contain within that EventArgs a delegate that points to a function. Your base class will contain the function and you will register the event handler of your childs form to your base form.
When you close the child form, you will call the eventhandler, which will in turn post up to the base form which will react with a close of itself.
Cheers,
Paul
|
|
|
|
|
Sorry Paul
I am not clear.
Can you make some example.
I will appritiate it.
Thanks
|
|
|
|
|
Dear All,
I have a network application with UDP implementation.
In the server it has a specific IP and port number configured.
It will listen for the messages from the client to server and acknowledges the same.
Same way some times the server will initiate the communication and will try to send the message from the server to client.
For the messages from client to server and ACK it is working fine, even though the client or the server is restarted.
For the messages form the server to client, it tries and if the client is not reachable, it throws the error and then in the catch also I have made the server to continue to listen by calling BeginReceiveFrom, but it still throws the error.
The code used is:
private void OnReceive(IAsyncResult ar)
{
IPEndPoint ipeSender = new IPEndPoint(IPAddress.Any, 0);
EndPoint epSender = (EndPoint)ipeSender;
try
{
serverSocket.EndReceiveFrom(ar, ref epSender);
Data msgReceived = new Data(byteData);
ipeSender = epSender as IPEndPoint;
byte[] message = new byte[<<ACK size>>];
serverSocket.BeginSendTo(message, 0, message.Length, SocketFlags.None, epSender,
new AsyncCallback(OnSend), epSender);
byteData = new byte[40];
serverSocket.BeginReceiveFrom(byteData, 0, byteData.Length, SocketFlags.None, ref epServerSender,
new AsyncCallback(OnReceive), epServerSender);
}
catch (Exception ex)
{
byteData = new byte[40];
serverSocket.BeginReceiveFrom(byteData, 0, byteData.Length,
SocketFlags.None, ref epServerSender, new AsyncCallback(OnReceive), epServerSender);
}
}
}
Can any one help me to get rid of this issue.
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
"Push" is evil.
A server should not send unrequested data.
But maybe someone can help you.
|
|
|
|
|
I am looking for some article talking about chm maker written in c#.
thanks.
|
|
|
|
|
Seraph_summer wrote: I am looking for some article talking about chm maker written in c#.
Are you?
It looks to me that your asking someone else to look for the article for you
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
no at all!
I just want to know if anyone has some information on it.
|
|
|
|
|
then you OP is just a general statement.
Sorry, i have no info for you, try Googling 'C# create chm file'
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
hi,
what IT developers need to monitor, control and trace processes and applications of their system?
In other word, what are the features of any PC monitoring applications?
|
|
|
|
|
Hey, welcome to codeproject. Check out the link in my signature to get base for how thinks run around here generally. Firstly, allow me to reiterate, try using useful thread topics, "4 IT developers" isn't very helpful. Also, the forums are meant for more specific problems, not vague general research topics, we are not google[^], google[^] is google.[^]
shefa' isied wrote: what IT developers need to monitor, control and trace processes and applications of their system?
In relation to C#, this is a very big question, but a quick push to a start would be the System.Diagnostics namespace[^].
shefa' isied wrote: In other word, what are the features of any PC monitoring applications?
Use google to help you find that out, you are able to do research.
|
|
|
|
|
Task Manager with Windows is sufficient in most cases. You will also find Spy or Spy++ installed with Visual Studio to be useful.
|
|
|
|
|
Darn, I was hoping this was a job ad and you needed four IT developers.
|
|
|
|
|
What you don't get enough poor treatment from Indians on Dice?
|
|
|
|
|
The local Indians don't need developers; they need people to plunk coins in slot machines.
On an unrelated note... You're an independant contractor, yes? You get 1099s and estimate your taxes? Do you have to contribute to unemployment and Social Security?
|
|
|
|
|
If you do 1099 you have something called SE Tax which will be 7.5% of your income after expenses. A large chunk. I have my own corporation so I only pay SS and Medicare on my W2 wages and not profit at the end of the year. With respect to Unemployment insurance most States do not require it if you own your own company and are the sole employee, 1099 does not require it period. If you wish to carry it then it is nearly a trivial amount. Also, 1 million in general liability will run about $250 a year if you want to carry it.
The bonus of having your own company is that it is perfectly legal to accept 1099 payment (some vendors refuse to do Corp-Corp and only do 1099) and then toss the 1099-Misc at the end of the year.
If you do 1099, my best advice is to take 25% of net (after expenses) and send it to the feds via estimated tax payments every quarter. You will get a little back but the next year but it is a surprisingly good assessment.
|
|
|
|
|
|
i want to perform analysis on SQL code.
In this i would like to separate the blocks in SQL code.
for example, in the code below
for condition1 loop
stmt1;
for condition2 loop
stmt2;
end loop;
end loop;
i want to separate these two blocks and create a data structure which will contain outer loop block and will also have inner loop block.
which is the best way to do so? is there any parser available which can handle the nested loops in the best possible way?
modified on Tuesday, February 24, 2009 7:45 AM
|
|
|
|
|
SQL Works best when using set based operations and not cursor based (ie, loops). Try to think of the data you need in terms of sets and write the query based on that and you will be amazed at the performance you will get. If you really want to perform cursor logic on your data your best bet may be to transfer the sets to your application and use application logic to do the combinations.
|
|
|
|
|
Thanks for the help.
But here the contents of the input SQL file are not known before parsing.
Is there any parser which can tokenise the input SQL code? So that i can use its output to create structures as per my requirement in C#?
|
|
|
|
|
Has any one created a Listbox type control similar to the one that is found in the Firefox Download screen? Or something similar?
I'd really appreciate the help!
|
|
|
|
|
Start out with a UserControl, and dub it "WorkList". Set "AutoScroll" to true. This will cause scrollbars to appear in the master-control when there's items that don't fit in the client-area.
Create a new UserControl called "WorkItem" that holds:
- a label
- a progressBar
A minimum & maximum-height of, e.g. 200.
I assume that you'll be using backgroundWorkers to do the work, and that you're going to keep the progress of each thread in the "downloadlist". Whenever you create a new backgroundworker, you also create a new "WorkItem" usercontrol, and pass it as a parameter to the new thread. Set the Dock property to "Top", and it will snap in place in the list.
In the .DoWork of the backgroundworker, call the backgroundWorker1.ReportProgress( ... ) method.
This will raise the backgroundWorker1_ProgressChanged event, in which you update the progressBar of the associated "WorkItem"-usercontrol. If the Control is @100%, dispose
I are Draenei, apparently, level 72
|
|
|
|
|
i tried to fill a data table using a sqldataadpter, even though no exception occurred the table wasn't filled, i then used the data set , it was filled with data, i used the same query , is it possible to fill datatable directly using a sqldataadpter.
|
|
|
|