I have a Listbox1 in the main form and I can add listbox1 items in the
parent form. But when I close the parent form Listbox1 in the main form does
not get refresh. I need to re-open the app.
Any idea on how to refresh items in the main from from a parent form without
opening the app.
-Thanks 5 2470
On Sep 7, 5:30 am, "BlackBox" <replymeo...@ho tmail.comwrote:
I have a Listbox1 in the main form and I can add listbox1 items in the
parent form. But when I close the parent form Listbox1 in the main form does
not get refresh. I need to re-open the app.
Any idea on how to refresh items in the main from from a parent form without
opening the app.
-Thanks
Use "<form>.Refresh " for other forms and "Me.Refresh " for current
form.
Or depending on your wish, you can try Listbox1.Refres h method.
Onur Güzel
Well I forgot to mention the listbox1 should get refreshed after I close the
parent window.
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:03******** *************** ***********@m73 g2000hsh.google groups.com...
On Sep 7, 5:30 am, "BlackBox" <replymeo...@ho tmail.comwrote:
>I have a Listbox1 in the main form and I can add listbox1 items in the parent form. But when I close the parent form Listbox1 in the main form does not get refresh. I need to re-open the app.
Any idea on how to refresh items in the main from from a parent form without opening the app.
-Thanks
Use "<form>.Refresh " for other forms and "Me.Refresh " for current
form.
Or depending on your wish, you can try Listbox1.Refres h method.
Onur Güzel
On Sep 7, 1:47 pm, "BlackBox" <replymeo...@ho tmail.comwrote:
Well I forgot to mention the listbox1 should get refreshed after I close the
parent window.
"kimiraikko nen" <kimiraikkone.. .@gmail.comwrot e in message
news:03******** *************** ***********@m73 g2000hsh.google groups.com...
On Sep 7, 5:30 am, "BlackBox" <replymeo...@ho tmail.comwrote:
I have a Listbox1 in the main form and I can add listbox1 items in the
parent form. But when I close the parent form Listbox1 in the main form
does
not get refresh. I need to re-open the app.
Any idea on how to refresh items in the main from from a parent form
without
opening the app.
-Thanks
Use "<form>.Refresh " for other forms and "Me.Refresh " for current
form.
Or depending on your wish, you can try Listbox1.Refres h method.
Onur Güzel
Then, IIUC, you need to handle FormClosed event which is raised after
form is closed. But, curious, why do you mean by "refreshing "? Adding
new items or using Refresh method which redraws the control? Because
as you re-open your form, it may be needless to call Refresh method
based on your implementation.
Thanks,
Onur Güzel
Well here is the explanation -
I have a listbox1 in main form containing product lists. Now I allow the
user to add new products in the second form and when they close the second
form - the main form should update the new product items in the Listbox1
under main form. And I don't know what is the best way to do it.
Thanks
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:96******** *************** ***********@j22 g2000hsf.google groups.com...
On Sep 7, 1:47 pm, "BlackBox" <replymeo...@ho tmail.comwrote:
Well I forgot to mention the listbox1 should get refreshed after I close
the
parent window.
"kimiraikko nen" <kimiraikkone.. .@gmail.comwrot e in message
news:03******** *************** ***********@m73 g2000hsh.google groups.com...
On Sep 7, 5:30 am, "BlackBox" <replymeo...@ho tmail.comwrote:
I have a Listbox1 in the main form and I can add listbox1 items in the
parent form. But when I close the parent form Listbox1 in the main form
does
not get refresh. I need to re-open the app.
Any idea on how to refresh items in the main from from a parent form
without
opening the app.
-Thanks
Use "<form>.Refresh " for other forms and "Me.Refresh " for current
form.
Or depending on your wish, you can try Listbox1.Refres h method.
Onur Güzel
Then, IIUC, you need to handle FormClosed event which is raised after
form is closed. But, curious, why do you mean by "refreshing "? Adding
new items or using Refresh method which redraws the control? Because
as you re-open your form, it may be needless to call Refresh method
based on your implementation.
Thanks,
Onur Güzel
On Sep 8, 3:44 am, "IndiDevelo per" <replymeo...@ho tmail.comwrote:
Well here is the explanation -
I have a listbox1 in main form containing product lists. Now I allow the
user to add new products in the second form and when they close the second
form - the main form should update the new product items in the Listbox1
under main form. And I don't know what is the best way to do it.
Thanks
"kimiraikko nen" <kimiraikkone.. .@gmail.comwrot e in message
news:96******** *************** ***********@j22 g2000hsf.google groups.com...
On Sep 7, 1:47 pm, "BlackBox" <replymeo...@ho tmail.comwrote:
Well I forgot to mention the listbox1 should get refreshed after I close
the
parent window.
"kimiraikko nen" <kimiraikkone.. .@gmail.comwrot e in message
news:03******** *************** ***********@m73 g2000hsh.google groups.com....
On Sep 7, 5:30 am, "BlackBox" <replymeo...@ho tmail.comwrote:
>I have a Listbox1 in the main form and I can add listbox1 items in the
>parent form. But when I close the parent form Listbox1 in the main form
>does
>not get refresh. I need to re-open the app.
>Any idea on how to refresh items in the main from from a parent form
>without
>opening the app.
>-Thanks
Use "<form>.Refresh " for other forms and "Me.Refresh " for current
form.
Or depending on your wish, you can try Listbox1.Refres h method.
Onur Güzel
Then, IIUC, you need to handle FormClosed event which is raised after
form is closed. But, curious, why do you mean by "refreshing "? Adding
new items or using Refresh method which redraws the control? Because
as you re-open your form, it may be needless to call Refresh method
based on your implementation.
Thanks,
Onur Güzel
Well, then you need to add new items of second form's listbox
items(items which will be added to the entire product list) into main
form's listbox. So, you'd better handle FormClosing event of second
form and add all the items to the main form's listbox before second
form is closed, as follows:
'----Begin------
'Add second form's listbox items into entire list
'which are located in mainform's listbox.
'Put the code in your second form
Private Sub SecondForm_Form Closing(ByVal sender As System.Object, _
ByVal e As System.Windows. Forms.FormClosi ngEventArgs) _
Handles MyBase.FormClos ing
MainForm.mainfo rms_listbox.Ite ms.AddRange(Me. secondforms_lis tbox.Items)
End Sub
'----End------
...where "MainForm" is the name of your main form, "mainforms_list box"
is the name of your main form's listbox, "second_for m" is the name of
your second form and "secondforms_li stbox" is the name of your second
form's listbox.
Hope this helps,
Onur Güzel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Amy Snyder |
last post by:
Probably a very simple questions but...
I am playing around with ASP.NET for the first time and put together my
first page that has a few text boxes and listboxes. I like the way
values are retained in the controls after submitting to the page, but
how can I clear them? I put a Reset button on the page but it does
nothing.
Thanks
|
by: Bilo |
last post by:
I dont know what i am doing false.
the code :
private void button2_Click(object sender, System.EventArgs e)
{
foreach (string filename in listBox1.SelectedItems)
listBox1.Items.Remove(filename);
}
gives me the error :
|
by: Tariq |
last post by:
Hi,
I have a list box that is bound to an arraylist, but when the data
changes the listbox does not refresh.
-----------------------------------------------------------------------------
al = new ArrayList();
al.Add("1");al.Add("2");al.Add("3");al.Add("4");al.Add("5");al.Add("6");
listBox1.DataSource = al;
label1.Text = al.Count.ToString();
|
by: JBD |
last post by:
Hi, I have a button that fires the below sub routine.
This works fine if the user clicks the button as they are
supposed to, even if they click it repeatedly. However,
if you click "refresh" on the browswer, then it
duplicates records. I believe this is happening because
somehow it isnt doing the first part of my code which is
to to an archive update.
I can't for the life of me figure out why this happens
only when you click refresh on...
|
by: Jan |
last post by:
Hi there,
I'm a newbee in vb.net with the following problem:
4444528; Baltic Birch; 16.20; 0
I have more of these lines in a ListBox1.
Now I want to change the latest 0 with the value of a NumericUpDown1 (for
ex. 8)
My solution is this:
| |
by: Rémi Lavoie |
last post by:
Hi,
I'm adding items in a listbox automatically. When my
listbox is full, the scrollbar appears but i can't set my
listbox to see the new items. I would like that my
scrollbar follow the new item (it goes down
automatically).
Which event i need to use? Which property i need to set?
|
by: Bernie Yaeger |
last post by:
I want to open a window with a listbox (custlist) in it, but I want to
automatically select a certain item in the listbox, and have it be the
correct selectedindex. The call to open this window knows what it seeks,
which is variable. So one time I may wish to select item 45 (marsdon) and
sometimes item 1997 (albert). How can I do this?
Thanks for any help.
Bernie Yaeger
|
by: Radx |
last post by:
Here in my web application, I have a data entry page with serval controls.
Some of the controls have autopostback is set true.
But the problem is when two or more people are entering data at the same
time, in the middle of my data entry , it is brining someelse data on my
screen.
I look everywhere i could not find the solution. Please help me
Radx
|
by: Franchdream |
last post by:
I use the AccessDataSource to fill the data for Listbox. I doesn't use the
DataSet.
But when I check button to update the database, the Listbox can't fresh the
data at onece.
And the Code which behind is no use:
private void setDataBind()
{
AccessDataSource2.Select(DataSourceSelectArguments.Empty);
AccessDataSource3.Select(DataSourceSelectArguments.Empty);
ListBox2.DataBind();
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |