如果要更新 DataSet,並將這些更新傳回資料庫,請依照下列步驟執行:

啟動 Visual Studio 2005 或 Visual Studio .NET。
在 Visual C# 中建立新的主控台應用程式。根據預設,Visual Studio 會建立靜態類別以及空的 Main() 程序。
請確定專案含有 SystemSystem.Data 命名空間的參照。請對 SystemSystem.DataSystem.Data.SqlClient 命名空間使用 using 陳述式,如此您就不必在後面的程式碼中限定這些命名空間的宣告。您必須先使用這些陳述式,才能進行任何其他宣告。


using System;
using System.Data;
using System.Data.SqlClient;




您必須先將資訊載入 DataSet 中,才可以修改資料並將變更傳送回資料庫。如需詳細的程序,請參閱 314145  (https://support.microsoft.com/kb/314145/ ) 。為了避免重複,我們就不再詳細列出這個步驟中的程式碼。
下列程式碼中的連線字串會指向位於本機電腦上的 SQL Server (或者是執行該程式碼的電腦)。簡單的說就是會建立連線,然後建立用於在 DataSet 中填入資料的資料配接器。
注意 您必須將 User ID <username> 和 password<strong password> 變更為正確的值,才能執行這個程式碼。請確認 User ID 具有適當的權限,可以在資料庫上執行此操作。


string sConnectionString;

// Modify the following string to correctly connect to your SQL Server.
sConnectionString = "Password=<strong password>;User ID=<username>;"
+ "Initial Catalog=pubs;"
+ "Data Source=(local)";

SqlConnection objConn
= new SqlConnection(sConnectionString);
objConn.Open();

// Create an instance of a DataAdapter.
SqlDataAdapter daAuthors
= new SqlDataAdapter("Select * From Authors", objConn);

// Create an instance of a DataSet, and retrieve data from the Authors table.
DataSet dsPubs = new DataSet("Pubs");
daAuthors.FillSchema(dsPubs,SchemaType.Source, "Authors");
daAuthors.Fill(dsPubs,"Authors");




現在資料已經載入,您可以進行修改了。有許多方法可以加入資料列 (或記錄)。此程式碼範例使用了包含三個步驟的程序:

  • DataTable 取得新的 DataRow 物件。

  • 依需要設定 DataRow 欄位值。

  • 將該新物件傳入 DataTable.Rows 集合的 Add 方法中。


請在步驟 4 中的程式碼之後貼上下列程式碼:


//****************
// BEGIN ADD CODE
// Create a new instance of a DataTable.
DataTable tblAuthors;
tblAuthors = dsPubs.Tables["Authors"];

DataRow drCurrent;
// Obtain a new DataRow object from the DataTable.
drCurrent = tblAuthors.NewRow();

// Set the DataRow field values as necessary.
drCurrent["au_id"] = "993-21-3427";
drCurrent["au_fname"] = "George";
drCurrent["au_lname"] = "Johnson";
drCurrent["phone"] = "800 226-0752";
drCurrent["address"] = "1956 Arlington Pl.";
drCurrent["city"] = "Winnipeg";
drCurrent["state"] = "MB";
drCurrent["contract"] = 1;

// Pass that new object into the Add method of the DataTable.
tblAuthors.Rows.Add(drCurrent);
Console.WriteLine("Add was successful, Click any key to continue!!");
Console.ReadLine();

// END ADD CODE




如果要編輯現有的資料列,先取得適當的 DataRow 物件,然後為一或多個資料行提供新的值。您必須先找到正確的資料列,這個部分比較簡單,因為您已經載入了資料表的結構描述和資料 (步驟 4 中對 FillSchema 的呼叫)。結構描述就位之後,資料表就知道哪一個資料行是主索引鍵,也可以使用 Rows 集合中的 Find 方法了。
Find 方法會傳回在主索引鍵中有特定值的 DataRow 物件 (在這個例子中是 au_id)。有了該 DataRow 之後,就可以修改資料行。您不需要將修改包裝於 BeginEditEndEdit 中,但這樣可以簡化 DataSet 必須執行的工作,而且允許 DataSet 在呼叫 EndEdit 的同時可以執行驗證檢查。請在 ADD 程式碼之後貼上下列程式碼:


//*****************
// BEGIN EDIT CODE

drCurrent = tblAuthors.Rows.Find("213-46-8915");
drCurrent.BeginEdit();
drCurrent["phone"] = "342" + drCurrent["phone"].ToString().Substring(3);
drCurrent.EndEdit();
Console.WriteLine("Record edited successfully, Click any key to continue!!");
Console.ReadLine();

// END EDIT CODE




如果要使用所有這些變更來更新原始資料庫,請將 DataSet 傳入 DataAdapter 物件的 Update 方法中。
然而,您必須先設定 DataAdapter 物件的 InsertCommandUpdateCommandDeleteCommand 屬性,才可以呼叫 Update。雖然您可以手動撰寫 SQL,並使用對應的 SqlCommand 物件來產生這三個屬性,但是您也可以使用 Visual Studio .NET 自動產生這三個命令。
如果要在有需要時產生所需的命令,您必須建立 SqlCommandBuilder 物件的執行個體,然後在建構函式中使用 DataAdapter。如果要使用這個方法 (將在下列程式碼範例中示範),您必須有可供資料表使用的主索引鍵資訊。如果要存取主索引鍵資訊,請呼叫 FillSchema,然後將 DataAdapterMissingSchemaAction 屬性設定為 AddWithKey,或是在程式碼中手動設定主索引鍵。請在 EDIT 程式碼之後貼上下列程式碼:


//*****************
// BEGIN SEND CHANGES TO SQL SERVER

SqlCommandBuilder objCommandBuilder = new SqlCommandBuilder(daAuthors);
daAuthors.Update(dsPubs, "Authors");
Console.WriteLine("SQL Server updated successfully, Check Server explorer to see changes");
Console.ReadLine();

// END SEND CHANGES TO SQL SERVER




如果要完全刪除資料列,請使用 DataRow 物件的 Delete 方法。請注意,Rows 集合包含兩個方法:RemoveRemoveAt,它們看起來是刪除資料列,但實際上只是將資料列從集合中移除。只有 Delete 方法會將您的刪除傳回來源資料庫。請在 SEND CHANGES TO SQL SERVER 程式碼之後貼上下列程式碼:


//*****************
//BEGIN DELETE CODE

drCurrent = tblAuthors.Rows.Find("993-21-3427");
drCurrent.Delete();
Console.WriteLine("Record deleted successfully, Click any key to continue!!");
Console.ReadLine();

//END DELETE CODE




將變更傳送至 SQL Server,以移除您稍早所加入的記錄。請在 DELETE 程式碼之後貼上下列程式碼:


//*****************
// CLEAN UP SQL SERVER
daAuthors.Update(dsPubs, "Authors");
Console.WriteLine("SQL Server updated successfully, Check Server explorer to see changes");
Console.ReadLine();




儲存專案。
[偵錯] 功能表上,按一下 [開始] 以執行專案。您會注意到出現數個訊息方塊,指出程式碼的進度,並讓您可以隨著程式碼的進度查看資料的目前狀態。

romeogi1023 發表在 痞客邦 留言(1) 人氣()


Introduction:


This article describes an application used to exercise some of the Text To Speech features available to .NET developers through the Microsoft Speech 5.1 SDK.  This article does not address the newer speech server related libraries nor does it address web based deployments of speech related technologies.


The application performs several functions although all work in basically the same manner.  The application is intended to provide a introduction to working with the TTS library by illustrating how to go about gaining access to and manipulating voices, and playing text out as synthesized voice.  The application provides examples of generating speech as you type, passing canned phrases to TTS, and passing entire text files to TTS.


Getting Started:


In order to get started, unzip the included project and open the solution in the Visual Studio 2005 environment.  You will note that the project contains a file cleverly named "Form1.cs".  This form contains all of the code necessary to get a start with programming TTS.


To begin, you may not have the necessary references on your machine as the application requires the installation of Microsoft's speech 5.1 SDK and the Microsoft sample TTS engine library.  These may be downloaded with the SDK at no cost from this URL:


Speech 5.1 SDK:  https://www.microsoft.com/downloads/details.aspx?FamilyId=5E86EC97-40A7-453F-B0EE-6583171B4530&displaylang=en


You may also obtain a couple of additional voices (the SDK includes Microsoft Mary, Microsoft Mike, and Microsoft Sam) by downloading and the Microsoft Reader and additional TTS components found on this URL: (not required, but you will gain two additional voices if you do add these to your system)


https://www.microsoft.com/reader/downloads/default.asp


You do not need to activate the reader for this to work, however, you can't install the additional voices unless you have the reader installed.


If you have any other voices on your system, they may also be exposed to the application.  For example, my Toshiba laptop has an additional voice called "TOSHIBA male adult (U.S.)" and this voice also appears as available to this application at runtime.


If you need to update the project references, do so prior to attempting to run the application.  Once you have installed the speech SDK, go back to the project and run a build.  If the references are absent, remove these (highlighted) references: (Figure 1)



Figure 1:  Speech Related Project References


After removing the old references, right click on the project and select "Add Reference".  Once the dialog opens, select the COM tab (then go get a cup of coffee while it takes forever to load) and when you get back, look for and add these two references (figures 2 and 3) (Note: You really don't need the second reference to the sample TTS engine):



Figure 2:  Add the Microsoft Speech Object Library Reference



Figure 3:  Add the Sample TTS Engine Type Library Reference


Having added these references, go ahead and do a build to see if anything else is missing.  If anything turns up, add the missing project references in the same manner and build again.  Once you have a  good build, go ahead and run the application.  On start, you will see this form appear:



Figure 4:  The main form of the TTS Reader application


Looking at the form note that it has five control groups:  "Configuration", "Speak As You type", "Speak Specific Phrases", "Speak On Enter", and "Load a Text File and Read It".


Configuration.


This control group contains two controls, the speaker combo box, and the speech rate track bar control.  The speaker combo box is populated with the names of each of the TTS speaker voices, you may change the current speaker by selecting a different option form this combo box. 


The rate track bar control will speed up or reduce the cadence of the synthesized speech.  It is set to contain five positions and whenever its value is changed, the rate of speech will be altered to execute at the newly set rate.


Speak As You Type.


This control group contains a single text box which has been configured such that, whenever the user hits the space bar, the speaker will read the contents of the text box and, once finished reading, it will clear the text box.  The intent here was to see if you could type as you go and speak through TTS.  It seemed like a nice idea and it seems like it would be worthwhile for someone lacking the capacity for speech to use a function like this to speak by typing.  In reality, the action is a little choppy and the speech rendered is not too terrific.  With the application running, you may key in a word and listen to the results for yourself.  If you type slow enough, it is adequate but it is not quite quick enough to use as a form of conversation.


Speak Specific Phrases.


This control group contains a single combo box; whenever a new value is selected from the box, it will immediately be read by the speaker. 


Speak On Enter.


This appears to be a far more viable way to conduct a conversation using TTS as a voice medium.  This control works in a manner very similar to the "Speak As You Type" option, however, it reads and clears the text box only after the user hits the "enter" key.  You may try typing in a sentence and then hitting the enter key to get a feel for how that works.


Load a Text File and Read It.


This control group contains a single multi-line text box control and three buttons:  "Open File", "Stop", and "Read File".  Click on the "Open File" button and use the open file dialog box to navigate to any text file.  The text file will load into the text box and with a file loaded, you may click on the "Read File" button to have the speaker read the contents of the text box end to end.  TTS does a fair job of this however I will point out that punctuation and abbreviations do not work out too well for the 5.1 SDK.


You may also key text into the text box and evoke the "Read File" function to read the contents of the text box.


The Code.


The code is pretty straight forward and easy to follow.  The class definition begins as follows:



using SpeechLib;


using System.Environment;


using System.DateTime;


 


 





Public Class Form1


 


#region "Declarations"



   


    public SpVoice vox = new SpVoice();


    public int RateOfSpeech = 3;


 


#endregion


 




    private void Form1_Load(object sender, EventArgs e)


        {


            ISpeechObjectToken Token;


            foreach (int Token in vox.GetVoices)


            {


                cboVoxOptions.Items.Add(Token.GetDescription());


            }


            cboVoxOptions.SelectedIndex = 0;


            string str = Environment.UserName.ToString();


            SayGreeting(str);



        }


 


As you can see, the imports section includes the speech library.  A declaration region was next defined and two variables were declared within that region.  The first creates an instance of an SpVoice and note that the declaration is made with events.  The other variable, RateOfSpeech, is used to keep track of the current rate of speech selected using the rate of speech track bar control.


In form load, we begin by collecting all of the current voices and adding them to the combo box used to select a speaker.  The current index is set to zero such that, when the form loads, a current speaker will be defined.


The last two lines of the form load subroutine are used to capture the user's name (however it may be defined on the target machine) and to pass the name to the Say Greeting subroutine.  The "Say Greeting" subroutine is used to present a welcome message to the user through TTS.  The "Say Greeting" subroutine is written as follows:



    public void SayGreeting(string strUser)


        {


            vox.Voice = vox.GetVoices().Item(cboVoxOptions.SelectedIndex);


            DateTime dt;


            dt = Now;


            vox.Rate = RateOfSpeech;


            vox.Speak("".ToString, SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);


            try


            {


                vox.Speak("Greetings " + strUser + " from Text To Speech",     


                SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);


                vox.Speak("Today's Date is " + dt.ToShortDateString,


                SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);


                vox.Speak("The time is " + dt.ToShortTimeString, SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);


            }


            catch (Exception ex)


            {


                MsgBox(ex.ToString, MsgBoxStyle.Exclamation, "I'm Speechless");


            }


        }


 


 


As you can see, the subroutine formats a message containing the passed in user name as well as the date and time and then reads that message aloud using the current speaker voice.  Note the use of the SVSFPurgeBeforeSpeak flag; it is there to ensure that the speaker will finish the last statement before progressing on to the next one.


Next up is the track bar control's handler, it is written as follows:



    private void tbarRateOfSpeech_Scroll(object sender, System.EventArgs e)


        {


            this.RateOfSpeech = tbarRateOfSpeech.Value;


        }


 



This function merely sets the rate of speech variable to contain the current track bar value.  The variable is used to set the rate property for the speaker whenever the speaker is passed text to read.


Following the track bar control handler, you will see the following code:



    private void TextBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)


        {


            vox.Rate = RateOfSpeech;


            if (e.KeyChar == Microsoft.VisualBasic.ChrW(Keys.Space) | e.KeyChar == Microsoft.VisualBasic.ChrW


            (Keys.Enter))


            {


                vox.Speak(TextBox1.Text, SpeechVoiceSpeakFlags.SVSFDefault);


                TextBox1.Text = "";


            }


        }


 


 


This bit of code is used to drive the Speak As You Type function, here the rate of speech is set to the current rate of speech variable's value and the text box is set to look for a space key hit; whenever a space is entered, the code will pass the contents of the text box to the speaker, the speaker will read the text, and then the text box will be cleared and made ready for the next word to be typed.


The next bit of code will drive the Speak On Enter function, the code is identical to that used in the Speak As You Type function but rather than reading out the contents of the text box on space, the contents will be read out whenever the user hits the enter key.  That code looks like this:



    private void TextBox2_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)


        {


            vox.Rate = RateOfSpeech;


            if (e.KeyChar == Microsoft.VisualBasic.ChrW(Keys.Enter))


            {


                vox.Speak(TextBox2.Text, SpeechVoiceSpeakFlags.SVSFDefault);


                TextBox2.Text = "";


            }


        }


 


 


The last pieces of code to look at manage the function used to read from a text file.  The first item is used to open a file open dialog and read a text file into the control group's text box.  That code looks like this:

 



    private void btnOpenFile_Click(object sender, System.EventArgs e)


        {


            vox.Rate = RateOfSpeech;


            if (OpenFileDialog1.ShowDialog() == Windows.Forms.DialogResult.OK)


            {


                System.IO.StreamReader sr = new System.IO.StreamReader(OpenFileDialog1.FileName);


                this.txtReadFile.Text = sr.ReadToEnd.ToString();


                sr.Close();


            }


        }




The next bit is used to read the file, it looks like this:


 



    private void btnReadFile_Click(object sender, System.EventArgs e)


        {


            vox.Rate = RateOfSpeech;


            vox.Speak(txtReadFile.Text.ToString(), SpeechVoiceSpeakFlags.SVSFlagsAsync);


        }


 



You will note that the function is basically the same as that used to read from one of the other form text boxes (note that the speak flag is set to the asynchronous mode).  The next item to look at is used to stop the speaker from continuing to read from the text; that code looks like this:


 


    private void btnStop_Click(object sender, System.EventArgs e)


        {


            vox.Speak("", SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);


        }


This subroutine passes an empty string to the speaker and in so doing stops the speaker from continuing.


