"data": "Sub CenterForm (Frm As Form)\r\n'-- Places a form in the middle of the screen\r\n \r\n Frm.Left = (Screen.Width - Frm.Width) \\ 2\r\n Frm.Top = (Screen.Height - Frm.Height) \\ 2\r\n\r\nEnd Sub\r\n"
},
{
"ID": "Restartwin()",
"Desc": "Restarts windows",
"data": "REM ** How To Restart Windows **\r\nREM ** Place API below in MODULE **\r\nREM ** (Paul Smith) **\r\nDeclare Function ExitWindows% Lib \"User\" (ByVal dwReserved&, ByVal wReturnCode%)\r\nx% = ExitWindows(66, 66)"
},
{
"ID": "Shell to dos",
"Desc": "Shell to dos from vb",
"data": "Function ToShellToDos (commandline As String) As Long\r\nRem ** API to discover if a program is executing By M.Brewerton 1993**\r\nRem ** Declare Function GetModuleUsage% Lib \"Kernel\" (ByVal hProgram%) **\r\nRem ** Routine To Shell To Dos And Stay In This Routine Until Task Is Complete **\r\n s% = Shell(commandline$) 'shells out with the command in commandline$\r\n While GetModuleUsage(s%) 'checks to see if finished\r\n x% = DoEvents() 'allows it to continue if unfinished.\r\n Wend\r\n ToShellToDos = s% 'returns task ID or error code from function.\r\nEnd Function"