Using get_option()
you can get the page that is assigned to the front page:
$frontpage = get_post(get_option('page_on_front'));
Or as you have it:
$my_query = new WP_Query( array( 'page_id' => get_option('page_on_front') ) );
Using get_option()
you can get the page that is assigned to the front page:
$frontpage = get_post(get_option('page_on_front'));
Or as you have it:
$my_query = new WP_Query( array( 'page_id' => get_option('page_on_front') ) );