The last bit of code in the application is used to change the speaker's voice to one selected from the speaker combo box, that code looks like this:



    private void cboVoxOptions_SelectedIndexChanged(object sender, System.EventArgs e)


        {


            vox.Voice = vox.GetVoices().Item(cboVoxOptions.SelectedIndex);


        }


}


 


 


Summary.


This article and code sample was intended to provide a very easy introduction into TTS based speech synthesis; there are a great many more things that you can do with the speech SDK than have been addressed in this document.  A review of the contents of the speech SDK will provide greater details on the use of the speech libraries.


romeogi1023 發表在 痞客邦 留言(0) 人氣()

聖哥上課的時候,有學員問到能不能在伺服器端產生 PDF 或 XPS 格式的報表,
以下 ASP.NET 程式碼可以在伺服器端使用 Excel 檔當樣版,
修改 Excel 檔儲存格內容,然後使用列印或另存的方式來產生 PDF 或 XPS 檔,
先決條件是伺服器端有安裝 Office 2007 (如果要另存 PDF, XPS),
以及安裝增益集: https://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=4d951911-3e7e-4ae6-b059-a2e79ed87041
不要忘記加入參考: Microsoft.Office.Tools.Excel

romeogi1023 發表在 痞客邦 留言(3) 人氣()

Excel 另存新檔所儲存的類型
之前因為有個案子要做 Excel 匯入的功能,需要讓客戶先下載匯入檔案範本,然後讓客戶上傳 Excel 檔 ( *.xls ),再透過 C# 讀取資料後存入資料庫,我是採用 OleDb 的方式在 Server 端開啟檔案並將資料讀出,不過卻遇到了幾個難解的問題,其中最討厭的問題就是透過 OleDb 載入資料時,它都會自動判斷 Excel 中每個欄位的型別,假設工作表中的第三欄的前 8 列的值是「數字」,而第 9 列的「文字」的話,當讀取到第 3 欄第 9 列的時候,該儲存格的欄位值就會是 Null,可能會引發程式執行錯誤(因為你會預期有資料)。
這又是一個不認真讀書、找資料的典範啦,我當初在寫的時候是有找到一些資料,不過卻沒認真看完,網路上隨便抓一段 Sample Code 就開始寫了(我相信大部分的人都這樣),而當遇到問題的時候就開始直覺的反應 "這怎麼可能" 、 "又是微軟的 Bug" 、 "天阿, OleDb 真難用" 等等(髒話的部分已經刪除),等在內心抱怨完之後(大約兩秒)就開始發揮創意想解決方案(這也是最好玩的部分),當然沒有無法解決的問題,我還是想到了一個當初自己覺得還蠻不錯的方法。(現在覺得很爛,勿學)
為了確保讀出的資料全部都是「文字」,我自己手動建立了一個 Typed DataSet,並將所有欄位都設定成 string,然後透過 OldeDb 將 Excel 資料讀出後存入 Typed DataTable,但這樣還是會發生資料為 Null 的情形,所以我又修改 Excel 匯入檔案範本加入一段 VBA 程式碼,讓客戶在 Excel 中輸入完文字後按下某個按鈕,強迫將所有欄位格式先轉成文字,反正就是一整個囉唆啦。
不過為了寫出這篇文章,我把之前找的文章仔細的看過一遍了,才知道我之前的 "解決方案" 實在是太蠢了,以下是比較聰明的解法。

