powered by simpleCommunicator - 2.0.60     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Visual Basic [игнор отключен] [закрыт для гостей] / Еще вот какой вопрос...
5 сообщений из 5, страница 1 из 1
Еще вот какой вопрос...
    #32319592
AloneWarlock
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Хочу сделать так что бы при запуске программы с определенным ключом (напр. c:\qwerty.exe /q), прога выполняла те или иные действия.Нутром чувствую что просто , но сам додумать не могу
...
Рейтинг: 0 / 0
Еще вот какой вопрос...
    #32319647
Фотография big-duke
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Visual Basic for Applications Reference

Command Function


Returns theargument portion of thecommand line used to launch Microsoft Visual Basic or an executable program developed with Visual Basic.

...
Рейтинг: 0 / 0
Еще вот какой вопрос...
    #32320310
AloneWarlock
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Боже, ну почему никакой конкретики
...
Рейтинг: 0 / 0
Еще вот какой вопрос...
    #32320551
Фотография big-duke
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
а msdn у тебя есть ?
если нет то вот

Visual Basic for Applications Reference

Command Function Example
This example uses the Command function to get the command line arguments in a function that returns them in a Variant containing an array.

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
Function GetCommandLine(Optional MaxArgs)
   'Declare variables.
   Dim C, CmdLine, CmdLnLen, InArg, I, NumArgs
   'See if MaxArgs was provided.
   If IsMissing(MaxArgs) Then MaxArgs =  10 
   'Make array of the correct size.
   ReDim ArgArray(MaxArgs)
   NumArgs = 0: InArg = False
   'Get command line arguments.
   CmdLine = Command()
   CmdLnLen = Len(CmdLine)
   'Go thru command line one character
   'at a time.
   For I =  1  To CmdLnLen
      C = Mid(CmdLine, I,  1 )
      'Test for space or tab.
      If (C <> " " And C <> vbTab) Then
         'Neither space nor tab.
         'Test if already in argument.
         If Not InArg Then
         'New argument begins.
         'Test for too many arguments.
            If NumArgs = MaxArgs Then Exit For
            NumArgs = NumArgs + 1
            InArg = True
         End If
         'Concatenate character to current argument.
         ArgArray(NumArgs) = ArgArray(NumArgs) & C
      Else
         'Found a space or tab.
         'Set InArg flag to False.
         InArg = False
      End If
   Next I
   'Resize array just enough to hold arguments.
   ReDim Preserve ArgArray(NumArgs)
   'Return Array in Function name.
   GetCommandLine = ArgArray()
End Function


...
Рейтинг: 0 / 0
Еще вот какой вопрос...
    #32320922
AloneWarlock
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Спасибо всё отлично работает
...
Рейтинг: 0 / 0
5 сообщений из 5, страница 1 из 1
Форумы / Visual Basic [игнор отключен] [закрыт для гостей] / Еще вот какой вопрос...
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]