“In aggregate, devices like PCs, tablets and smartphones are still growing, but they are also shifting,” said Mr. Weisler, 48, who has spent his career in PCs, working at Acer and Lenovo before joining HP. “You can create new categories.”

To do that, Mr. Weisler has modestly increased research and development spending and plans to raise that amount. Under Hewlett-Packard’s previous chief executive, Meg Whitman, printing and PCs “didn’t get investment dollars,” Mr. Weisler said. He also plans to merge HP’s consumer and commercial PC businesses, hoping to bolster the cachet of PCs both at home and at the office.

Obstacles remain in the way of Mr. Weisler’s vision. When Hewlett-Packard was one giant company, it was valued at $60 billion. Now HP Inc. and the separate enterprise company, called Hewlett Packard Enterprise, are worth about $53 billion.

A lot of the woe has been in the PC business. Not only did HP Inc.’s revenue in its fiscal first quarter drop 12 percent from last year, to $12.2 billion, but operating margins fell half a percentage point to 7.6 percent, compared with the national average operating margin of 10.7 percent. In response, Mr. Weisler has accelerated a plan to lay off 3,000 of HP Inc.’s 50,000 employees.

Even so, he insists on a bright future. On a recent day, he showed off the early results of his push at the company’s Silicon Valley headquarters. One device that looked like a small tablet or a large smartphone could, in fact, be either of those — or a PC, or a laptop. It worked on its own, or it could fit into a dock attached to a keyboard and a big screen, functioning like a PC. It could also connect wirelessly with a keyboard and folding screen, making it a laptop.

Another machine in the room was simply a laptop, but the edges hid a series of quality microphones. It had Internet phone controls built in, and it was designed to open up until it was completely flat. That way it could be used for conference calling, catching voices all around the table.

Nearby, HP’s latest printers had lost their moving nozzles in favor of an 8.5-inch bar that spits about a billion dots a second. The company said it could now do laser-quality printing twice as fast and for half the cost, setting it up for the day when 3-D printing becomes commonplace.