JSEMTS搜尋引擎
 

'**************************************
' Name: Auto resize flexgrid column widt
' hs
' Description:Automatically resize the c
' olumns in any flex grid to give a nice,
' professional appearance.
'
'
'Public sub automatically resizes MS Flex Grid columns to match the width of the text, no matter the size of the grid or the 'number of columns.
' Reads first n number of rows of data, and adjusts column size to match the widest cell of text. Will even expand columns 'proportionately if they aren't wide enough to fill out the entire width of the grid. Configurable constraints allow you to 'designate
' 1) Any flex grid to resize
' 2) Maximum column width
' 3) the maximum number of rows in depth to look for the widest cell of text.
' By: Jonathan W. Lartigue
'
'
' Inputs:msFG (MSFlexGrid) = The name of
' the flex grid to resize .... MaxRowsToPa
' rse (integer) = The maximum number of ro
' ws (depth) of the table to scan for cell
' width (e.g. 50) .... MaxColWidth (Intege
' r) = The maximum width of any given cell
' in twips (e.g. 5000)
'
' Returns:None
'
'Assumes:Simply drop this public sub int
' o your form or module and access it from
' anywhere in your program to automaticall
' y resize any flex grid.
'
'Side Effects:None
'This code is copyrighted and has limite
' d warranties.
'Please see http://www.Planet-Source-Cod
' e.com/xq/ASP/txtCodeId.8547/lngWId.1/qx/
' vb/scripts/ShowCode.htm
'for details.
'**************************************



Public Sub AutosizeGridColumns(ByRef msFG As MSFlexGrid, ByVal MaxRowsToParse As Integer, ByVal MaxColWidth As Integer)
Dim I, J As Integer
Dim txtString As String
Dim intTempWidth, BiggestWidth As Integer
Dim intRows As Integer
Const intPadding = 150


With msFG


For I = 0 To .Cols - 1
' Loops through every column
.Col = I
' Set the active colunm
intRows = .Rows
' Set the number of rows
If intRows > MaxRowsToParse Then intRows = MaxRowsToParse
' If there are more rows of data, reset
' intRows to the MaxRowsToParse constant
'

intBiggestWidth = 0
' Reset some values to 0


For J = 0 To intRows - 1
' check up to MaxRowsToParse # of rows a
' nd obtain
' the greatest width of the cell content
' s

.Row = J

txtString = .Text
intTempWidth = TextWidth(txtString) + intPadding
' The intPadding constant compensates fo
' r text insets
' You can adjust this value above as des
' ired.

If intTempWidth > intBiggestWidth Then intBiggestWidth = intTempWidth
' Reset intBiggestWidth to the intMaxCol
' Width value if necessary
Next J
.ColWidth(I) = intBiggestWidth
Next I
' Now check to see if the columns aren't
' as wide as the grid itself.
' If not, determine the difference and e
' xpand each column proportionately
' to fill the grid
intTempWidth = 0



For I = 0 To .Cols - 1
intTempWidth = intTempWidth + .ColWidth(I)
' Add up the width of all the columns
Next I



If intTempWidth < msFG.Width Then
' Compate the width of the columns to th
' e width of the grid control
' and if necessary expand the columns.
intTempWidth = Fix((msFG.Width - intTempWidth) / .Cols)
' Determine the amount od width expansio
' n needed by each column


For I = 0 To .Cols - 1
.ColWidth(I) = .ColWidth(I) + intTempWidth
' add the necessary width to each column
'

Next I
End If
End With
End Sub






