|
-
Oct 28th, 2009, 03:57 PM
#1
Thread Starter
PowerPoster
-
Nov 2nd, 2009, 01:26 PM
#2
Thread Starter
PowerPoster
-
Nov 3rd, 2009, 01:03 PM
#3
Thread Starter
PowerPoster
Re: [VB6]About some ActiveX control section bugs
by some reason these sub:
Code:
Private Sub PropertyPage_SelectionChanged()
Static a As Boolean
If a = True Then Exit Sub
txtHeight.Text = SelectedControls(0).StripsHeight
txtWidth.Text = SelectedControls(0).StripsWidth
txtPosX.Text = SelectedControls(0).StripsLeft
txtPosY.Text = SelectedControls(0).StripsTop
txtImagensLinha = SelectedControls(0).StripsImagesLine
txtImagensColuna = SelectedControls(0).StripsImagesColumn
txtSeparaçãoHorizontal.Text = SelectedControls(0).StripsSeparationHorizontal
txtSeparaçãoVertical.Text = SelectedControls(0).StripsSeparationVertical
If SelectedControls(0).StripsActivate = True Then
chkActivarStrips.Value = 1
SelectedControls(0).ActualSubImage = 1
Else
chkActivarStrips.Value = 0
SelectedControls(0).ActualSubImage = 0
End If
If (UCase(SelectedControls(0).FileName) Like "*.ANI" Or UCase(SelectedControls(0).FileName) Like "*.CUR") Then
picVisualizar.Picture = SelectedControls(0).Img
Else
picVisualizar.Picture = LoadPicture(SelectedControls(0).FileName)
End If
Changed = False
a = True
End Sub
in Strips Property page was in loop.. i don't know why. i see these by puting 1 message box on it.
and for resolve the problem, i create the a variable. now i don't have the problem
but i continue with 1 question:
why these sub is in loop? is these possible?
thanks
Last edited by joaquim; Nov 3rd, 2009 at 01:11 PM.
-
Nov 3rd, 2009, 01:17 PM
#4
Thread Starter
PowerPoster
Re: [VB6]About some ActiveX control section bugs
finally i found the real problem
Code:
Private Sub PropertyPage_SelectionChanged()
txtHeight.Text = SelectedControls(0).StripsHeight
txtWidth.Text = SelectedControls(0).StripsWidth
txtPosX.Text = SelectedControls(0).StripsLeft
txtPosY.Text = SelectedControls(0).StripsTop
txtImagensLinha = SelectedControls(0).StripsImagesLine
txtImagensColuna = SelectedControls(0).StripsImagesColumn
txtSeparaçãoHorizontal.Text = SelectedControls(0).StripsSeparationHorizontal
txtSeparaçãoVertical.Text = SelectedControls(0).StripsSeparationVertical
If SelectedControls(0).StripsActivate = True Then
chkActivarStrips.Value = 1
Else
chkActivarStrips.Value = 0
End If
If (UCase(SelectedControls(0).FileName) Like "*.ANI" Or UCase(SelectedControls(0).FileName) Like "*.CUR") Then
picVisualizar.Picture = SelectedControls(0).Img
Else
picVisualizar.Picture = LoadPicture(SelectedControls(0).FileName)
End If
Changed = False
End Sub
see the code and forgot the a variable. i found 2 lines that i coundn't put here:
SelectedControls(0).ActualSubImage = 1
and
SelectedControls(0).ActualSubImage = 0.
because the sub is only for read values, and by mistache i put these 2 lines... and only now i sod the problem.
sorry and thanks
-
Nov 4th, 2009, 02:00 AM
#5
Re: [VB6]About some ActiveX control section bugs
Since this is resolved then you can mark it as such. =)
-
Nov 4th, 2009, 02:26 AM
#6
Re: [VB6]About some ActiveX control section bugs
Yes, SelectionChanged event to read your controls properties into your property page and ApplyChanges to write/update your controls properties that you had set.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 4th, 2009, 07:46 AM
#7
Thread Starter
PowerPoster
Re: [VB6]About some ActiveX control section bugs
 Originally Posted by RobDog888
Yes, SelectionChanged event to read your controls properties into your property page and ApplyChanges to write/update your controls properties that you had set.
the problem is resolved, but tell me, if you know, why that infinit loop happen?
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|