Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Update a form dynamically

Posted on 2003-11-14
9
Medium Priority
?
329 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 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