کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی
کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی

تغییر نشانگر ماوس ( MousePointer )


خود اکسس Screen.MousePointer را دارد ولی بعضی کرسرها ؛  برای لود و تنظیم کرسرهای مختلف در فایل مرتبطش استفاده از توابع API  و دو تابع LoadCursorA و SetCursor  از فایل User32.Dll


کرسر شکل دست 


(SetCursor(LoadCursorA(0,&H32649



کد ارورهای دیتا فرمت اینپوت ماسک داپلیکیت ولیو

Event : Error 


2279The value you entered isn't appropriate for the input mask '|' specified for this field.@@@2@1@9118@1


2077This Recordset is not updatable


2167This property is read-only and can't be modified.@@@1@@@1


3314You must enter a value in the '|' field.


3315Field '|' cannot be a zero-length string.


2237The text you entered isn't an item in the list.@Select an item from the list, or enter text that matches one of the listed items.@@1@@@1


3022The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.


2113The value you entered isn't valid for this field.@For example, you may have entered text in a numeric field or a number that is larger than the FieldSize setting permits.@@1@@@1



2169You can't save this record at this time.@Microsoft Access may have encountered an error while trying to save a record. If you close this object now, the data changes you made will be lost. Do you want to close the database object anyway?@@20@@@2

عدم نمایش پیام کمبوباکس درصورت مچ نشدن مقدار تکست باکس کمبو با لیست باکس کمبو



♧استفاده از رویداد NotInList کمبو باکس♧



پراپرتی LimitToList حتما باید Yes باشد 


.NotInList (NewDataResponse)

Response=0 Or Response=acDataErrContinue


دسترسی به فایل یا فولدر توسط FileSystemObject و پراپرتیهای درایو فایل فولدر



Drive Properties:

AvailableSpace, DriveLetter, DriveType, FileSystem, FreeSpace,IsReady, 

Path, RootFolder, SerialNumber, ShareName, TotalSize, VolumeName

DrivesCollection properties: Count, Item



:File Properties

Attributes, DateCreated, DateLastAccessed, DateLastModified,Drive,

Name, ParentFolder, Path, ShortName, ShortPath, Size, Type

File Methods: .copy, .Delete, .Move, .OpenAsTextStream


:Folder Properties

Attributes, DateCreated, DateLastAccessed, DateLastModified,Drive,
Files, IsRootFolder, Name, ParentFolder, Path,
Folder Methods: .copy, .CreateTextFile, .Delete, .Move
ShortName, ShortPath, Size, SubFolders, Type

FoldersCollection properties: Count, Item
FoldersCollection MethodsAdd

Files Properties





Properties

AtEndOfLineReturns true if the file pointer is positioned immediately before the end-of-line marker in a TextStream file; false if it is not.
AtEndOfStreamReturns true if the file pointer is at the end of a TextStream file; false if it is not.
AttributesSets or returns the attributes of files or folders.
AvailableSpaceReturns the amount of space available to a user on the specified drive or network share.
ColumnReturns the column number of the current character position in a TextStream file.
CompareModeSets and returns the comparison mode for comparing string keys in a Dictionary object
CountReturns the number of items in a collection or Dictionary object.
DateCreatedReturns the date and time that the specified file or folder was created. Read-only.
DateLastAccessedReturns the date and time that the specified file or folder was last accessed.
DateLastModifiedReturns the date and time that the specified file or folder was last modified.
DriveReturns the drive letter of the drive on which the specified file or folder resides.
DriveLetterReturns the drive letter of a physical local drive or a network share.
DrivesReturns a Drives collection consisting of all Drive objects available on the local machine.
DriveTypeReturns a value indicating the type of a specified drive.
FilesReturns a Files collection consisting of all File objects contained in the specified folder, including those with hidden and system file attributes set.
FileSystemPropertyReturns the type of file system in use for the specified drive.
FreeSpaceReturns the amount of free space available to a user on the specified drive or network share.
IsReadyReturns true if the specified drive is ready; false if it is not.
IsRootFolderReturns true if the specified folder is the root folder; false if it is not.
ItemSets or returns an item for a specified key in a Dictionary object. For collections, returns an item based on the specified key.
KeySets a key in a Dictionary object.
LineReturns the current line number in a TextStream file.
NameSets or returns the name of a specified file or folder.
ParentFolderReturns the folder object for the parent of the specified file or folder.
PathReturns the path for a specified file, folder, or drive.
RootFolderReturns a Folder object representing the root folder of a specified drive.
SerialNumberReturns the decimal serial number used to uniquely identify a disk volume.
ShareNameReturns the network share name for a specified drive.
ShortNameReturns the short name used by programs that require the earlier 8.3 naming convention.
ShortPathReturns the short path used by programs that require the earlier 8.3 file naming convention.
SizeFor files, returns the size, in bytes, of the specified file. For folders, returns the size, in bytes, of all files and subfolders contained in the folder.
SubFoldersReturns a Folders collection consisting of all folders contained in a specified folder, including those with hidden and system file attributes set.
TotalSizeReturns the total space, in bytes, of a drive or network share.
TypeReturns information about the type of a file or folder.
VolumnNameSets or returns the volume name of the specified drive.

اطلاعات فیلتر در فرایند تصویر ImageProcess

ImageProcess.FilterInfos    


RotateFlip...Rotates, in 90 degree increments, and Flips, horizontally or vertically.


RotationAngle  - Set the RotationAngle property to 90, 180, or 270 if you wish

                 to rotate, otherwise 0 [the default]

FlipHorizontal - Set the FlipHorizontal property to True if you wish to flip

                 the image horizontally, otherwise False [the default]

FlipVertical   - Set the FlipVertical property to True if you wish to flip

                 the image vertically, otherwise False [the default]

FrameIndex     - Set the FrameIndex property to the index of a frame if you

                 wish to modify a frame other than the ActiveFrame,

                 otherwise 0 [the default]

Crop...Crops the image by the specified Left, Top, Right, and Bottom margins.


Left       - Set the Left property to the left margin (in pixels)

             if you wish to crop along the left, otherwise 0 [the default]

Top        - Set the Top property to the top margin (in pixels)

             if you wish to crop along the top, otherwise 0 [the default]

Right      - Set the Right property to the right margin (in pixels)

             if you wish to crop along the right, otherwise 0 [the default]

Bottom     - Set the Bottom property to the bottom margin (in pixels)

             if you wish to crop along the bottom, otherwise 0 [the default]

FrameIndex - Set the FrameIndex property to the index of a frame if you

             wish to modify a frame other than the ActiveFrame,

             otherwise 0 [the default]

Scale...Scales image to the specified Maximum Width and Maximum Height preserving

Aspect Ratio if necessary.


MaximumWidth        - Set the MaximumWidth property to the width (in pixels)

                      that you wish to scale the image to.

MaximumHeight       - Set the MaximumHeight property to the height (in pixels)

                      that you wish to scale the image to.

PreserveAspectRatio - Set the PreserveAspectRatio property to True

                      [the default] if you wish to maintain the current aspect

                      ration of the image, otherwise False and the image will

                      be stretched to the MaximumWidth and MaximumHeight

FrameIndex          - Set the FrameIndex property to the index of a frame if

                      you wish to modify a frame other than the ActiveFrame,

                      otherwise 0 [the default]

Stamp...Stamps the specified ImageFile at the specified Left and Top coordinates.


ImageFile  - Set the ImageFile property to the ImageFile object that you wish

             to stamp

Left       - Set the Left property to the offset from the left (in pixels)

             that you wish to stamp the ImageFile at [default is 0]

Top        - Set the Top property to the offset from the top (in pixels) that

             you wish to stamp the ImageFile at [default is 0]

FrameIndex - Set the FrameIndex property to the index of a frame if you wish to

             modify a frame other than the ActiveFrame, otherwise 0

             [the default]

Exif...Adds/Removes the specified Exif Property.


Remove     - Set the Remove property to True if you wish to remove the

             specified Exif property, otherwise False [the default] to add the

             specified exif property

ID         - Set the ID property to the PropertyID you wish to Add or Remove

Type       - Set the Type property to indicate the WiaImagePropertyType of the

             Exif property you wish to Add (ignored for Remove)

Value      - Set the Value property to the Value of the Exif property you wish

             to Add (ignored for Remove)

FrameIndex - Set the FrameIndex property to the index of a frame if you

             wish to modify a frame other than the ActiveFrame,

             otherwise 0 [the default]

Frame...Adds/Removes the specified Frame.


Remove     - Set the Remove property to True if you wish to remove the

             specified FrameIndex, otherwise False [the default] to Insert the

             ImageFile before the specified FrameIndex

ImageFile  - Set the ImageFile property to the ImageFile object whose

             ActiveFrame that you wish to add (ignored for Remove)

FrameIndex - For Remove, set the FrameIndex property to the index of the frame

             you wish to remove, otherwise for add, set the FrameIndex to the

             index of the frame to insert the ImageFile before, otherwise 0

             [the default] to append a frame from the ImageFile specified

ARGB...Updates the image bits with those specified.


ARGBData -   Set the ARGBData property to the Vector of Longs that represent

             the ARGB data for the specified FrameIndex (the width and height

             must match)

FrameIndex - Set the FrameIndex property to the index of the frame whose ARGB

             data you wish to modify, otherwise 0 [the default] to modify the

             ActiveFrame

Convert...Converts the resulting ImageFile to the specified type.


FormatID    - Set the FormatID property to the supported raster image format

              desired, currently you can choose from wiaFormatBMP,

              wiaFormatPNG, wiaFormatGIF, wiaFormatJPEG, or wiaFormatTIFF

Quality     - For a JPEG file, set the Quality property to any value from 1 to

              100 [the default] to specify quality of JPEG compression

Compression - For a TIFF file, set the Compression property to CCITT3, CCITT4,

              RLE or Uncompressed to specify the compression scheme,

              otherwise LZW [the default]







WIA.WIDTH

WIA.HEIGHT



تایمر در توابع API

مربوط به 32 بیت 


Declare Function SetTimer Lib “user32” (ByVal hWnd As Long, ByVal nIDEvent_ As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long

Declare Function KillTimer Lib “user32” (ByVal hWnd As Long, _ ByVal nIDEvent As Long) As Long


Dim timerID As Long

Create a timer that sends a notification every 500'

milliseconds. 

(timerID = SetTimer(0, 0, 500, AddressOf Timer_CBK



Destroy the timer created previously '

KillTimer  0,timerID


Sub Timer_CBK(ByVal hWnd As Long, ByVal uMsg As Long, _ ByVal idEvent As Long, ByVal SysTime As Long)

 Just display the system time in a label control '

Form1.lblTimer = SysTime 

End Sub



پیمایش در تب کنترل با Shift+PageUp


Shift Constants

KeyCode Constants

()TabCtl

TabCtl.Pages.Count

TabCtl.Pages(Index).Controls

غیرفعال کردن کلیدها در فرم


استفاده از رویداد فرضا KeyDown و  شرط  ( ذکر ثابت های کدکلیدها که رزرو شده اند  یا KeyCode Constants که باید غیرفعال شوند طبق تصویر زیر )  و صفر قرار دادن پارامتر آرگومان KeyCode در رویه ی مربوطه 




اصلاح شی imagefile



برای اینکار استفاده از مجموعه ی Filters ، تنظیم پراپرتی مربوطه و نهایتا استفاده ازمتد Apply از شی ImageProcess برای فیلتر کردن شی imagefile 




زنجیره ی فیلتر را مدیریت میکند و از CreateObject برای ایجاد شی  imageprocess  استفاده میکنیم طبق تصویر داکیونت خود آفیس




بازیابی مجموعه ای از فیلترها که در این فرآیند بکار گرفته می شود 



ایجاد فیلتر جدید در مجموعه ی Filters




بازیابی مجموعه ای از تمام فیلترهای دردسترس 




برای اضافه کردن فیلتر به  زنجیره ی فیلتر به FilterId از پر اپرتی های filterinfo احتیاج است 





RotateFlip = Rotates in 90 degree increments and Flips, horizontally or vertically.
RotationAngle - Set the RotationAngle property to 90, 180, or 270 if you wish
to rotate, otherwise 0 [the default]
FlipHorizontal - Set the FlipHorizontal property to True if you wish to flip
the image horizontally, otherwise False [the default]
FlipVertical - Set the FlipVertical property to True if you wish to flip
the image vertically, otherwise False [the default]
FrameIndex - Set the FrameIndex property to the index of a frame if you
wish to modify a frame other than the ActiveFrame,
otherwise 0 [the default]
Crop = Crops the image by the specified Left, Top, Right, and Bottom margins.

Left - Set the Left property to the left margin (in pixels)
if you wish to crop along the left, otherwise 0 [the default]
Top - Set the Top property to the top margin (in pixels)
if you wish to crop along the top, otherwise 0 [the default]
Right - Set the Right property to the right margin (in pixels)
if you wish to crop along the right, otherwise 0 [the default]
Bottom - Set the Bottom property to the bottom margin (in pixels)
if you wish to crop along the bottom, otherwise 0 [the default]
FrameIndex - Set the FrameIndex property to the index of a frame if you
wish to modify a frame other than the ActiveFrame,
otherwise 0 [the default]
Scale = Scales image to the specified Maximum Width and Maximum Height preserving
Aspect Ratio if necessary.
MaximumWidth - Set the MaximumWidth property to the width (in pixels)
that you wish to scale the image to.
MaximumHeight - Set the MaximumHeight property to the height (in pixels)
that you wish to scale the image to.
PreserveAspectRatio - Set the PreserveAspectRatio property to True
[the default] if you wish to maintain the current aspect
ration of the image, otherwise False and the image will
be stretched to the MaximumWidth and MaximumHeight
FrameIndex - Set the FrameIndex property to the index of a frame if
you wish to modify a frame other than the ActiveFrame,
otherwise 0 [the default]
Stamp = Stamps the specified ImageFile at the specified Left and Top coordinates.

ImageFile - Set the ImageFile property to the ImageFile object that you wish
to stamp
Left - Set the Left property to the offset from the left (in pixels)
that you wish to stamp the ImageFile at [default is 0]
Top - Set the Top property to the offset from the top (in pixels) that
you wish to stamp the ImageFile at [default is 0]
FrameIndex - Set the FrameIndex property to the index of a frame if you wish to
modify a frame other than the ActiveFrame, otherwise 0
[the default]
Exif = Adds/Removes the specified Exif Property.

Remove - Set the Remove property to True if you wish to remove the
specified Exif property, otherwise False [the default] to add the
specified exif property
ID - Set the ID property to the PropertyID you wish to Add or Remove
Type - Set the Type property to indicate the WiaImagePropertyType of the
Exif property you wish to Add (ignored for Remove)
Value - Set the Value property to the Value of the Exif property you wish
to Add (ignored for Remove)
FrameIndex - Set the FrameIndex property to the index of a frame if you
wish to modify a frame other than the ActiveFrame,
otherwise 0 [the default]
#6: Frame = Adds/Removes the specified Frame.
Remove - Set the Remove property to True if you wish to remove the
specified FrameIndex, otherwise False [the default] to Insert the
ImageFile before the specified FrameIndex
ImageFile - Set the ImageFile property to the ImageFile object whose
ActiveFrame that you wish to add (ignored for Remove)
FrameIndex - For Remove, set the FrameIndex property to the index of the frame
you wish to remove, otherwise for add, set the FrameIndex to the
index of the frame to insert the ImageFile before, otherwise 0
[the default] to append a frame from the ImageFile specified
#7: ARGB = Updates the image bits with those specified.
ARGBData - Set the ARGBData property to the Vector of Longs that represent
the ARGB data for the specified FrameIndex (the width and height
must match)
FrameIndex - Set the FrameIndex property to the index of the frame whose ARGB
data you wish to modify, otherwise 0 [the default] to modify the
ActiveFrame
#8: Convert = Converts the resulting ImageFile to the specified type.
FormatID - Set the FormatID property to the supported raster image format
desired, currently you can choose from wiaFormatBMP,
wiaFormatPNG, wiaFormatGIF, wiaFormatJPEG, or wiaFormatTIFF
Quality - For a JPEG file, set the Quality property to any value from 1 to
100 [the default] to specify quality of JPEG compression
Compression - For a TIFF file, set the Compression property to CCITT3, CCITT4,
RLE or Uncompressed to specify the compression scheme,
otherwise LZW [the default]

فرضا برای پراپرتی MaximumHeight از Scale در filterinfos استفاده میشود 
متد ImageFile برای بارگذاری و ذخیره 



بکار بستن فیلتر به شی ImageFile یا بعبارتی تغییر پراپرتی مربوطه
 بدین ترتیب اول لود فایل ( LoadFile ) بعد استفاده از متد ImageProcess.Apply
 و نهایتا ذخیره ی فایل با متد SaveFile


ایجاد imageFile 
ایجاد imageprocess
ایجاد فیلتر با filters.add  به  شی imageProcess
استفاده از FilterInfos و FilterId  از شی imageProcess
استفاده از filters و properties از شی imageProcess
لود فایل توسط متد imageFile 
تنظیم آبجکت imageFile برای استفاده از متد Apply از imageProcess
ذخیره ی فایل با استفاده از متد SaveFile مربوط به شی imageFile

افعال حسی






افعال حسی در زبان انگلیسی | گرامر، کاربرد و لیست افعال حسی انگلیسی

۳.۷ (۷۴.۲۹%) ۱۴ vote[s]

افعال حسی در زبان انگلیسی

افعال حسی به افعالی گفته میشود که به حواس پنج گانه مربوط میشوند. لیست افعال حسی در انگلیسی را در جدول زیر مشاهده کنید.

معنی افعال حسیافعال حسی انگلیسی
دیدنsee
حس کردنfeel
گوش دادنlisten
متوجه شدن، دیدنnotice
تماشا کردنwatch
پیدا کردن، یافتنfind
شنیدنhear
بوییدنsmell

ساختار جملاتی که افعال حسی دارند

بعد از افعال حسی در داخل جملات از مصدر بدون to (شکل ساده فعل) و یا فعل ing دار به کار میرود. که هر کدام از این ساختارها معنی متفاوتی دارند. هنگامی که بخواهیم بگوییم که کل عملی را شنیده و یا دیده ایم از مصدر بدون to استفاده میکنیم و اگر بخواهیم بگوییم که بخشی از عمل را شنیده یا دیده ایم از فعل ing دار بعد از افعال حسی استفاده میکنیم. فرمول این دو ساختار را در زیر مشاهده میکنید:

ساختار جملات دارای فعل حسی

مثال از افعال حسی در داخل جملات‏

به معنی هر مثال دقت کنید تا تفاوت کاربرد مصدر بدون to و فعل ing دار را بعد از فعل حسی متوجه شوید.

saw her wash the dishes.

او را دیدم که ظرف ها را شست. (کل عمل را از ابتدا تا انتها دیدم)

saw her washing the dishes.

او را در حال شستن ظرف ها دیدم. (بخشی از عمل را دیدم)

ابزار مدیریتی ویندوز WMIC



ابزار مدیریتی ویندوز یا متشکل از مجموعه‌ای از ابزارهای جانبی برای مدیریت ویندوز می‌باشد و به عنوان رابطی بین سیستم عامل و بخش‌های مختلف عمل می‌کند به گونه‌ای که در صورت نیاز به هر گونه اطلاعاتی سیستم از طریق این ابزارها با بخش‌های مختلف ارتباط برقرار کرده و اطلاعات لازم را دریافت می‌کند






wmic diskdrive get serial number



کیو آر کد


("Hex("&H3F" Xor  "&HE3?

گرفتن کاراکتر

(Chr(&H3F?








تاریخ ساخت فایل




("Set fso = CreateObject("Scripting.FileSystemObject

(Set f = fs.GetFile(fso

f.DateCreated




.("CreateObject("Scripting.FileSystemObjec?

GetFile(CurrentProject.FullName).DateCreated

جستجو داخل تکست


(instr(Start,String,Searchstring



پسورد دیتابیس جدول لینک شده در اکسس


تنها پسوردی که در فایل اکسس کد نشده  پسورد دیتابیس جدول لینک شده است که براحتی میتوان از فایل استخراج نمود