a switching power supply device control circuit and switching power supply can combat fluctuation due to the input voltage in the peak current of a switching element , even when using an oscillator . a control ic is connected to a switching element and to a current detecting resistor , and controls the switching element , the control ic being configured of an ocp comparator that detects an overcurrent with respect to a load , an overcurrent level setting circuit that corrects a fluctuation occurring in the peak current of the switching element in response to the output voltage from the ac input , an oscillator having a frequency modulating function whereby the switching frequency with respect to the switching element can be modulated , and a slope compensation circuit that generates a slope compensation signal increasing monotonically in proportion to the time from the start of each cycle of an oscillating signal of the oscillator .