Laman

Jumat, 14 Januari 2011

membuat jam digital di C# (C Sharp)

Tutorial kali ini adalah tutorial untuk membuat suatu jam digital di C#, kita akan menggunakan jam local atau jam yang ada pada system. untuk lebih jelasnya mari kita mulai membuat projectnya.
seperti biasa, siapkan project baru dengan cara klik file pilih new project, untuk project name silahkan isi sesuai dengan keinginan, karena tidak ada batasan dalam memberi nama pada suatu project kecuali menggunakan karakter karakter yang memang dilarang digunakan dalam menamai sebuah file, sekarang mari kita buat langsug projectnya
langkah pertama : tambahkan 3 komponen label pada form yang telah disiapkan tadi, dan juga tambahkan komponen timer ke dalam form. atur dan tata sedemikian rupa sehingga tampilannya seperti pada gambar dibawah ini

Gambar 1. Preview desain aplikasi

jika komponen timer ditambahkan kedalam form. tidak akan terjadi perubahan, akan tetapi lihat pada bagian bawah. akan muncul icon jam. itulah yang dinamakan dengan komponen timer

Langkha kedua : pada komponen timer yang telah ditambahkan kedalam form, double klik untuk membangkitkan event timerTIck. setelah itu tambahkan code berikut ini pada event yang muncul
            jamku = DateTime.Now;
            label2.Text = jamku.Hour.ToString();
            label1.Text = jamku.Minute.ToString();
            label3.Text = jamku.Second.ToString();     

langkah ketiga : pada event onLoad tambahkan source code berikut ini.
             jamku = DateTime.Now;
            timer1.Enabled = true;

dan  jangan lupa untuk mendeklatasikan variable global DateTime jamku

langkah keempat : Done. program selesai dibut, jika langkah langkah diatas dilakukan dengan benar maka, saat program dirunning tampilannya akan seperti gambar dibawah ini

Gambar 2. Hasil running program

Untuk lebih memudahkan dalam memahami tutorial ini. 
download binary filenya disini
dan juga download full projectnya disini.
fore more information contact on informasi@csharp-indonesia.com

Nb : Semua tutorial disini saya tulis dengan menggunakan bahasa pemrograman visual studio 2010. dan target framework 3.5 dan ada pula yang menggunakan framework 4.0. untuk cara download silahkan klik link diatas, setelah itu akan muncul halaman adf.ly. tunggu beberapa detik sampai pada pojok kanan atas pada halaman muncul tulisan skip add. klik skip add pada halaman adf.ly. setelah itu muncul button download. silahkan download dari button tersebut

