Solved

Update a form dynamically

Posted on 2003-11-14
9
321 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
 
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now