Games and games or games

Source: Internet
Author: User

In order for me not to be the women of those who are so miserable, decided to I most think the most need and master not good things to share, everyone is to KTV right, even if do not know, you have not eaten pork has not seen pig run, is it, so, Beau for everyone repeatedly this KTV

Set up the KTV song interface, and then to achieve is the singer song, click on the form of the Load event to write the following code:

 Private voidFrmzhu_load (Objectsender, EventArgs e) {            //read the picture path in the MyResource table and put it into the ImagePath variable            stringsql ="Select Resource_path from Resource_path where resource_id=1"; SqlConnection Con=NewSqlConnection (SQLHELPER.STR); SqlCommand com=NewSqlCommand (Sql,con); Con.            Open (); Ktvutil.singerphoto=com. ExecuteScalar ().            ToString (); Con.            Close (); //Read the singer PathSQL="Select Resource_path from Resource_path where resource_id=2"; Com.commandtext=SQL; Try{con.                Open (); Ktvutil.songlu=com. ExecuteScalar ().            ToString (); }            Catch(Exception ex) {MessageBox.Show ("System resource Error!"+Ex.            Message); }            finally{con.            Close (); }        }
View Code

Into the region query is not the next query you, in order to narrow the scope of the query, right, so use the following things

 if(lvtwo.selecteditems[0] !=NULL) {lvtwo.visible=false; Lvthree.location=lvtwo.location; Lvlb.dock=DockStyle.Fill; Lvthree.size=lvlb.size; Lvthree.visible=true; Singid= Convert.ToInt32 (lvtwo.selecteditems[0].  TAG);  while(Dr. Read ()) {//put the singer's avatar in the Iamgelist control   stringPhotourl = Ktvutil.singerphoto +"\\"+ convert.tostring (dr["Singer_poto_url"]);     IMASINGERNAME.IMAGES.ADD (Image.FromFile (Photourl)); //Add a singer to the ListViewListViewItem List=NewListViewItem (); List. Text= Convert.ToString (dr["Singer_name"]); List. Tag= Convert.ToString (dr["singer_id"]); List. ImageIndex=ImageIndex;     LVTHREE.ITEMS.ADD (list); ImageIndex++; } Dr.    Close (); }
1th Step
Private voidLvthree_click (Objectsender, EventArgs e) {SqlConnection con=NewSqlConnection (SQLHELPER.STR); StringBuilder SB=NewStringBuilder (); Sb. AppendFormat ("Select Song_id,song_name,singer_name= '"+lvthree.selecteditems[0]. text+"', Song_url from Song_info where singer_id="+convert.toint32 (lvthree.selecteditems[0]. TAG) +""); Fslgeyu Eyu=NewFslgeyu (); Eyu.name=sb.            ToString (); Eyu. Previous= Execute.singer;//specifies that the returned form is song by singerEyu.           Show (); //This . Close ();}
2nd dynamic .


Beau thought it was suddenly the man's,,,

It's the next time we meet.

Games and games or games

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.