Solved

Update a form dynamically

Posted on 2003-11-14
9
327 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 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

690 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