|
|
#1 |
|
Lively Member
Join Date: Sep 04
Posts: 86
![]() |
i created a script like this
VB Code:
form 2 is this VB Code:
error 9 run-time subject the error is not complete because he don't get it anymore it is just not reacting anymore can someone help me please |
|
|
|
|
|
#2 |
|
Lively Member
Join Date: Jan 03
Posts: 79
![]() |
Re: error 9 runtime
Error 9 is a "Subscript out of range" error which means that you have tried to reference either an array element in an empty array or an element index that is greater than the Ubound limit of the array.
You need to put some error trapping into your code. All the best, Dave. |
|
|
|
|
|
#3 |
|
Lively Member
Join Date: Sep 04
Posts: 86
![]() |
Re: error 9 runtime
the program works perfect with so many users why does it not work with these 2
the load script is executed completly i'm sure of that but the does not show form1 |
|
|
|
|
|
#4 |
|
Re: error 9 runtime
I have three words of advice: indent, indent, indent.
__________________
Tips, Examples & Tutorials: A valuable forum tool • Generate unique TreeView keys • TreeView with "open" and "closed folder" icons • Time code using GetTickCount • How to trap the Tab key • Scroll a form • NumberBox ActiveX control • Color a ListView row • An InputBox form • How to use SaveSetting and GetSetting • A program registration scheme • Spellcheck a Textbox • Resize controls • Open Windows Explorer at Last Visited Path • A Blackjack Game • Count lines of code • Please go to the Thread Tools menu and click Mark Thread Resolved when you have your answer. If someone helped you today then please consider rating their post.
|
|
|
|
|
|
|
#5 |
|
Lively Member
Join Date: Sep 04
Posts: 86
![]() |
Re: error 9 runtime
i found the problem
it seems that the form was show outside his screen how can i lock the settings so even how big his screeen his it's always in the right upper corner |
|
|
|
|
|
#6 |
|
Re: error 9 runtime
In Form_Load
Me.Move 0,0
__________________
Tips, Examples & Tutorials: A valuable forum tool • Generate unique TreeView keys • TreeView with "open" and "closed folder" icons • Time code using GetTickCount • How to trap the Tab key • Scroll a form • NumberBox ActiveX control • Color a ListView row • An InputBox form • How to use SaveSetting and GetSetting • A program registration scheme • Spellcheck a Textbox • Resize controls • Open Windows Explorer at Last Visited Path • A Blackjack Game • Count lines of code • Please go to the Thread Tools menu and click Mark Thread Resolved when you have your answer. If someone helped you today then please consider rating their post.
|
|
|
|
|
|
|
#7 |
|
Frenzied Member
Join Date: Jan 02
Location: Horsham, Sussex, UK
Posts: 1,519
![]() ![]() |
Re: error 9 runtime
Marty's code does top left. This code does top right. Take your pick.
VB Code:
__________________
This world is not my home. I'm just passing through. Add yourself to the VBForums Frappr Map!! |
|
|
|
|
|
#8 | |
|
Re: error 9 runtime
Quote:
__________________
Tips, Examples & Tutorials: A valuable forum tool • Generate unique TreeView keys • TreeView with "open" and "closed folder" icons • Time code using GetTickCount • How to trap the Tab key • Scroll a form • NumberBox ActiveX control • Color a ListView row • An InputBox form • How to use SaveSetting and GetSetting • A program registration scheme • Spellcheck a Textbox • Resize controls • Open Windows Explorer at Last Visited Path • A Blackjack Game • Count lines of code • Please go to the Thread Tools menu and click Mark Thread Resolved when you have your answer. If someone helped you today then please consider rating their post.
|
||
|
|
|
|
|
#9 |
|
Lively Member
Join Date: Sep 04
Posts: 86
![]() |
Re: error 9 runtime
Move (Screen.Width) - Width, 750
Move (Screen.Height) + 750 for me this is the exact location but is this good for every screen or not |
|
|
|
|
|
#10 |
|
Frenzied Member
Join Date: Jan 02
Location: Horsham, Sussex, UK
Posts: 1,519
![]() ![]() |
Re: error 9 runtime
If you use a literal value of 750 then your form will always be displayed this number of units (not sure if they're pixels or twips or what - doesn't matter) from the top of the screen. Depending on the screen resolution this value will be a different proportion of the screen height. I don't think the physical dimensions of the screen make any difference - it is only the screen resolution that matters. You will be able to test your code by changing your screen resolution from the Control Panel.
You may be better off deciding what fraction of the screen height you want the offset to be and then coding like this. VB Code:
__________________
This world is not my home. I'm just passing through. Add yourself to the VBForums Frappr Map!! |
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|