
兩個usercontrol互相傳值

<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</assemblies>
先取得version的編號,1.沒加入資源 My.Computer.Audio.Play("C:\Waterfall.wav", _ AudioPlayMode.BackgroundLoop)
2.有加入資源
My.Computer.Audio.Play(My.Resources.Waterfall, _
AudioPlayMode.BackgroundLoop)
都會在背景一直播放
參考:http://msdn.microsoft.com/zh-tw/library/w032hx3c(v=vs.90).aspx
需要停止時
My.Computer.Audio.Stop()收工,只吃wav檔
void setup(){
pinMode(12,OUTPUT);
}
void loop(){
digitalWrite(12,HIGH);
delay(1000);
digitalWrite(12,LOW);
delay(1000);
}
#define NUM 8
#define t true //not bright
#define f false //bright
boolean data[10][NUM] = {
{t, f, f, f, f, t, f, f}, // 0
{t, f, f, t, t, t, t, t}, // 1
{t, t, f, f, t, f, f, f}, // 2
{t, f, f, f, t, f, f, t}, // 3
{t, f, f, t, f, f, t, t}, // 4
{t, f, t, f, f, f, f, t}, // 5
{t, f, t, f, f, f, f, f}, // 6
{t, f, f, f, t, t, t, t}, // 7
{t, f, f, f, f, f, f, f}, // 8
{t, f, f, f, f, f, f, t}, // 9
};
int pins[NUM]={1,2,3,4,10,11,12,13};
void setup(){
for(int i=0;i<NUM;i++)
{
pinMode(pins[i],OUTPUT);
}
}
void writeNumber(int n){
for(int i = 0; i < NUM; i++){
if (data[n][i]== t){
digitalWrite(pins[i],HIGH);
}
else{
digitalWrite(pins[i],LOW);
}
//digitalWrite(pins[i], data[n][i] == t ? HIGH : LOW);
//analogWrite(pins[i],50);
}
}
void loop(){
/* for(int n = 0; n <= 9; n++){
writeNumber(n);
}
*/
unsigned int n=0;
n=random(10);
writeNumber(n);
delay(1000);
/* for(int i=0;i<NUM;i++){
digitalWrite(pins[i],HIGH);
}
delay(1000);
for(int i=0;i<NUM;i++){
digitalWrite(pins[i],LOW);
}
delay(1000);
*/
}
Copyright © 2025
度估記事本 | Powered by Blogger
Design by Flythemes | Blogger Theme by NewBloggerThemes.com