romeogi1023 發表在 痞客邦 留言(1) 人氣()

快照-20097814315
1.OLE DB的連線字串如下:
//連線字串
string cs =
"Data Source=" + FileName + ";" +
"Provider=" + ProviderName +
"Extended Properties=" + ExtendedString +
"HDR=" + Hdr +
"IMEX=" + IMEX;

romeogi1023 發表在 痞客邦 留言(0) 人氣()


protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
19 {
20 //此是要判斷為DataRow才執行,因為GridView有Header,Footer...等
21 if (e.Row.RowType == DataControlRowType.DataRow)
22 {
23 //CommandField使用此方法
24 ((Button)e.Row.Cells[0].Controls[0]).Attributes.Add("onclick", "if(!window.confirm('確定要刪除嗎?')) return;");
25
26
27 //ButtonField使用此方法
28 ((Button)e.Row.Cells[1].Controls[0]).Attributes.Add("onclick", "if(!window.confirm('確定要刪除嗎?')) return;");
29
30
31 //TemplateField已經在.aspx使用 OnClientClick="return confirm('確定刪除嗎?')" 設定了
32 }
33 }
上面是C#的程式碼,
改為VB的程式碼的話就是底下這段:
Protected Sub GVPastCh_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVPastCh.RowCreated
If e.Row.RowType = DataControlRowType.DataRow Then
Dim delbtn As Button = CType(e.Row.Cells(11).Controls(0), Button)
delbtn.Attributes.Add("onclick", "if(!window.confirm('確定要刪除嗎?')) return;")
End If
End Sub

