|
Why don't you send a reference of form1 throught the constructor of form2.
Example:
the constructor of form2 is:
<br />
private Form1 parentForm;<br />
<br />
public void Form2(From1 form)<br />
{<br />
parentForm = form1;<br />
}<br />
and when u initialize the second form to call it in form1,
use this:
<br />
Form2 form2 = new Form2(this);<br />
form2.show();<br />
now you can use the visible property of the form1 from form2 and u can unhide it by simply writting this:
<br />
parentForm.Visible = true;<br />
Good luck
|
|
|
|
|
Thank you so much smart. I have done with your help
kesavan
|
|
|
|
|
depending how many forms you are going to end up with. I would be tempted to make a control class that holds the data and controls which forms get loaded / unloaded at which point. If you are only ever going to have 2 forms it's probably not worth it but if you don't know how many forms you might end up with or which order people are going to want them in it's probably worth the extra effort up front.
Russ
|
|
|
|
|
hi
i want to use oledbCommandBuilder for Insert,Update,Delete Commands dinamically, but how to use it ?
thanks
|
|
|
|
|
|
Hi,
I have a Peculiar problem in my C# Windows application. The scenario is, we have a windows application running in windows Xp environment, its main operation is copy the Employee word Document file from one employee machine and paste it to the other employee. It’s purely a File copy and Paste operation. To do this we shared One drive in all the employee machine with full access writes to every in the network. So my application go to that particular shared drive copy all document from that location and paste it in to other shared drive. This is working fine in the current environment.
My problem is, now that all shared drives permissions are changed and restricted to Read only permission, every one in the network they only read the file in the network shared drive, they can not paste any file in to that drive. This is to avoid other employee miss use and security purpose. After this implementation my application is not copying the file from that shared drive and pasting. It’s throwing the error unauthorized access or don’t have a permission to access folder.
My question is how to give permission to the application to access that folders and copy to other network shared drive even if the application runs in windows user login mode. This application runs in entire employee machine. Once they login to the system it starts running. Please suggest me the best way to over come this issue
Thanks in advance.
By,
Rajasekarn Shan
|
|
|
|
|
You should probably use TCP/IP sockets to send the file across. When a file needs to be copied you can establish a connection with the particular machine and send the file, the receiving machine can save the file into a configured folder.
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
|
|
|
|
|
Hi tarakeshwar,
can you provide me a little more about TCP/IP? some examples if possible.
By,
Rajasekaran.S
Rajasekarn Shan
|
|
|
|
|
|
Hi there,
I am currently creating a web application in c# 2005, on my search form i would like to display an animated gif image while busy doing the search in the sql database.
As soon as the user clicks the search button i want the image to become visible and then as soon as the gridview got binded with the results, i want the image to be invisible again.
Now the problem is that the image does not become visible at all
mmmm i dunno where to start finding the problem cause it does run the code but does not actually do it lol.
I am thinking i should probably use like "sleep" or threads but thats some weird stuff for me as i am still beginner. Is there any other solution to this problem?
Thanks in advance
Regards
|
|
|
|
|
Hello,
I think the problem is that you are running the control with the gif in the same threat (which is busy) where you are doing the search.
You could do a control.Refresh();, after you set Visible=true.
But it would only show the not- or rarely moving gif I think.
All the best,
Martin
|
|
|
|
|
Hi All,
I am using VS.NET 2005 and using C#.net.
I want to develop a functionality as follows.
when I run my application , it should create a Icon in system tray. When I close the application it's instance should be running in the background and Icon should be displayed in the system tray. Again when i click on my applications shortCut Icon on desktop , not the icon from system tray, it should bring forward the already running instance of my application in the background.
thnx in advance
Praveen
|
|
|
|
|
Have a look at this article[^]
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
|
|
|
|
|
|
Hello everyone,
How can I find if two controls intersect or not ?
Best regards...
.:: Something is Wrong ::.
|
|
|
|
|
if (control1.Bounds.IntersectsWith(control2.Bounds))
...
That should do it.
|
|
|
|
|
Hi =),
I have class that works with a Generic.Dictionary and now i want to access the elements by an index.
Is there a way i can do this ? ...or are there other classes where i can access the elements by an
index and provides the same functionality like the Generic.Dictionary?
I already found the Generic.SortedList, but there my listing will be sorted and i dont need/want that =/
|
|
|
|
|
Hello,
If you don't need the access per key functionality at, you should use an ArrayList. (System.Collections)
All the best,
Martin
|
|
|
|
|
Hi Martin, thx for the quick answer, but the ArrayList is useless for me cause i need the generic-properties.
I have a Generic.Dictionary that looks like this...
Dictionary<Guid, TcpClient> tcpConnections = new Dictionary<Guid, TcpClient>();
... and in some cases i want to access an element of the listing without to know the Guid, like this...
tcpConnections.Values[2]
... but unfortunatly this dont work
|
|
|
|
|
Ok,
And if you make a second Dictonary with 1, 2, 3, ... as key and access it like this.
tcpConnection2[1]
Hope it's not complietly stupid, but I have only .NET1.1 and never worked with Dictonary class before.
All the best,
Martin
|
|
|
|
|
I'ts not completely stupid, all youve done is make a second index for the list. Ive accomplished many tasks in this way.
Another way is with a collection that supports both key or index lookup - there used to be one in .NET 1.1 in the System.Collections.Specialized namespace. Im sure there will be a generic version in .NET 2
|
|
|
|
|
Hello,
Thanks for the info.
I think System.Collections.Specialized.NameValueCollection would be the .Net1.1 non generic version.
All the best,
Martin
|
|
|
|
|
The class System.Collections.ObjectModel.KeyedCollection provides the functionality you are looking for. However, you have to derive your own collection class from it, as you must override the GetKeyForItem member. Maybe it is suited for your application.
Regards,
Tim
|
|
|
|
|
yea your right , thx Tim
|
|
|
|
|