The differentiation of the blood-brain barrier (BBB) is an essential process in the development of a complex nervous system and depends on alternative splicing. In the fly BBB, glial cells establish intensive septate junctions that require the cell-adhesion molecule Neurexin IV. Alternative splicing generates two different Neurexin IV isoforms: Neurexin IV exon3 , which is found in cells that form septate junctions, and Neurexin IV exon4 , which is found in neurons that form no septate junctions. Here, we show that the formation of the BBB depends on the RNA-binding protein HOW (Held out wings), which triggers glial specific splicing of Neurexin IV exon3 . Using a set of splice reporters, we show that one HOW-binding site is needed to include one of the two mutually exclusive exons 3 and 4, whereas binding at the three further motifs is needed to exclude exon 4. The differential splicing is controlled by nuclear access of HOW and can be induced in neurons following expression of nuclear HOW. Using a novel in vivo two-color splicing detector, we then screened for genes required for full HOW activity. This approach identified Cyclin-dependent kinase 12 (Cdk12) and the splicesosomal component Prp40 as major determinants in regulating HOW-dependent splicing of Neurexin IV . Thus, in addition to the control of nuclear localization of HOW, the phosphorylation of the C-terminal domain of the RNA polymerase II by Cdk12 provides an elegant mechanism in regulating timed splicing of newly synthesized mRNA molecules.