Dolly Levi certainly knows how to make an entrance. But then, of course, so does Bette Midler.

On Thursday night, about two hours after she had basked in a full-throated standing ovation from the celebrity-studded crowd at the opening night of “Hello, Dolly!,” the twice Oscar-nominated actress, who plays the title role, appeared at the top of the steps of the New York Public Library dressed in a midnight blue, floor-length custom Marchesa gown. As she strutted into the party, John Pizzarelli and his band played — what else? — “Hello, Dolly!”

Accompanied by her husband, the artist Martin von Haselberg, who smiled wryly at her side, she beamed and gave a slightly regal wave as guests shouted out her name, hummed along to “… have you back where you belong,” and took out their smartphones to capture the moment for their Twitter and Instagram accounts.

A few minutes later, after weaving through a crowd that included a wide swath of New York’s celebrity elite — among them Sigourney Weaver, John McEnroe, Greta Gerwig, Lorne Michaels, Sarah Paulson, Zadie Smith, John Slattery, Andrew Rannells, Marlo Thomas and Phil Donahue — Ms. Midler stood off in a corner of one of the library’s towering spaces and talked about what it was like to take on an iconic role that had been played over the years by such legends as Carol Channing, Ann Miller, Martha Raye, Pearl Bailey and, on film, Barbra Streisand.