Solved

Update a form dynamically

Posted on 2003-11-14
9
325 Views
Last Modified: 2010-05-01
RE: http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20797176.html

I have a form (form1), and have passed a picture to it from another form (form2, which is an image chooser form), but I want the form (form1) to update automatically
As it is now, the user has to click a command button to apply the image, and I want it done  when they choose the image from form2
again, I'm a begginer, and using vb5
0
Comment
Question by:stevenlewis
9 Comments
 
LVL 44

Expert Comment

by:CrazyOne
ID: 9749488
Getting back into programming are we Steve, cool and the best of luck to you. :)
0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 500 total points
ID: 9749638
You can just do

form1.picture = loadpicture ("your picture file")


from form2

0
 
LVL 41

Author Comment

by:stevenlewis
ID: 9749728
OK, just tried it, and it didn't work
No errors, just didn't update the pick on form1
BTW, get your points in the Q I posted for you :~)
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 41

Author Comment

by:stevenlewis
ID: 9749739
Spence, just messin around a bit. It's a good break from answering the questions in the networking/OS areas :~)
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 9749755
>>>It's a good break from answering the questions in the networking/OS areas

Yep but it can get as frustrating as well when you can't get what you want to work the way you want it to. :)
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 9750267
Can you post your full code as it stands now?
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9750506
create a stdpicture variable in a bas module.

public pic as stdpicture


when user choose the picture do this:

set pic=loadpicture(????) ' i don't know how user chooses it

set form1.picture1.picture=pic
set form2.picture1.picture=pic
or


set form2.picture1.picture=loadpicture(????) ' i don't know how user chooses it
set form1.picture1.picture=form2.picture1.picture

0
 
LVL 41

Author Comment

by:stevenlewis
ID: 9750612
Doh, my bad, it worked, but I had an image overlayed, and have the form a fixed size, so couldn't see it
I just added
form1.Image1.Image = Loadpicture(Pictfilename)
to form2 and it worked *sheepish grin*
0
 
LVL 41

Author Comment

by:stevenlewis
ID: 9750631
I'm sure you all will be hearing from me again soon, as I'm gonna try and make this a screen saver
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question