?
Solved

Update a form dynamically

Posted on 2003-11-14
9
Medium Priority
?
328 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 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