• Thursday, May 21, 2015

    Java -- Removing titlebar from JFrame.

    Syed Masoom Rizvi
    Here is a simple method for removing titlebar from JFrame:

    Before making frame visible write, where frame is JFrame:


    Monday, May 4, 2015

    VB6->VB.Net - PictureBox PSet and point alternative

    Syed Masoom Rizvi

    In VB6, PictureBox Control have two methods namely PSet, and point which sets the color of given pixel position or retrieve the color for same.

    But in VB.Net, PictureBox Control doesn't have these two methods. But there is an alternative and best way.

    Here, we create an image of 100 x 100 pixels in which we set the pixels.

    Dim bmp As New Bitmap(100, 100)

            For X = 0 To bmp.Width - 1

    Saturday, March 7, 2015

    union and struct in C - C Programming

    Syed Masoom Rizvi
    What is union and struct in C Language? What is the difference between union and struct?

    What is struct?

    struct is an user-defined data type which stores heterogeneous types of data. struct is a combination of primitive (predefined) data types which are called as member of struct. These member can be access by using  struct variable with period "." following by the member name.


    Monday, January 19, 2015

    Java - Very simple HTTP file downloader

    Syed Masoom Rizvi
    Simple HTTP File Downloader (Full Code provided below)

    1. Create a URL object. (Example: URL obj = new URL("http://example.com");)
    2. Create HttpURLConnection object 'conn'.
    3. Open the connection of URL object and pass to the conn. (Ex: conn=obj.openConnection();)
    4. Set requestMethod property of 'conn' to "GET".