Click here to Skip to main content
15,891,864 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: VB6 Serial Comm Crashs Visual Studio Pin
Mycroft Holmes1-Sep-09 16:05
professionalMycroft Holmes1-Sep-09 16:05 
AnswerRe: VB6 Serial Comm Crashs Visual Studio Pin
Luc Pattyn2-Sep-09 1:11
sitebuilderLuc Pattyn2-Sep-09 1:11 
QuestionCalculate the origin and radius of a circle Pin
keithp08231-Sep-09 10:21
keithp08231-Sep-09 10:21 
AnswerRe: Calculate the origin and radius of a circle Pin
Luc Pattyn1-Sep-09 13:58
sitebuilderLuc Pattyn1-Sep-09 13:58 
GeneralRe: Calculate the origin and radius of a circle Pin
keithp08232-Sep-09 5:35
keithp08232-Sep-09 5:35 
GeneralRe: Calculate the origin and radius of a circle Pin
Luc Pattyn2-Sep-09 5:54
sitebuilderLuc Pattyn2-Sep-09 5:54 
GeneralRe: Calculate the origin and radius of a circle Pin
keithp08232-Sep-09 6:32
keithp08232-Sep-09 6:32 
QuestionConfused by Events Pin
Sonhospa1-Sep-09 1:49
Sonhospa1-Sep-09 1:49 
Hello everybody,

in my project I have a pictureBox, sitting in one of the panels of a SplitContainer and docking to it in fill mode. The PictureBox loads it's images in zoom mode and is supposed to take the size of the loaded/zoomed image automatically whenever a) the form's size is changed or b) the splitter is moved.

In a first approach to reach this I call
Private Sub FitPictureBox()
    If PictureBox1.Image IsNot Nothing Then
        Dim thisFrame As Bitmap = PictureBox1.Image
        AspectRatio = thisFrame.Width / thisFrame.Height
        SplitContainer3.SplitterDistance = PictureBox1.Width / AspectRatio
    End If
from the 'resize' event as well as from the 'splitter.moved' event.

Now I'm desperately struggling to make this work, coz the 'resize' event (as well as the layout event) calling 'FitPictureBox' triggers the 'splitter.moved' event again - and I run into a loop i.e. a 'stack overflow' exception. Still I need to consider fitting the PictureBox in both cases.

Could anyone of you please guide me a way out of this dilemma? Did I use the wrong events or is there a better approach at all?

Thank you,
Mick
AnswerRe: Confused by Events Pin
Jay Royall1-Sep-09 2:02
Jay Royall1-Sep-09 2:02 
GeneralRe: Confused by Events Pin
Mycroft Holmes1-Sep-09 16:09
professionalMycroft Holmes1-Sep-09 16:09 
GeneralRe: Confused by Events Pin
Jay Royall1-Sep-09 22:07
Jay Royall1-Sep-09 22:07 
AnswerRe: Confused by Events Pin
Johan Hakkesteegt1-Sep-09 2:06
Johan Hakkesteegt1-Sep-09 2:06 
NewsRe: Confused by Events Pin
Sonhospa1-Sep-09 2:35
Sonhospa1-Sep-09 2:35 
NewsResolved: Confused by Events Pin
Sonhospa1-Sep-09 3:19
Sonhospa1-Sep-09 3:19 
GeneralRe: Resolved: Confused by Events Pin
Jay Royall1-Sep-09 3:31
Jay Royall1-Sep-09 3:31 
QuestionHelp with IE automation through VBA(Excel) Pin
adityabaraya31-Aug-09 20:27
adityabaraya31-Aug-09 20:27 
QuestionHow to load a word document and save it into sql db? Pin
waner michaud31-Aug-09 8:28
waner michaud31-Aug-09 8:28 
AnswerRe: How to load a word document and save it into sql db? Pin
Steven J Jowett31-Aug-09 8:40
Steven J Jowett31-Aug-09 8:40 
GeneralRe: How to load a word document and save it into sql db? Pin
waner michaud31-Aug-09 8:46
waner michaud31-Aug-09 8:46 
GeneralRe: How to load a word document and save it into sql db? Pin
Dave Kreskowiak31-Aug-09 9:07
mveDave Kreskowiak31-Aug-09 9:07 
GeneralRe: How to load a word document and save it into sql db? Pin
waner michaud31-Aug-09 9:20
waner michaud31-Aug-09 9:20 
GeneralRe: How to load a word document and save it into sql db? Pin
Dave Kreskowiak31-Aug-09 9:53
mveDave Kreskowiak31-Aug-09 9:53 
GeneralRe: How to load a word document and save it into sql db? Pin
waner michaud31-Aug-09 10:15
waner michaud31-Aug-09 10:15 
GeneralRe: How to load a word document and save it into sql db? Pin
Dave Kreskowiak31-Aug-09 12:42
mveDave Kreskowiak31-Aug-09 12:42 
GeneralRe: How to load a word document and save it into sql db? Pin
waner michaud1-Sep-09 3:18
waner michaud1-Sep-09 3:18 

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.