很簡單,調用explorer.exe就可以,例如要開啟H:/CD1並且選中其中的readme.rtf:Private Sub Command1_Click() Shell "Explorer /select, H:/CD1/readme.rtf", vbNormalFocusEnd Sub[Windows Explorer Switches]Windows Explorer switches are useful in creating rooted folders:
'Module1Option ExplicitPublic Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPublic Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA"
public class RandomSort { /** * 產生1-10的10個隨機不重複的數,並按從小到大排序 * @param args */ public static void main(String[] args) { int a[] = new int[10]; int i = 0; while (i < 10) { int rand = (int) (Math.random() * 10 + 1); if
Here's how to save a web page as a single file (mht format) using Delphi code:uses CDO_TLB, ADODB_TLB;...procedure WB_SaveAs_MHT(WB: TWebBrowser; FileName: TFileName);var Msg: IMessage; Conf: IConfiguration; Stream: _Stream; URL :
Creating Dynamic Factories in .NET Using ReflectionRomi KovacsDownload the code for this article: DesignPatterns0303.exe (79KB)As software development has grown over the years, patterns in the way developers write code began to emerge. Often there
public class DeadLock { public static void main(String[] args) { // 2個資源 final Object resource1 = "resource1"; final Object resource2 = "resource2"; // 第一個線程,想先佔有resource1,再嘗試著佔有resource2 Thread t1 = new Thread() { public void run()