[轉貼] 讓工作列上的按鈕不顯示最近開啟的項目(Windows 7)

http://www.soft4fun.net/tips/%E8%AE%93%E5%B7%A5%E4%BD%9C%E5%88%97%E4%B8%8A%E7%9A%84%E6%8C%89%E9%88%95%E4%B8%8D%E9%A1%AF%E7%A4%BA%E6%9C%80%E8%BF%91%E9%96%8B%E5%95%9F%E7%9A%84%E9%A0%85%E7%9B%AE%EF%BC%88windows-7%EF%BC%89.htm

「最近開啟的文件」這個功能在 XP 就有許多網友反應想把它關掉,當時我也發表了XP關閉這個功能的方法。最近升級到 Windows 7後,這個問題又出現了… 只不過名稱變成「最近開啟的項目」

win7-01

「最近開啟的項目」雖然可以讓你快速開啟檔案,但如果是在公用電腦上,有時不想讓他人知道自己瀏覽了哪些項目,因此得停止系統繼續紀錄,並刪除紀錄。在Windoows7中,關閉「最近開啟的項目」的設定方法很簡單,兩個步驟就可以完成:

Step 1

在開始功能表上按「滑鼠右鍵」→【內容】

win7-02

Step 2

切換到〔[開始]功能表〕標籤,將「儲存最近開啟的項目並顯示於[開始]功能表和工作列」取消溝選→按〔確定〕完成設定。

win7-03

完成設定後,你會發現最近開啟的紀錄都消失了。

[資料庫] MS SQL DD製作


Declare @bastable Varchar(50)
Set @bastable = '[TableName]'

select 
    dt.name [Table_name] , C.name [Column_name] , 
    case
when T.name in ('datetime', 'smalldatetime', 'int', 'smallint') then T.name
when T.name In ( 'numeric' ) then T.name + '(' + CAST(ISNULL(C.prec, C.length) AS varchar(50)) + ',' + CAST(C.scale as varchar(50) ) + ')'
when T.name In ( 'nvarchar' ) then T.name + '(' + CAST(C.length/2 AS varchar(50)) + ')'
else T.name + '(' + CAST(C.length AS varchar(50)) + ')'
    end [Type] ,
    T.name [ColType],
    case
when T.name in ( 'int', 'smallint' , 'tinyint' ) then 'Int32'
when T.name in ( 'smalldatetime', 'datetime' , 'datet' ) then 'DateTime?'
when T.name in ( 'bit' ) then 'Boolean'
when T.name in ( 'real' ) then 'float'
else 'String'
    end [C#Type],
    case
when T.name in ( 'int', 'smallint' , 'tinyint' ) then 'Convert.ToInt32'
when T.name in ( 'real' ) then 'Convert.ToSingle'
when T.name in ( 'smalldatetime', 'datetime' , 'datet' ) then 'MyConvert.ToDateTime'
when T.name in ( 'bit' ) then 'Convert.ToBoolean'
else 'Convert.ToString'
    end [C#Type],
    case
when T.name in ( 'int', 'smallint' , 'tinyint' ) then 'GenSqlStr.DataType.Int'
when T.name in ( 'real' ) then 'GenSqlStr.DataType.Float'
when T.name in ( 'smalldatetime', 'datetime' , 'date' ) then 'GenSqlStr.DataType.Datetime'
when T.name in ( 'bit' ) then 'GenSqlStr.DataType.Int'
when T.name in ( 'nvarchar' ) then 'GenSqlStr.DataType.NVarchar'
else 'GenSqlStr.DataType.Varchar'
    end [C#SQLType],
    case
when T.name in ( 'nvarchar' , 'varchar' , 'char' ) then '=String.Empty;'
when T.name in ( 'int', 'smallint' ) then '=-1;'
when T.name in ( 'tinyint' ) then '=0;'
when T.name in ( 'real' ) then '=0;'
else ';'
    end [C#SQLType2],    
    convert(varchar(100) ,P.value)  [Desc1]
From (
  select id
, name
  from
  sys.SysObjects
  where
  xtype = 'U' ) dt
Left Join sys.SysColumns C On C.id=dt.id
Left Join sys.extended_properties P On C.ID=P.Major_Id And C.ColId=P.Minor_id
Left JOIN sys.SysTypes T ON C.xtype = T.xusertype
Where dt.name = @bastable
order by C.colorder

[轉貼]VB自動更新-下載

[轉貼]VB自動更新-下載
http://ithelp.ithome.com.tw/question/10054525?tab=opinion

 

Private Declare Function DoFileDownload Lib "shdocvw.dll" _
(ByVal lpszFile As String) As Long
  
Private Sub Command1_Click()
Dim sFileUrl As String
sFileUrl = StrConv("http://123.194.15.246/ezs/ip.php", vbUnicode)
DoFileDownload sFileUrl
End Sub

'=======================================================

Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
    "URLDownloadToFileA" (ByVal pCaller As Long, _
    ByVal szURL As String, _
    ByVal szFileName As String, _
    ByVal dwReserved As Long, _
    ByVal lpfnCB As Long) As Long
Private Sub Command1_Click()
    Dim lReturn As Long
  
    lReturn = URLDownloadToFile(0, "http://www.hosp.ncku.edu.tw/~cww/index.htm", "C:\index.html", 0, 0)
  
    If lReturn = 0 Then
        MsgBox "Download Complete.", vbInformation + vbOKOnly
    End If
End Sub