搜尋引擎讓我們程式搜尋結果更加完美
  • 如果您覺得該文件有幫助到您,煩請按下我
  • 如果您覺得該文件是一個一無是處的文件,也煩請按下我

  • 搜尋引擎該文件您看起來是亂碼嗎?您可以切換編碼方式試試看!ISO-8859-1 | latin1 | euc-kr | euc-jp | CP936 | CP950 | UTF-8 | GB2312 | BIG5 |
    搜尋引擎本文件可能涉及色情、暴力,按我申請移除該文件

    搜尋引擎網址長?按我產生分享用短址

    ©2026 JSEMTS

    https://tw.search.yahoo.com/search;_ylt=A8tUwZJ2QE1YaVcAUmFr1gt.;_ylc=X1MDMjExNDcwNTAwMwRfcgMyBGZyA3lmcC10LTkwMC1zLXR3BGdwcmlkAwRuX3JzbHQDMARuX3N1Z2cDMARvcmlnaW4DdHcuc2VhcmNoLnlhaG9vLmNvbQRwb3MDMARwcXN0cgMEcHFzdHJsAwRxc3RybAM4NARxdWVyeQMlRTglQjYlODUlRTUlOEYlQUYlRTYlODQlOUIlRTclOUElODQlRTUlQUYlQjYlRTUlQUYlQjYlMjAlRTglODMlQTElRTUlQUUlODklRTUlQTglOUMEdF9zdG1wAzE0ODE0NTc3OTM-?p=%E8%B6%85%E5%8F%AF%E6%84%9B%E7%9A%84%E5%AF%B6%E5%AF%B6+%E8%83%A1%E5%AE%89%E5%A8%9C&fr2=sb-top-tw.search&fr=yfp-t-900-s-tw&rrjfid=6564670 https://tw.search.yahoo.com/search;_ylt=A8tUwZJ2QE1YaVcAUmFr1gt.;_ylc=X1MDMjExNDcwNTAwMwRfcgMyBGZyA3lmcC10LTkwMC1zLXR3BGdwcmlkAwRuX3JzbHQDMARuX3N1Z2cDMARvcmlnaW4DdHcuc2VhcmNoLnlhaG9vLmNvbQRwb3MDMARwcXN0cgMEcHFzdHJsAwRxc3RybAM4NARxdWVyeQMlRTglQjYlODUlRTUlOEYlQUYlRTYlODQlOUIlRTclOUElODQlRTUlQUYlQjYlRTUlQUYlQjYlMjAlRTglODMlQTElRTUlQUUlODklRTUlQTglOUMEdF9zdG1wAzE0ODE0NTc3OTM-?p=%E8%B6%85%E5%8F%AF%E6%84%9B%E7%9A%84%E5%AF%B6%E5%AF%B6+%E8%83%A1%E5%AE%89%E5%A8%9C&fr2=sb-top-tw.search&fr=yfp-t-900-s-tw&rrjfid=8237847 https://tw.search.yahoo.com/search;_ylt=A8tUwZJ2QE1YaVcAUmFr1gt.;_ylc=X1MDMjExNDcwNTAwMwRfcgMyBGZyA3lmcC10LTkwMC1zLXR3BGdwcmlkAwRuX3JzbHQDMARuX3N1Z2cDMARvcmlnaW4DdHcuc2VhcmNoLnlhaG9vLmNvbQRwb3MDMARwcXN0cgMEcHFzdHJsAwRxc3RybAM4NARxdWVyeQMlRTglQjYlODUlRTUlOEYlQUYlRTYlODQlOUIlRTclOUElODQlRTUlQUYlQjYlRTUlQUYlQjYlMjAlRTglODMlQTElRTUlQUUlODklRTUlQTglOUMEdF9zdG1wAzE0ODE0NTc3OTM-?p=%E8%B6%85%E5%8F%AF%E6%84%9B%E7%9A%84%E5%AF%B6%E5%AF%B6+%E8%83%A1%E5%AE%89%E5%A8%9C&fr2=sb-top-tw.search&fr=yfp-t-900-s-tw&rrjfid=8452690 https://tw.search.yahoo.com/search;_ylt=A8tUwYgkQU1YcXoAUE9r1gt.;_ylc=X1MDMjExN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RTclOUElODQlRTUlQUYlQjYlRTUlQUYlQjYlMjAlRTglODMlQTElRTUlQUUlODklRTUlQTglOUMEdF9zdG1wAzE0ODE0NTc3OTM-?p=%E8%B6%85%E5%8F%AF%E6%84%9B%E7%9A%84%E5%AF%B6%E5%AF%B6+%E8%83%A1%E5%AE%89%E5%A8%9C&fr2=sb-top-tw.search&fr=yfp-t-900-s-tw&rrjfid=4791666 TeasgWebFlow[前往][教學] Windows 10 自動登入104http://jplop2.float-zone.com/[教學] Pi(圓周率)10萬位,100,000 Digits of PichtnewhopefoodFsquan8[教學] 批次文件嵌入和執行VBScript歸檔星球[前往][教學] 「無法確認發行者,您確定要執行這個軟體?」警告解決[資訊] 解決CHROME無法正常使用銀行服務riotgamesciecanextapplehktdc[前往]ntpugift.colaz[前往]Newhigo[前往]computextaipeisparitualfindyourstampsvaluexuyi365[資訊] 台灣2024選舉作票疑雲nuttynuts國立台中科技大學國立台中科技大學044300[前往][前往]http://web3.nutc.edu.tw/~s1711131010/casio[前往][前往]TapaTalkintertek-twnFigma[前往]KingofkingsexplorerJiaoyiAsusWebStorage[教學] Microsoft EDGE 更改預設搜尋引擎歸檔星球[前往][前往]wuangus[教學] 上帝存在的證明SytestwwrandoSdsdsoftesbaversi.ge[前往][前往]wikipedia[前往][教學] 下雪特效fapcatN網N網ofiiiMural[機密] 2023台灣北部女士官私密照cmuh.cmuflexpower[機密] 100%成功減肥方法[教學] ntoskrnl.exe+3f72a0問題Luoxiaojiao[前往]trends.google[前往]adidaswehouse-mediamna.gpwbYamol[前往][分享] 歡迎來到歸檔星球Taisha[前往]WIXwikibusinesspronccu.primo.exlibrisgroup[前往]miestilojewelryLine.MEgod123Yqwml[前往][前往][前往][前往]nealsyardremedies[前往]taitung.pink668Xinbiao-aiclCgezs[教學] Windows ISO下載http://jplop-ki9.softether.net/haooPcnews[前往][前往][前往][前往]cht-pt[前往][前往]ycccotrendmicro[教學] 8種真實拐騙去柬埔寨手法Lin16888keysighthttps://jplop.neocities.org/308308moxa[前往]scandalopedia[前往][前往]Lineag1[分享] Arduino常用函數[前往]Hkepcenlightcorpmio[教學] Chrome解決CORS問題playstationeasyps[教學] 何謂ESGchromewebstore.googleKteam[教學] Linux常用指令[前往]apple77ga[前往]Ppxclub104[前往][前往]http://samsung.jfa.com.tw/?site=1youngnews3631imec.imeifoods[技術] Excel插入很多照片(jpg)後變非常卡[前往]roc-taiwan[教學] 三眼表模擬器(計時碼錶模擬器)PotatoMediacdfholdinggloria-eyewear1010hopegarmindarkmlYichang28wdqWeeblyxyg688X7cqirentcaryourseo70thvictorybastillepost[前往]charmingscitech.nat[前往][前往]iopenmall專情の團員作品精選專情の團員作品精選 [分享] 負面諧音姓名大全:避免取名時誤踩雷globalZltravelChaforumfortunebreedersBc3ts[前往][前往]GuanggufujitsuDayibin[前往][教學] VeraCrypt 指令muziselectmoredigitalchtnetbridgetechanimate-onlineshop[前往]Rock8899銀貂氣血循環機TY510troonindex[前往]aiguajiex_md1ex_md1[教學] KSWeb Android網站伺服器Cari[前往]肯特城天堂[教學] 萬用和弦(鋼琴)thaprobaniannostalgia[教學] Win7/Win8.1升級Win10[前往][教學] 允許匿名連入網路芳齡xn--kbto70ffilm-supply[分享] 利用機器學習檢測網絡釣魚攻擊[前往][教學] Windows 家用版轉專業版voicetubemagforce[前往]Playno1[前往]歸檔星球sym-global[機密] 機密檔案88(紅)[前往]kyoceratwn.mizuno[前往][前往][前往][前往]5278[前往]haidong365InfogramScdmtj[資訊] 專情團[教學] Windows 家用版開啟 Hyper-Vwordvice[前往]social-labyannick[前往]gandiasics[前往][分享] 悲傷的五個階段Grok[前往]IdcpfnewstaiwanQoos[前往]Blogger[前往]pc590[前往]wisechipbutygoconvergence-eq[前往]msiApk[資訊] 2021防毒軟體排行[教學] 吸引力法則[前往][前往]OptionShareoffsetstudiodreammallyuanshuo[技術] Chrome關閉SSL憑證檢查Ywhhg[技術] Chrome 書籤救回、使用者設定檔誤刪除shybao[前往][前往][前往]thenewslens[前往]twitwswenk-media[前往]anahcl-softwaretoneozdot-st[前往]imarketing.iwant-infumankong1clarins[前往]official.meetbao[前往]cooltopdfd.video.nchuuptogo學生貸款學生貸款hmly666http://jplop32.asuscomm.com/kingstone[前往]瑞銓藝術鍛造生產提供藝術鍛造門、鍛造欄杆、鍛造扶手、鍛造防盜窗、鍛造採光罩、鍛造信箱、鍛造門牌、鍛造飾屏、鍛造精品、鍛造門窗。[前往][教學] 模擬器、ROMSestate-blogIT TOP Blog