Last night i was thinking on how to do this (title) then i came with an idea , i did a program that converts Docx(Microsoft Office Document) to DOC(Microsoft Office Word 98-2003 Document) so i used the same method but had to tweak . for this you don't need to have any classes or dll's i have created two functions that will do the work , to make this first you need a button and a textbox then double click the form and add these code(s).
Home » All posts
How To Eject And Close CD/DVD Drive In C#
Okay guys i was doing a program about managing the system things so i had to figure out eject and closing CD/DVD Drive so i did and here is the code for this .
first of all you need to import a interop service it's
now to close CD/DVD Drive use this code
Hope it helped you ..
first of all you need to import a interop service it's
[DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi)] protected static extern int mciSendString(string lpstrCommand, StringBuilder lpstrReturnString, int uReturnLength, IntPtr hwndCallback);after importing it add the namespace using System.Runtime.InteropServices; , then add this code to eject CD/DVD Drive
int ret = mciSendString("set cdaudio door open", null, 0, IntPtr.Zero);
now to close CD/DVD Drive use this code
int ret = mciSendString("set cdaudio door closed", null, 0, IntPtr.Zero);
Hope it helped you ..
How To Set Up Python In Windows
I did a tutorial on how to set up java in windows so on i also have python installed so i thought it would be nice to make a tutorial about doing the same thing for python first of all i want say that interpreted languages only has compiler(most of) like java,python,pascal etc that's why we need to set up the compiler for the OS .
Go download Python at http://www.python.org and install it as usual now like what we did in java go ahead and right click on My Computer and select Advanced System Properties
Go download Python at http://www.python.org and install it as usual now like what we did in java go ahead and right click on My Computer and select Advanced System Properties
How To Set Up Java In Windows
I saw many people having problems in setting up the java compiler so I just thought of doing a tutorial on this so on here i am .. , first of all download the latest version of java by the way remember to download it from oracle website and not from other websites also you should download JDK(Java Developer(s) Kit) , then install it as usual. After installing go for a restart then after the next switch in go ahead and right click My Computer and select Advanced System Properties .
How To Make Beeb Sound On Each Word In Java
hello guys , so you all know what is a beeb sound so on in vb.net or c-sharp it's veru easy to make beeb sound.
if you want to make beeb sound in vb.net here is the code
if you want to make beeb sound in c# here is the code
ok now let's turn to java side
here is the codes that i wrote to do this , i am using arrays and a for loop and a thread.
actually i had to write this for a homework.
if you want to make beeb sound in vb.net here is the code
Microsoft.VisualBasic.Interaction.Beep()
if you want to make beeb sound in c# here is the code
using Microsoft.VisualBasic; using System.Media; SystemSounds.Beep.Play();
ok now let's turn to java side
here is the codes that i wrote to do this , i am using arrays and a for loop and a thread.
actually i had to write this for a homework.
How To Make A Addition Calculator In Java Using JOption
in
best way to learn java,
how to learn java,
java game programming,
java learning,
java programing,
java programmer,
java programming,
learn c online,
learn java,
learning java,
programming in java,
tutorial
- By
Mohamed Shimran
- on 5/22/2013
- 1 comment
Okay guys today i will be teaching you how to make a simple addition calculator using Joption in java, I saw someone wrote some codes to calculate addition also it uses Java Scanner. This is that program .
import java.util.Scanner; class basic_cal { public static void main(String args[]) { Scanner shim = new Scanner(System.in); double first_number,second_number,answer; System.out.println("Enter First Number : "); first_number = shim.nextDouble(); System.out.println("Enter Second Number : "); second_number = shim.nextDouble(); answer = first_number + second_number; System.out.println("Answer : " + answer); } }Okay now i saw that and got an idea to make the same thing with Joption , Joption is like the messagebox we have in c# and vb.net ok , this is the program i wrote :
Android Studio : An IDE For Android Developers
Google has released an IDE for android developers based on IntelliJ IDEA , before Android Studio we had to use Eclipse to develop Android apps but now the Android Studio comes in handy , it has a really cool interface and a lot of features are available , Google has added a referral tracking (an analytics service has been added) also Google has announced that there will be a place for optimization and development tips etc.
This video by Android Developers explains everything
How To Make Unicode String Reader In VB.NET
hey guys , today i was searching for some old things and i found out a simple program i wrote before two years and it's a unicode string reader , it has a simple interface i have used a richtextbox and a button and of course a openfiledialog in code . when you click the button the openfiledialog dialog comes up and you just go ahead and select any file and click ok and you have the unicode string of the file in the richtextbox by the way you will laugh this program has three lines of codes :D , ok now go create a new project and add a button and change the text property to "open" and then add a rich text box and now it's time for codes , double click button and add these code
now debug and try it here is a preview :

it doesn't looks like unicode or whatever
If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then Dim data() As Byte = System.IO.File.ReadAllBytes(OpenFileDialog1.FileName) RichTextBox1.Text = System.Text.Encoding.Unicode.GetString(data)
now debug and try it here is a preview :

it doesn't looks like unicode or whatever
How To Get Windows Product Key In C#
First of all add these namespaces :
using Microsoft.Win32; using System.Collections;
After that add this function.: