[RESOLVED] Error 50003 Vista Only on Minimize
Hi, I have a strange unexpected error coming up with my app only on Vista! I have tracked down the bug, when my main form is minimized a MSN Messenger style popup appears (frmReminder) to give the user a reminder message, the process giving off the error is below, the specific line is (Me.Left = Screen.Width - Me.Width).
VB Code:
Public Function Iniciar(Texto As String, Index As Integer)
If frmMain.ManualClick = False Then
Unload Me
Else
Dim WindowRect As RECT
SystemParametersInfo SPI_GETWORKAREA, 0, WindowRect, 0
taskbar = ((Screen.Height / Screen.TwipsPerPixelX) - WindowRect.PAbj) * Screen.TwipsPerPixelX
Me.Left = Screen.Width - Me.Width '<---- Line giving off the error! <----
Me.Top = Screen.Height '- Me.Height - taskbar
resto = Screen.Height - Me.Height - taskbar
a = Me.Height
lblCaption.Caption = Texto
Me.Show
Timer1.Enabled = True
SetTopMost
SetTranci
Me.Top = Screen.Height - taskbar
tmrSlideIn.Enabled = True
Me.Left = Screen.Width - Me.Width
Me.Height = 0
End If
End Function
Any ideas? This one has me stumped... :confused:
Re: Error 50003 Vista Only on Minimize
maybe try
vb Code:
if not me.windowstate = vbminimized then Me.Left = Screen.Width - Me.Width
Re: Error 50003 Vista Only on Minimize
hey thanks for the suggestion I am on my laptop and will try it when I get home. By the way how do I make my code vb6 formatted, i tried the code option and it just put it in a box, tried the vbcode option didnt do anything. Will give an update on the error.
Re: Error 50003 Vista Only on Minimize
as far as i could tell, you can only use vbcode tags in quick reply, not advanced
Re: Error 50003 Vista Only on Minimize
In the "advanced" editor the VBCode button asks you which language to use - which is: VB
(you can enter various others, such as C, PHP, SQL, ....)
If you use the VBCode button in the Quick Reply, it will not ask you.. if you "Post Quick Reply" the VB is automatically added, but if you "Go Advanced" it isn't - so you need to add it manually. :(
The way the tags should look is like this:
[HIGHLIGHT=vb] code here [/HIGHLIGHT]
Re: Error 50003 Vista Only on Minimize
I tried the suggestion it didnt work, it seems vista gives the error the moment i try do anything to the form. I even tried at the start of the routine msgbox me.windowstate..crash... msgbox me.left... crash.... msgbox me.top crash....
Just in case here is the code from frmMain (resize event) which then calls this code to show the alert on frmReminder...
vb Code:
NoPopup = NoPopup + 1
If NoPopup < 1 Then NoPopup = 1
Set PopUp(NoPopup) = New frmReminder 'Form2
PopUp(NoPopup).Iniciar "msg here", NoPopup
If NoPopup = 3 Then NoPopup = 0
Re: Error 50003 Vista Only on Minimize
Well, I fixed it... But I am not able to tell anyone what was wrong with the code because I dont know! :confused:
All I did was scrap all existing alert code and replaced with some new fresh msn style alert code from pscode.com... That did the trick.
Re: [RESOLVED] Error 50003 Vista Only on Minimize
even in XP i have had problems when using new forms, after calling a new from i was unable to open a msgbox until all the code finished and control passed back to the user