SOLUTION 1:
In your constructor just call the function before any other work.
public ups()
{
pqr();
MessageBox.Show("hello");
}
SOLUTION 2:
You are creating an object for the class ups from other forms like
ups objups = new ups();
The constructor is initialized. If you want to execute pqr() first then make pqr as static
public static void pqr()
{
MessageBox.Show("Bye");
}
and now you can do it this way. Class does not have to be intialized for this method
ups.pqr();
ups objups = new ups();