romeogi1023 發表在 痞客邦 留言(0) 人氣()



WPF不受禁用“拖拉时显示窗口内容”限制,拖动不规则窗体时显示内容
随笔开始之前,要感谢斯克迪亚(https://www.cnblogs.com/SkyD/)他本人热心的帮助,他的文章对我有一定启发性。同时推荐大家去看看CodeProject上的https://www.codeproject.com/KB/WPF/WPFDiagramDesigner_Part1.aspx文章,拖放办法是从那里的copy过来的,WPFDiagramDesigner系列对很多初学者应该是个很好的代码教材,感谢其作者。

romeogi1023 發表在 痞客邦 留言(0) 人氣()




前幾天逛別人的部落格時 發現到一個有趣的工具 我親自測試以後發現實在是好東西
一定要推薦給大家 那就是Google Analytics(孤狗網站分析)工具...
重點是它是完全免費的唷...
在Google的網站上它是這樣說的:
在訪客如何發現您的網站以及與您網站的互動方面,
提供所有您想要了解的資訊。因此您得以將行銷資源的重心運用在可提高 ROI的廣告上,
並改善網站以帶來更多的訪客。同時兼具簡單及精密的特性,擁有企業等級的能力,且可
以提供給任何想要改善行銷和網站設計的人員使用。 
聽起來就是很好用的東西... 所以我想花點時間寫個教學 讓大家都可以使用它...
下面圖片 可能因為縮圖的關係看不清楚 請在圖片上點一下 就可以看得比較清楚...
要使用Google Analytics 第一件事就是要連到Google Analytics 申請一個帳號
網址是:https://www.google.com/analytics/zh-TW/
01.這個帳號是用你的Email來當ID

romeogi1023 發表在 痞客邦 留言(0) 人氣()

在一次的課程中,有人當面問到Flex / Flash能不能呼叫dll ?
在此提供二種方式:
1.這在ActionScript 2.0就可以做了,這是利用Flash Remoting來呼叫ASP.NET服務,也就是說把ASP.NET程式或public dll method當作是service function,再利用Flash Remoting來呼叫,這作法要將dll放在網頁程式的bin目錄下,並且建立一個service物件來map這class。記得這Service名稱要寫完整,包含空間名稱。
這方式是用AS2來完成,但AS3有更彈性的方式(參考第二種)。
2.有一個免費函式庫叫FluorineFx,主要提供Flex / Flash Remoting /Flex Data Services / Real-time messaging對於ASP.NET的解決方案,並且支援到.NET Framework 3.5與AMF0, AMF3 and RTMP協定,更還可以與Adobe的AIR整合,可說是非常實用。
使用VS.NET 2005的你,初次可以先看這裡的設定https://www.fluorinefx.com
AS呼叫dll的方式詳細請看這裡https://www.fluorinefx.com
最後,當然你也可以把swf檔嵌入在你的VB 或 C#的程式裡,再使用ExternalInterface來做二個程式間的溝通。

romeogi1023 發表在 痞客邦 留言(0) 人氣()

上傳前顯示內容
在Flex中,用Web的開發環境中,
有辦法直接開啟本端照片嗎?
例如:
不知是否有辦法直接開啟,而不要先上傳再開啟~
因為當這樣指時,就會出現一段安全性的問題~

romeogi1023 發表在 痞客邦 留言(0) 人氣()


前陣子有人提到這個上傳工具,小弟沒玩過就給它抓下來試試
SWFUpload可以支援多檔上傳功能,還不錯用,小弟分享一下試用的結果
首先要將官網的Demo Sample抓下來,如下所示:
SWFUpload下載網址:https://swfupload.googlecode.com
SWFUpload下載檔案:SWFUpload-Samples v2.1.0.Release.zip

romeogi1023 發表在 痞客邦 留言(0) 人氣()


前陣子有人提到這個上傳工具,小弟沒玩過就給它抓下來試試
SWFUpload可以支援多檔上傳功能,還不錯用,小弟分享一下試用的結果
首先要將官網的Demo Sample抓下來,如下所示:
SWFUpload下載網址:https://swfupload.googlecode.com
SWFUpload下載檔案:SWFUpload-Samples v2.1.0.Release.zip

romeogi1023 發表在 痞客邦 留言(0) 人氣()

1 2 3
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。