116 komentar:

  1. di program ini udah ada class,obejck ma methodenya ta?

    BalasHapus
  2. untuk program ini tidak menggunakan konsep OOP, hanya tinggal memanggil class date yang sudah ada pada BaseClassLibrary .NET. tentunya pada class date pada library banyak method method yang digunakan. sedangkan pada program ini hanya invoke saja

    BalasHapus
  3. terima kasih yoooo........?

    BalasHapus
  4. Oce, sama sama.
    Semoga bisa membantu ya.. Amin...

    BalasHapus
  5. wow mantap nih tutorialnya, sudah saya coba dan berhasil, terima kasih dan salam C#

    BalasHapus
  6. This is one of the cult game now, a lot of people enjoy playing them . Also you can refer to the game :
    gold mine strike | pokemon go 2
    The game controls are shown just under . Movement mechanisms primarily include acceleration and tilting controls.
    stickman games | stick war 2 | animal jam 2

    BalasHapus
  7. Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
    laser level 2017
    best self leveling laser
    best laser level
    self propelled lawn mower

    BalasHapus
  8. a given article is very interesting and very useful for me, thank you very much admin and pardon me permission to share the article here :

    Obat kelebihan leukosit
    Cara menyembuhkan kencing batu
    Obat radang hidung herbal

    BalasHapus
  9. imperial voyages travel and tour operators in delhi we provide all affordable travel and tour packages at lowest price, if you need tour packages in india please visit our website. best tour operators in delhi

    BalasHapus
  10. Tomorrow is the last entry day. To all of the wonderful people whom I have had commented on their remarks and their comment's on mine. I thank you. I think the Blogs are great and what learning experiences we all get from each other's views. A true learning experience. I wish all of you best of luck, I will be envious if I don't win but such is life. The Dream Home 2016 is the Dream of a life time and I hope the winning family get to actually live in it. May God bless and keep all of you. Regards osappsbox

    BalasHapus
  11. This blog is so nice to me. I will continue to come here again and again. Visit my link as well. Good luck
    cara menggugurkan kandungan
    cara menggugurkan kandungan
    cara menggugurkan kandungan

    BalasHapus
  12. I realize that nothing is fair but I'm still trying. I just want to do my best and what is possible
    povaup

    BalasHapus
  13. Excellent article. I am experiencing a few of these issues as well.. best hotspot app , best android hotspot app

    BalasHapus
  14. Good post. I learn something totally new and challenging on sites I stumbleupon on a daily basis. It's always useful to read through content from other authors and use a little something from other web sites. iRoot Apk , best rooting app

    BalasHapus
  15. Good post. I am going through some of these issues as well.. Coolpad Service Centers In telangana , Coolpad Service Centers

    BalasHapus
  16. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  17. Kohls Credit Card Login - Portable My Kohl's Charge. Deal with your record ANYTIME, ANYWHERE! Check your adjust, pay your bill, and view late history in a hurry. Snap here to sign in to My Kohl's Charge.

    BalasHapus
  18. Aptoide for ion: Download Aptoide is an astounding application that empowers you to download various applications on your iOS gadgets, for example, iPhone, iPad, and so on. Utilizing this application Aptoide For iOS – Download Latest Version For iOS, Android & iPhone

    BalasHapus
  19. Download Apk Extractor APK v4.2.6. Apk Extractor will extracts APK that are set up in your android device ... 4.2.Four for Android 4.0 2.1 MB. Apk Extractor four.2.6 Latest for Android

    BalasHapus
  20. Banana Diet and morning banana diet eating regimen is another eating regimen that got the Japanese insane and making waves the world over, and each eating regimen has plans and rules.

    BalasHapus
  21. Sie führen ein Unternehmen und sind auf der Suche nach einem gutem Marketing aus Frankfurt? Die Mainmetropole ist die heimliche Hauptstadt für Konzeption der Bundesrepublik!marketingagentur Köln

    BalasHapus
  22. hello! If you are using Roku device and want to activate your device then use roku code link and if you are facing technical issue then you can take help from our Roku customer service number

    BalasHapus
  23. This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine

    risa herbal
    penyebab sakit pinggang
    cara menyembuhkan mata glaukoma
    cara mengobati gagal ginjal
    cara menyembuhkan penebalan dinding rahim
    obat penghancur kanker
    cara menyembuhkan varikokel

    BalasHapus
  24. Kenya Airways, Tarom and Transavia. Other than flights, individuals can likewise procure miles while remaining in an inn or leasing a vehicle. It can likewise incorporate shopping utilizing select customer cards. In the event that you dint know, fliers additionally acquire miles while spending on additional alternatives like redesigns or things recompense.

    BalasHapus
  25. Hello, we are from the health site admin, want to share our latest articles :

    obat kanker prostat paling ampuh

    BalasHapus
  26. Bagaimana cara manjur menggugurkan hamil dengan cepat dan akurat dan terbukti aman ? Kuret adalah tindakan untuk melakukan cara menggugurkan kandungan yang terbaik di bandingkan dengan yang lainnya . Kenapa bisa seperti itu , karena di tangani secara langsung oleh pihak medis seperti dokter kandungan yang sudah ahli di bidangnya . Dan untuk mendapatkan layanan ini tentu saja tidak mudah jika kondisi kandungan anda tidak bermasalah . Jika anda sangat sulit untuk mendapatkan layanan tersebut ada pilihan lain yakni menggunakan obat medis yang sudah teruji secara klinis untuk cara menggugurkan kandungan yang kuat yang mana telah disetujui untuk menginduksi rahim . Pahami juga tentang kelamin perempuan disini . Keputihan sangat mengganggu sekali bagi perempuan , cara mengatasi keputihan yang sering terjadi pada wanita . Dan salah satu masalah lagi yaitu mengalami kelonggaran organ intimnya , disini kami akan berbagi tips cara merapatkan miss v dengan cepat dan alami

    BalasHapus
  27. In this manner, to profit all of you the ideal information from the solid sources, there are online journals have related in the market. One such blog is Bcss8, which is unequivocally made with a need to pass on you the latest and top level information about the different games open in the market. Word News

    BalasHapus
  28. When you're endeavoring to choose a subject which will be the premise of the blog, you should verify that you're considering your topic. You can't hope to keep a blog whose subject doesn't show you at any rate. Picking a topic that you truly like expands the open door that you'll stay with persistently refreshing your blog, which will produce new perusers. Blog

    BalasHapus
  29. When setting up a blog the most essential part is seeing the reason from the blog. Do you have to post your exploratory writing? Or then again, perhaps you need to blog as a framework for standing up about a subject that interests you. Movement of a business is an extra commonplace motivation to blog. Guest Post

    BalasHapus
  30. For simple incitement fans you can seek after music, films, accounts and continuously online. Notwithstanding whether its online magazine news concentrated on the dispatch of a film or covering the activities of your most cherished star, there's information available as it happens. The whole piece of online TV has changed the way in which we are locked in. You can altogether discard the chaos of TV adverts and focus on getting the news. online magazine news

    BalasHapus
  31. Bloggers for the most part pass on their musings and states of mind and what they feel about something and somebody. There are many inquiry and answer sessions that go on in a blog site. With a site, individuals are really discovering approaches to exchange cash making process. Nowadays a significant number of the enormous stars are really making their very own blogs. project unbreakable

    BalasHapus
  32. Strikingly sports fans are maybe at an incredible favorable position. You can locate the main games channels on the web. Today you can watch international sporting events online with video gushing. There are news blogs which update sports scores continuously on the off chance that you can't watch the game. The top to bottom discourse on the blogs gives you a chance to get breaking news during a sporting competition. mediosindependientes magazine

    BalasHapus
  33. This new idea is undeniably increasingly gainful as far as the worth it needs to convey and the way that it is a continuous administration. Be that as it may, it may not be promptly acknowledged by everyone. walops Blog

    BalasHapus
  34. Regularly, General Bloggers on the Web are clever essayists who have feelings about everything, commonly utilizing the craft of investigating and censuring to convey a thought and catch consideration. paulfestival magazine

    BalasHapus
  35. That is the means by which we read them, and that is the means by which they're documented. Blogs are generally vigorously connected to different blogs talking about comparative themes, hence the system of investigating blog rolls can be an important, yet tedious strategy for finding extra blogs. 13 tka


    BalasHapus
  36. This is one method for letting the peruser to think about the credibility of the issue and the realities that support it. Sooner or later, individuals will trust in the substance of the blog if every one of the realities are there and all information displayed has been had a solid premise and aura. Today Post

    BalasHapus
  37. In the event that you don't know what you should blog about than you ought to find out about the numerous advantages of blogging and what others blog about. Probably the greatest advantage of blogging is the chance to voice you feelings. Blogging enables you to express your musings and sentiments. UA-NEWS

    BalasHapus
  38. A blog frequently looks like minimal in excess of a section that keeps running down the page. The edges of a blog can be loaded up with a wide range of extravagant accessories, for example, promotions, connections, pictures, and whatever else one can consider. vilonia magazine

    BalasHapus
  39. Technology blogs are the best source to know the highlights of cell phones, tablets, wearable gadgets, and such. What's more, the developers in your organization can gain so much from technology blogs at whatever point there is another working framework reported by Google Android, Windows or Apple. cngadget

    BalasHapus
  40. Why this is suggested? Wouldn't i be able to simply manufacture a daily blog website and reveal a specialty for money-making arrangements, later on? Obviously, you can definitely include some money-making thoughts a while later. However, when you begin using that you should monetise your daily blog, regardless of whether simply with the end goal of a little pocket money, at that point you'll approach an online business using the right mindset. business

    BalasHapus
  41. A powerful blog can incorporate altogether more than blog posts. An association with various other health websites, a glossary of health related words, and altogether more can be fused into the blog. The all the more charming features a blog contains, the more number of readers it will pull in. HEALTH

    BalasHapus
  42. You may live in a little or enormous home, however have amassed a great deal of things with no where to put them. You may have messes all around, and each time you attempt to discover something, or simply taking a gander at all your stuff lying around or covered up, can be extremely disquieting. This article will give some https://home-improvementnews.com/ tips that can enable you to sort out, yet will include an increasingly open to living condition to your home too.

    BalasHapus
  43. The following thing you need to do is to recognize what you need to write about. It is constantly prescribed that you write about something you are keen on. Along these lines, you will never come up short on information to post on your blog. For instance, on the off chance that you are so intrigued by planes, you can blog about various aircraft and their capabilities. Write about your interests. Blogging ought not be a job however a hobby; something you like doing. In the event that you accept it as a position, you may wind up being frustrated. Thedailymint

    BalasHapus
  44. Depict a strong character. Writing blogs is regularly done in the main individual perspective and this gives you an opportunity to tell others the sort of character you have. To do this right, verify you develop a strong impression. Sound proficient on what you're talking about in light of the fact that as you do, you build your expert in a specific field as well. You can't draw in a reader for long on the off chance that you can't show the person in question that you merit listening to. Thelivejournal

    BalasHapus
  45. One of the tips that can be pursued is continually ensuring that the subject you pick is one that you altogether comprehend and one that you have a great deal of enthusiasm for. It will consistently be anything but difficult to keep up a gambling blog which you have an enthusiasm for and it will likewise be anything but difficult to pull in others to your gambling blog in the event that they see that the theme you are discussing is one that you completely get it. gamblebestcasino.net

    BalasHapus
  46. They can proficiently juggle between studies, sports, PCs and cell phones. Internet, social networking and talking have successfully enthralled children everywhere throughout the world. Overabundance technicality is additionally negatively affecting their imagination. Children now-a-days are destined to compose just to visit and mailing. At this stage, the customary study hall proficiency, neglecting to fulfill the needs of the age, is losing to online education blogs. besteducationalgrants.org

    BalasHapus
  47. The hazard related with the Internet shopping is twofold. The principal hazard is the means by which secure the site is. Shopping with credit or debit cards implies you should give out a mess of personal information. None of us might want this information to fall into an inappropriate hands, or we could be in for an extreme time. Despite the fact that we have many devoted and dependable shopping and auction sites, we constantly need to go to singular business sites to get the new items. Thusly, it is basic that we as buyers should know whether this site is simply one more extortion or a trick. shoppingbloggen.com

    BalasHapus
  48. Dessert is something youngsters foresee using, gave that they have had most of their dinner first. It will in general challenge to consider different ADVICEFOOD each which, which is the reason setting off to a few food blogs is so valuable. Specialists and juveniles the equivalent have prepared new dessert recipes that they are more than willing to give to the world. Is there any substantial motivation behind why you shouldn't abuse that?

    BalasHapus
  49. The case of making an increasingly conspicuous whole out of entertainment blogs isn't stunning in any way. People will when all is said in done range for entertainment in each stratum of society so for what inspiration to leave the internet? Everybody likes to look for after their favored master, skilled worker, sportsperson, colossal name and entertainment blog give them all that they are filtering for. Entertainment

    BalasHapus
  50. Blogs can be a tremendous method to stay aware of wedding stories and events. In contrast to most wedding locales, they are refreshed day by day, so you will realize that you are not passing up any recent developments. An incredible method to keep over your preferred wedding blogs is to bookmark your top destinations to keep them at your fingertips. Simply don't do this on your PC at work, or it will appear as though you are investing all your energy in wedding stuff! Another choice is to set up an administration like Google reader which will alarm you whenever another passage has been made on your preferred blogs. atlweddingnews.com

    BalasHapus
  51. However, past the style is the generally valuable of your blog. Clearly, the real arrangement of the blog is to deliver excitement for you as a pro and to make online proximity. In any case, before that, you need a point. What will your blog be about? Some real estate blogs fill in as a kind of real estate website posting own uncommon properties in express zones. RealEstateHvar

    BalasHapus
  52. With thousands of innovative ideas out there, one of the issues we see is that many bloggers and craft websites will link to an amazing project but provide no source on the steps needed to create that item or where you can find it online. how to prevent damage to your vacuum cleaner

    BalasHapus
  53. Affordable internet marketing and advertising from an experienced online marketing agency can easily boost the value of your company. With the current state of the economy it seems now is the time to make the move into conducting business online. Marketing 1on1 is an amazing company.

    BalasHapus
  54. Superworms are tropical insects, hailing from Central and South America. At this point, however, they have been made available all throughout the world. They can be found burrowing in soil amongst fallen trees and decaying vegetation. They enjoy dark, moist spaces, so you are most likely to find them in areas that have at least low levels of humidity.

    BalasHapus
  55. On the off chance that you are proposing to outsource your SEO services, then it is reasonably canny to perceive what SEO agencies will offer your business. What's more, you ought to go out of your way and see what is the definition of SEO while likewise concerning the astonishing conditions it comes with. SEO Singapore

    BalasHapus
  56. To relinquish ending up in a condition you can't get away, you need to read the license agreement before buying any beat online. Subsequently, you will have the decision to keep your culmination of your agreement with the producer. hip hop beats for sale

    BalasHapus
  57. A scramble of the epic risks that you need to protect your foot from joining electric shock, sharp objects, and electrostatic discharge to make reference to a few. Charmingly when you figure out this, you will build up some central encounters picking the sort of safety shoes to buy. Singapore safety shoes suppliers

    BalasHapus
  58. With the one-touch control, you can stop or play the music inconvenience free. Better, you can interface with your personal assistant gratefulness to the microphones included in the new Blackpods Pro. If you are planning to lay your hands on the new black Airpods, by then you can consider paying a visit to the official website of Blk Noir. BlackPods Pro

    BalasHapus
  59. Thanks for sharing such good post. Visit best tour operators in Delhi for custom tour package, travel visa and passport services.

    BalasHapus
  60. Found this post very informative. Thanks for sharing such good post.For a best deal on airline ticket reservation visit trips booker canada.

    BalasHapus

  61. Great post found today. For creative website design solution get in touch Website Design Company in Delhi.

    BalasHapus
  62. We started our CBD oil operation to help people lead happier and healthier lives with a commitment to using only the highest-quality CBD oil for sale anywhere on the market today. Our organic and highly concentrated, all-natural CBD oil has already started to garner rave reviews online and we hope to help more and more people change their lives for the better going forward, too! read cbd products stand reviews

    BalasHapus
  63. Most of the clothing for men and women that we sell are made in Italy and belongs to the world's leading fashion designers, Instylefashion has beat all the records and allows shoppers to buy expensive designers brands at very affordable prices. Cheap boutique clothing

    BalasHapus
  64. In Managed IT Services Orange County, Managed Service Provider handles the risk and responsibility associated with managing your IT systems. It brings a degree of expertise and experience to the business that can manage the whole IT needs of your company. Managed IT Services Orange County

    BalasHapus
  65. Moissanite is a lab-grown stone which means it can be produced ethically, unlike many diamonds that are mined or sourced using questionable tactics. This gives moissanite a more consistent quality without the outrageous price gouging. Brilliance, also known as the ability to reflect light from the interior of the gem, or give a gem its “sparkle” is limited to only white light in diamonds. vintage style moissanite engagement rings

    BalasHapus
  66. Many Americans have spent fortunes for stem cell therapy overseas. for many it works and for others it didn’t. Thanks to a new bill that was approved and passed in Texas, stem cell therapy is now available in Houston to offer people stem cell interventions. We are here to educate you about the advantage of stem cell therapy and different options you have available for stem cell therapy in Houston. stem cell treatment in texas

    BalasHapus
  67. The solutions can be either directly relevant or conceivably an implied solution, for instance, cleaning suggestions for a product your sell on your site. The key here is to answer any questions by systems for blogging on your website with a useful, easy to read commentary on whatever your solution is, and how it should be applied.The Live Journal

    BalasHapus
  68. It may show up radiantly clear, yet in case you are to get any chance of benefiting by such a fight, by then your articles must be all around made, work up free, and astonishing to read. The substance should hang and not imitated from some other website or article. In case you get this right, by then you have the clarification of a good traffic source that could pass on results for a long time. 123magzine.com

    BalasHapus