При закрытии подписчики были переданы в рассылку "Интернет для бизнеса и не только" на которую и рекомендуем вам подписаться.
Вы можете найти рассылки сходной тематики в Каталоге рассылок.
Visual Basic: новости сайтов, советы, примеры кодов Новости сайта 'Все о Паскале' Все про Pascal
ok = "sobakadrugcheloveka" If ok Like "sobaka*" Then MsgBox "Попадос!"
If Right$("переменная",6)="sobaka" then ...
Dim ss, sss As String ss = Text1.Text sss = Mid(ss, 1, 6) if sss = "sobaka" then MsgBox sss else msgbox "Не собака !!!" end if
if Left$(txtTextBox1.text, 6) = "Образец" then ...
Private Sub Command1_Click() ' получаем первые шесть символов и сравниваем их ' c образцом в нижнем регистре If LCase(Mid$(Me.Text1.Text, 1, 6)) = "sobaka" Then ' тут прописываем ссылку на действия или ' cами действия в случае истины MsgBox "Hello!" ' тут выскакивает мессаж ПРИВЕТ (по англицки) Else ' прописываем действия при отрицательном результате ' или убераем оператор Else End If End Sub
if MID(str,1,6)="123456" then msgbox "Est" 'Mid(строка,начальный символ,скока символов)=Строка
Private Sub Text1_Change() Static slovo As String Static alltxt As String slovo = "собака" alltxt = Text1.Text If Left(alltxt, Len(slovo)) = slovo Then MsgBox "Вы написали" & slovo End If End Sub
if mid(textbox1.text, 1, 6) = "sobaka" then ....
Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" _ Alias "SHEmptyRecycleBinA" (ByVal hWnd As Long, ByVal pszRootPath _ As String, ByVal dwFlags As Long) As Long Const SHERB_NOPROGRESSUI = &H2 Private Sub Command1_Click() Call SHEmptyRecycleBin(Me.hWnd, "", SHERB_NOPROGRESSUI) End Sub
Private Declare Function PathFileExists Lib "shlwapi.dll" _ Alias "PathFileExistsA" (ByVal pszPath As String) As Long MsgBox PathFileExists("c:\windows\win.exe")
Declare Function PathFileExists Lib "shlwapi.dll" Alias "PathFileExistsA" (ByVal pszPath As String) As Long Function DoesFileExisting(ByVal strPath As String) As Boolean DoesFileExisting = PathFileExists(strPath) End Function MsgBox DoesFileExisting("c:\windows\win.exe")
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long Const MIIM_TYPE = &H10 Const MFT_RIGHTJUSTIFY = &H4000 Const MFT_STRING = &H0& Private Declare Function GetMenuItemInfo Lib "user32" _ Alias "GetMenuItemInfoA" (ByVal hMenu As Long, ByVal _ un As Long, ByVal b As Boolean, lpMenuItemInfo As MENUITEMINFO) As Long Private Declare Function SetMenuItemInfo Lib "user32" _ Alias "SetMenuItemInfoA" (ByVal hMenu As Long, ByVal _ un As Long, ByVal bool As Boolean, lpcMenuItemInfo As MENUITEMINFO) As Long Private Type MENUITEMINFO cbSize As Long fMask As Long fType As Long fState As Long wID As Long hSubMenu As Long hbmpChecked As Long hbmpUnchecked As Long dwItemData As Long dwTypeData As String cch As Long End Type Private Sub Command1_Click() Dim MnuInfo As MENUITEMINFO mnuH& = GetMenu(Me.hwnd) MnuInfo.cbSize = Len(MnuInfo) myTemp& = GetMenuItemInfo(mnuH&, 0, True, MnuInfo) MnuInfo.fType = MFT_RIGHTJUSTIFY Or MFT_STRING MnuInfo.cch = Len("MenuCaption") MnuInfo.dwTypeData = "MenuCaption" MnuInfo.cbSize = Len(MnuInfo) myTemp& = SetMenuItemInfo(mnuH&, 0, True, MnuInfo) myTemp& = DrawMenuBar(Me.hwnd) End Sub