Click here to Skip to main content
15,897,187 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionZooming mouse pointed area in a frame Pin
peter rankel18-Feb-06 1:25
peter rankel18-Feb-06 1:25 
AnswerRe: Zooming mouse pointed area in a frame Pin
Dave Kreskowiak19-Feb-06 7:22
mveDave Kreskowiak19-Feb-06 7:22 
QuestionAnyone EXPERT on coding picturebox ? Pin
campbells17-Feb-06 21:49
campbells17-Feb-06 21:49 
AnswerRe: Anyone EXPERT on coding picturebox ? Pin
Joshua Quick18-Feb-06 10:45
Joshua Quick18-Feb-06 10:45 
GeneralRe: Anyone EXPERT on coding picturebox ? Pin
campbells18-Feb-06 18:28
campbells18-Feb-06 18:28 
AnswerRe: Anyone EXPERT on coding picturebox ? Pin
Joshua Quick18-Feb-06 21:23
Joshua Quick18-Feb-06 21:23 
GeneralRe: Anyone EXPERT on coding picturebox ? Pin
campbells19-Feb-06 4:14
campbells19-Feb-06 4:14 
AnswerRe: Anyone EXPERT on coding picturebox ? Pin
Joshua Quick19-Feb-06 11:17
Joshua Quick19-Feb-06 11:17 
pittybird wrote:
i didnt use ME because the form cannot be convert to the system.drawing.image itself.


Of course a Form reference can't be cast to a PictureBox.Image. They are two very different classes. You need to pass the PictureBox.Image reference in Form2 over to the PictureBox.Image property in Form1. That's what this whole exercise is really about.

Now there are multiple ways to pass this image reference over. Having Form2 reference and control Form1 is one way to do it and I was hoping this would be the easiest approach for you.

Dave's approach (see his post below) is an even better solution because a child form really shouldn't have any knowledge of its parent form. It just forces you to know more about events and setting up event handlers. Although I must say that it would be good for you to learn this.

Hell, an even better approach would be to fully implement the MVC pattern and introduce a Model which stores all player data and raises events anytime this data has changed to be caught by Form1, Form2, or any other form you might have in the future. But we would be getting into design patterns here and I don't think you're quite ready for that yet.

-- modified at 17:17 Sunday 19th February, 2006
GeneralRe: Anyone EXPERT on coding picturebox ? Pin
campbells19-Feb-06 16:18
campbells19-Feb-06 16:18 
AnswerRe: Anyone EXPERT on coding picturebox ? Pin
Dave Kreskowiak19-Feb-06 7:15
mveDave Kreskowiak19-Feb-06 7:15 
GeneralRe: Anyone EXPERT on coding picturebox ? Pin
campbells19-Feb-06 16:39
campbells19-Feb-06 16:39 
QuestionPasssing a reference parameter of structure type to a fucntion in dll Pin
pravinkgarg17-Feb-06 16:56
pravinkgarg17-Feb-06 16:56 
AnswerRe: Passsing a reference parameter of structure type to a fucntion in dll Pin
alien viper17-Feb-06 19:22
alien viper17-Feb-06 19:22 
GeneralRe: Passsing a reference parameter of structure type to a fucntion in dll Pin
pravinkgarg18-Feb-06 2:35
pravinkgarg18-Feb-06 2:35 
AnswerRe: Passsing a reference parameter of structure type to a fucntion in dll Pin
[Marc]18-Feb-06 4:57
[Marc]18-Feb-06 4:57 
Questionexecutereader inquiry Pin
maytel17-Feb-06 15:34
maytel17-Feb-06 15:34 
AnswerRe: executereader inquiry Pin
Dave Kreskowiak17-Feb-06 16:21
mveDave Kreskowiak17-Feb-06 16:21 
GeneralRe: executereader inquiry Pin
maytel17-Feb-06 21:02
maytel17-Feb-06 21:02 
GeneralRe: executereader inquiry Pin
Dave Kreskowiak18-Feb-06 3:41
mveDave Kreskowiak18-Feb-06 3:41 
GeneralRe: executereader inquiry Pin
maytel19-Feb-06 14:34
maytel19-Feb-06 14:34 
GeneralRe: executereader inquiry Pin
Dave Kreskowiak19-Feb-06 14:55
mveDave Kreskowiak19-Feb-06 14:55 
GeneralRe: executereader inquiry Pin
maytel19-Feb-06 20:51
maytel19-Feb-06 20:51 
GeneralRe: executereader inquiry Pin
Dave Kreskowiak20-Feb-06 4:25
mveDave Kreskowiak20-Feb-06 4:25 
GeneralRe: executereader inquiry Pin
maytel20-Feb-06 16:49
maytel20-Feb-06 16:49 
GeneralRe: executereader inquiry Pin
Dave Kreskowiak21-Feb-06 13:20
mveDave Kreskowiak21-Feb-06 13:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.