Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
N

nghia09t3

@nghia09t3
About
Posts
6
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Help, Win32_DefragAnalysis in VB6 code
    N nghia09t3

    i want to use class Win32_DefragAnalysis(WMI) to scan status of other volume, but it is not active, exactly, the For-each is not work, please help me,

    Private Sub defrag_analysis()
    On Error Resume Next
    Dim item
    Dim nameSQL
    Dim wmiOBJECT
    Dim itemCOLLECTION
    Set wmiOBJECT = GetObject("Winmgmts:\\.\root\cimv2")
    nameSQL = "select * from Win32_DefragAnalysis" ' Where VolumeSize > 0 "
    Set itemCOLLECTION = wmiOBJECT.ExecQuery(nameSQL)
    For Each item In itemCOLLECTION
    'not print properties of item
    MsgBox "VolumeSize : " & item.VolumeSize
    MsgBox "Name : " & item.VolumeName
    MsgBox "FreeSpace :" & item.FreeSpace
    MsgBox "AverageFileSize : " & item.AverageFileSize
    Next

    MsgBox "jump here"
    

    End Sub

    Visual Basic help career

  • Error show ImageIcon ???
    N nghia09t3

    I want to show ImageIcon by adding to Label, but it has error, help me?

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Random;
    import java.util.Scanner;
    class CatchTheRat extends JFrame
    {
    // The Rat
    JLabel lb;

    // Move it randomly!
    Random r;

    public CatchTheRat(int k)
    {

    // Set frame properties
    setTitle("Catch The Rat");
    setLayout(new FlowLayout());
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setVisible(true);

    // Set the background (just for a good look)
    setContentPane(new JLabel(new ImageIcon("background.jpg")));

    // Set layout to the content pane
    getContentPane().setLayout(new FlowLayout());

    // Create the rat
    lb=new JLabel(new ImageIcon("rat.jpg"));

    // Add the rat
    getContentPane().add(lb);

    // Create Random object
    r=new Random();

    // Create a timer and call it for every k seconds
    new Timer(k,new ActionListener(){

    public void actionPerformed(ActionEvent ae)
    {

    // Move the rat randomly, subtract 75, so that the rat should not meet the edges
    lb.setLocation(r.nextInt(getWidth()-75),r.nextInt(getHeight()-75));

    }

    }).start();

    // Add mouselistener, notify when user clicks it!
    lb.addMouseListener(new MouseAdapter(){

    public void mouseClicked(MouseEvent me)
    {
    // Create a beep sound when clicked to notify
    Toolkit.getDefaultToolkit().beep();

    // Also print it!
    System.out.println("Caught!");
    }

    });

    // Maximize the frame
    setExtendedState(MAXIMIZED_BOTH);

    }

    public static void main(String args[])
    {

    // Create Scanner object
    Scanner s=new Scanner(System.in);

    // Let the user enter his capability of catching the rat!
    System.out.println("Enter the speed");

    // Read the input
    int k=s.nextInt();

    // Create the frame and send the value of k
    new CatchTheRat(k);

    }
    }

    Java help java performance question lounge

  • How to make GAME by Java?
    N nghia09t3

    Hi family, i want to make project game by java, can you introduce me!, and what are the documents necessarily for GAME-java?, thanks you ;) ;) ;) ;)

    Java java game-dev tutorial question

  • How to access window ?
    N nghia09t3

    thanksssss Richard, Have a nice day!!!!!

    Database help tutorial question

  • How to access window ?
    N nghia09t3

    Hi Eddy Vluggen, i think my English is not good to express my purpose, hjhj, and my project makes a "Program" which can show properties of hardware, example type(NTFS/FAT32), used space,.. i am coding by C++, can you give to me the documents about this, thanks so much!!!!

    Database help tutorial question

  • How to access window ?
    N nghia09t3

    I am coding the project, which access to the Window, exactly is HDD(NTFS, FAT32), help me solve it!!!, thanksssss :-D :-D :-D

    Database help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups