Question:
as the title says,I tried using a backgroundworker but it doesn't update the PercentDone.
Is this VB6? A progress bar control usually updates on its own. You can try calling DoEvents() to handle UI events from within the event handler. See this: http://www.cknotes.com/windows-application-user-interface-freezes/