473,378 Members | 1,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Reinitialzed a winform

3
Hi,

there is a button on a form called new. On clicking that button i wanted to make the form like new = when first loaded. i am using .net 3.5

thanks for your reply

kazim
Aug 21 '08 #1
7 974
Plater
7,872 Expert 4TB
What has changed since it first loaded? Just trying to clear out all the fields?
I have called InitializeComponent() with some luck
Aug 21 '08 #2
kzmm
3
It includes multiple tabs , grids , lots of controls. Is there any way to dispose the form and load it again from the same form.?
Aug 22 '08 #3
r035198x
13,262 8TB
It includes multiple tabs , grids , lots of controls. Is there any way to dispose the form and load it again from the same form.?
There is a Dispose method if that's what you are talking about.
Aug 22 '08 #4
kzmm
3
yes it there if i called dispose from the same form how i do load it again from the same form?
Aug 22 '08 #5
r035198x
13,262 8TB
yes it there if i called dispose from the same form how i do load it again from the same form?
You can't load that same form because you'll have disposed it. You can created and initialize another Form of the same class soon after calling the Dispose method.
Aug 22 '08 #6
cloud255
427 Expert 256MB
You can't load that same form because you'll have disposed it. You can created and initialize another Form of the same class soon after calling the Dispose method.
While looking into a solution to this question i tried this approach but i had many problems and as far as i can see this is due to C# creating pointers to the original objects even though i did specify new Form1()

I then tried to clone the original form, but i couldn't find a standard clone method for the Form class.

Did i miss something or do something wrong?
Aug 22 '08 #7
Plater
7,872 Expert 4TB
Well you know which form it is ahead of time?
Did you try the InitializeComponent() call I menentioned?
Aug 22 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: localhost | last post by:
I am looking for any info on creating an MDI WinForms application that uses the "main executable" as a main window container (along with a menu), but can launch other .exe from a menu that act as...
0
by: cgia | last post by:
I found out that only using winform I can use the winword interop and generate word document in the client machine and connect to a remote database, so that I have made a winform application which...
0
by: zbcong | last post by:
hello in my winform,there is a datagrid,i want to fire some actions when the selected index is changed,but i fail to find the SelectedIndexChanged event to the winform datagrid,why? how can i...
0
by: someone | last post by:
Hi, We are encountering a problem with the DTPicker. This is the situation: We have a DTPicker-control on a VB6 Active-X. The Active-X is used on a .NET winform. the problem: The .Net...
3
by: Skc | last post by:
My client's project consists of about 6 files maintenance programs that uses WinForm and grid for updates with lookup finders for each file. There is also a User file and security. There are...
2
by: J.Marsch | last post by:
Ok, so here's a problem you probably don't see every day: We are building an application that must run in a browser, but we need to do some things client-side that would be rather difficult to...
8
by: Sunil Menon | last post by:
Dear All, We are developing applications in ASP.Net...in one of our applications we would like to use a GridControl...we have tried to use a Server-Side Grid control but found the speed to be an...
2
by: jyanmin.fang | last post by:
Hi, In my current project, I need to embed an .NET winform usercontrol in the aspx page (via <Objecttag). This winform usercontrol has an event called DoEvent (void DoEvent()). This winform...
0
by: Tom | last post by:
Hi all -- this is my first posting here and I want to start by saying thank you to all the responders. I have done some searching and reading and have learned a few things I didn't even know to...
14
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.