FUSED 1,2,4-THIADIAZINE AND FUSED 1,4-THIAZINE DERIVATIVES, THEIR PREPARATION AND USE

Abstract: 1,2,4-thiadiazine and 1,4-thiazine derivatives represented by formula (I) wherein A, B, D, R<1>, R<2>, R<3> and R<4> are defined in the description, compositions thereof and methods for preparing the compounds are described. The compounds are useful in the treatment of diseases of the central nervous system, the cardiovascular system, the pulmonary system, the gastrointestinal system and the endocrinological system.

Description: TITLE Fused 1 ,2,4-Thiadiazine and Fused 1 ,4-Thiazine Derivatives, their Preparation and Use FIELD OF THE INVENTION The present invention relates to fused 1 ,2,4-thiadiazine and fused 1 ,4-thiazine derivatives, to methods for their preparation, to compositions comprising the compounds, to the use of these compounds as medicaments and their use in therapy e.g. in the treatment of diseases of the central nervous system, the cardiovascular system, the pulmonary system, the gastrointestinal system and the endocrinological system. BACKGROUND OF THE INVENTION Potassium channels play an important role in membrane potential. Among the different types of potassium channels are the ATP-sensitive (K A τp-) channels which are regulated by changes in the intracellular concentration of adenosine triphosphate. The K A τp-channels have been found in cells from various tissues such as cardiac cells, pancreatic-cells, skeletal muscles, smooth muscles, central neurons and adenohypophysis cells. The channels have been associated with diverse cellular functions for example hormone secretion (insulin from pancreatic beta-cells, growth hormone and prolactin from adenohypophysis cells), vasodilation (in smooth muscle ceils), cardiac action potential duration, neurotransmitter release in the central nervous system. Modulators of the K A τp-channels have been found to be of importance for the treatment of various diseases. Certain sulphonylureas which have been used for the treatment of non-insulin-dependent diabetes mellitus act by stimulating insulin release through an inhibition of the KATP -channels on pancreatic beta-cells. The potassium channel openers, which comprise a heterogeneous group of compounds, have been found to be able to relax vascular smooth muscles and have therefore been used for the treatment of hypertension. In addition, potassium channel openers can be used as bronchodilators in the treatment of asthma and various other diseases. Furthermore, potassium channel openers have been shown to promote hairgrowth, and have been used for the treatment of baldness. Potassium channel openers are also able to relax urinary bladder smooth muscle and therefore, can be used for the treatment of urinary incontinence. Potassium channel openers which relax smooth muscle of the uterus can be used for treatment of premature labor. By acting on potassium channels of the central nervous system these compounds can be used for treatment of various neurological and psychiatric diseases such as Alzheimer, epilepsia and cerebral ischemia. Recently, it has been shown that Diazoxide (7-chloro-3-methyl-2H-1 ,2,4-benzothiadiazine 1 ,1-dioxide) and certain 3-(alkylamino)-4H-pyrido[4,3-e]-1,2,4-thiadiazine 1 ,1-dioxide derivatives inhibit insulin release by an activation of K A rp-chaπnels on pancreatic beta-cells (Pirotte B. et al. Biochem. Pharmacol, 47, 1381-1386 (1994); Pirotte B. et al., J. Med. Chem., 36, 3211-3213 (1993). Diazoxide has furthermore been shown to delay the onset of diabetes in BB-rats ( lahos WD et al. Metabolism 40, 39-46 (1991). In obese zucker rats diazoxide has been shown to decrease insulin secretion and increase insulin receptor binding and consequently improve glucose tolerance and decrease weight gain (Alemzadeh R. et al. Endocrinol. 133. 705-712, 1993). It is expected that such compounds can be used for treatment of diseases characterised by an overproduction of insulin and for the treatment and prevention of diabetes. EP 618 209 discloses a class of pyridothiadiazine derivatives having an alkyl or an alkylamino group in position 3 of the thiadiazine ring. These compounds are claimed to be agonists at the AMPA- glutamate receptor. In J. Med. Chem. 1980, 23, 575-577 the synthesis of 4(5)-amino-and formylaminoimidazo-5(4) carboxamide and their properties as agents of chemotherapeutic value are described. Especially, the compounds 3-aminoimidazo[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide and N-benzoylaminoimidazo[4,5-e]- 1 ,2,4-thiadiazine 1 ,1-dioxide are shown. DESCRIPTION OF THE INVENTION The present invention relates to fused 1 ,2,4-thiadiazine and fused 1 ,4-thiazine derivatives of the ge- neral formula I: wherein B represents >NR 5 or >CR 5 R 6 , wherein R 5 and R 6 independently are hydrogen; hydroxy; d. 6 -alkoxy; or Cvβ-alkyl, C 3 -s-cycloalkyl, C 2 . 6 -alkenyl or C 2 ^-alkynyl optionally mono- or polysubstituted with halogen; or R 5 and R 4 together represent one of the bonds in a double bond between the atoms 2 and 3 of formula I; D represents - S(=0) 2 - or -S(=0)-; or D-B represents -S(=0)(R 7 )=N- wherein R 7 is C 1 . 6 -alkyl; or aryl or heteroaryl optionally mono- or polysubstituted with halogen, hydroxy, C^s-alkoxy, aryloxy, arylalkoxy, nitro, amino, C^monoalkyl- or dialkylamino, cyano, acyl, or Ci-s-alkoxycarbonyl; R 1 is hydrogen; hydroxy; Cι- 6 -alkoxy; or C 1-6 -alkyl, C^cycloalkyl, C 2 _s- alkenyl or C 2 . 6 -alkynyl optionally mono- or polysubstituted with halogen and R 4 is hydrogen or R 4 together with R 5 represent one of the bonds in a double bond between the atoms 2 and 3 of formula I; or R 1 together with R 4 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I; R 2 is hydrogen; hydroxy; Ci-s-alkoxy; or C h alky!, C^e-cycloalkyl, C . 6 - alkenyl or C 2 - 6 -alkynyl optionally mono- or polysubstituted with halogen; R 3 is R 8 ; -OR 8 ; -C(=X)R 8 ; -NR 8 R 9 ; bicycloalkyi, aryl, heteroaryl, arylalkyl or heteroarylalkyl optionally mono- or polysubstituted with halogen, hydroxy, C^alkoxy, aryloxy, arylalkoxy, nitro, amino, C 1 - 5 - monoalkyl- or dialkylamino, cyano, oxo, acyl or C 1-6 -alkoxycarbonyl; or aryl substituted with C h alky!; wherein R 8 is hydrogen; C 3 -s-cycloalkyl or group optionally being mono- or polysubstituted with Ci-s-alkyl, halogen, hydroxy or Ci-s-alkoxy; a 3-6 membered saturated ring system comprising one or more nitrogen-, oxygen- or sulfur atoms; or straight or branched C^e-alky! optionally mono- or polysubstituted with halogen, hydroxy, d-s-alkoxy, Cι_ 6 -alkylthio, C^s-cycloalkyl, aryl, aryloxy, arylalkoxy, nitro, amino, d. 6 - monoalkyl- or dialkylamino, cyano, oxo, formyl, acyl, carboxy, d. 6 -alkoxycarbonyl, or carbamoyl; X is O or S; R 9 is hydrogen; d-g-alkyl; C 2 -s-alkenyl; C3-6-cycloalkyl optionally mono- or polysubstituted with Cι_s- alkyl, halogen, hydroxy or Cι- 6 -aIkoxy; or R 8 and R 9 together with the nitrogen atom form a 3-12 membered mono- or bicyclic system, in which one or more of the carbon atoms may be exchanged with nitrogen, oxygen or sulfur, each of these ring systems optionally being mono- or polysubstituted with halogen, d_s-alkyl, hydroxy, d^alkoxy, d-s-alkoxy-d-o-alkyl, nitro, amino, cyano, trifluoromethyl, or dialkylamino, oxo; or wherein n,m,p independently are 0,1,2,3 and R 10 is hydrogen; hydroxy; Cι.6-alkoxy; optionally mono- or polysubstituted with Cι. 6 -alkyl, halogen, hydroxy or d.e-alkoxy; C ^-alkyl, C 2 ^- alkenyl or C 2 ^-alkynyl optionally mono- or polysubstituted with halogen; or R 2 and R 3 together with the nitrogen atom forms a 3-12 membered mono- or bicyclic system, in which one or more of the carbon atoms may be exchanged with nitrogen, oxygen or sulfur, each of these ring systems optionally being mono- or polysubstituted with halogen, d-e-alkyl, hydroxy, d.e-alkoxy, d-g-alkoxy-d-β-alkyl, nitro, amino, cyano, trifluoromethyl, C 1-6 -monoalkyl- or dialkylamino or oxo; A together with carbon atoms 5 and 6 of formula I represents a 5 or 6 membered heterocyclic system comprising one or more nitrogen-, oxygen- or sulfur atoms, the heterocyclic systems optionally being mono- or polysubstituted with halogen; d. 12 -alkyl; d-β-alkyl; nitro; amino; cyano; cyanomethyl; perhalomethyl; d_6-monoalkyl- or dialkylamino; sulfamoyl; Cι. 6 -alkylthio; Ci-ralkylsulfonyl; d.6-alkylsulfinyl; d-e-alkylcarbonylamino; arylthio, arylsulfinyl, arylsulfonyl, the aryl group optionally being mono- or polysubstituted with d-s-alkyl, halogen, hydroxy or Cι.<ralkoxy; Cι. 6 -alkoxycarbonyl; d-e-alkoxycarbonyl-d-e-alkyl; carbamyl; carbamyl-methyl; d^-monoalkyl- or dialkylaminocarbonyl; Ci-s-monoalkyl- or dialkylaminothiocarbonyl; ureido; d-β-monoalkyl- or dialkylaminocarbonylamino, thioureido; d_s- monoalkyl- or dialkylaminothiocarbonyl-amino; d. 6 -monoalkyl- or dialkylaminosulfonyl; carboxy; carboxy-Ci.g-alkyl; acyl; aryl, arylalkyl, aryloxy, the aryl group optionally being mono- or polysubstituted with Cι. 6 -alkyl, halogen, hydroxy or d. 6 -alkoxy; (1 ,2,4-oxadiazol-5-yl)- or (1 ,2,4- oxadiazol-3-yl)-d. 6 -alkyl the oxadiazolyl group optionally being substituted with C^-alkyl or C3.6- cycloalkyl; or a 5 - 6 membered nitrogen containing ring, optionally substituted with phenyl or d-e- alkyl ; provided that A together with carbon atoms 5 and 6 of formula I do not form a pyridine ring and that the following compounds 3-amino-2,5-dihydroimidazo[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide and 3- benzoylamino-2,5-dihydroimidazo[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide are not included; or a salt thereof with a pharmaceutically acceptable acid or base. Within its scope the invention includes all optical isomers of compounds of formula I, some of which are optically active, and also their mixtures including racemic mixture thereof. The scope of the invention also includes all tautomeric forms of the compounds of formula I. The salts include pharmaceutically acceptable acid addition salts, pharmaceutically acceptable metal salts or optionally alkylated ammonium salts, such as hydrochloric, hydrobromic, hydroiodic, phosphoric, sulfuric, trifluoroacetic, trichloroacetic, oxalic, maleic, pyruvic, malonic, succinic, citric, tartaric, fumaric, mandelic, benzoic, cinnamic, methanesulfonic, ethane sulfonic, picric and the like, and include acids related to the pharmaceutically acceptable salts listed in Journal of Pharmaceutical Science, 66, 2 (1977) and incoφorated herein by reference, or lithium, sodium, potassium, mag- nesium and the like. The term "d^-alkoxy" as used herein, alone or in combination, refers to a straight or branched monovalent substituent comprising a Ci-s-alkyl group linked through an ether oxygen having its free valence bond from the ether oxygen and having 1 to 6 carbon atoms e.g. methoxy, ethoxy, propoxy, isopropoxy, butoxy, pentoxy. The term "d-s-alkylthio" as used herein, alone or in combination, refers to a straight or branched monovalent substituent comprising a lower alkyl group linked through a divalent sulfur atom having its free valence bond from the sulfur atom and having 1 to 6 carbon atoms e.g. methylthio, ethylthio, propylthio, butylthio, pentylthio. The term "C 2 . 6 -alkenyl" as used herein refers to an unsaturated hydrocarbon chain having 2-6 carbon atoms and one double bond such as e.3. vinyl, 1-propenyl, allyl, isopropenyl, n-butenyl, n-pentenyl and n-hexenyl. The term C 3 . 6 -cycloalkyl" as used herein refers to a radical of a saturated cyclic hydrocarbon with the indicated number of carbons such as cyclopropyl, cyclobutyl, cyclopentyl or cyclohexyl. The term "C 2-6 -alkynyl" as used herein refers to unsaturated hydrocarbons which contain triple bonds, such as e.g. -C≡CH, -C≡CCH 3 , -CH 2 C≡CH, -CH 2 CH 2 C--CH, -CH(CH 3 )C--CH, and the like. The term "C 1 . 6 -alkoxy-C 1 . 6 -alkyl" as used herein refers to a group of 2-12 carbon atoms interrupted by an O such as e.g. CH 2 -0-CH 3 , CH 2 -0-CH 2 -CH 3 , CH 2 -0-CH(CH 3 ) 2 and the like. The term "halogen" means fluorine, chlorine, bromine or iodine. The term "perhalomethyl" means trifluoromethyl, trichloromethyl, tribromomethyl or triiodomethyl. The terms "d. 6 -alkyl", "Cι.i 2 -alkyl" and "Cι.ι 8 -alkyl" as used herein, alone or in combination, refers to a straight or branched, saturated hydrocarbon chain having the indicated number of carbon atoms such as e.g. methyl, ethyl, n-propyl, isopropyl, n-butyl, sec-butyl, isobutyl, tert-butyl, n-pentyl, 2- methylbutyl, 3-methylbutyl, 4-methylpentyl, neopentyl, n-hexyl, 1 ,2-dimethylpropyl, 2,2- dimethylpropyl, 1 ,2,2-trimethylpropyl and the like. The term "d-iβ-alkyl" as used herein also includes secondary C 3-6 -alkyl and tertiary C 4 _ 6 -alkyl. The term "Cι. 6 -monoalkylamino" as used herein refers to an amino group wherein one of the hydrogen atoms is substituted with a straight or branched, saturated hydrocarbon chain having the indicated number of carbon atoms such as e.g. methylamino, ethylamino, propylamino, n-butylamino, sec-butylamino, isobutylamino, tert-butylamino, n-pentylamino, 2-methylbutylamino, n-hexylamino, 4- methylpentylamino, neopentylamino, n-hexylamino, 2,2-dimethylpropylamino and the like. The term "d-s-dialkylamino" as used herein refers to an amino group wherein the two hydrogen atoms independently are substituted with a straight or branched, saturated hydrocarbon chain having the indicated number of carbon atoms; such as dimethylamino, N-ethyl-N-methylamino, diethylamino, dipropylamino, N-(n-butyl)-N-methylamino, di(n-pentyl)amiπo, and the like. The term "acyl" as used herein refers to a monovalent substituent comprising a C 1 _ s -alkyl group linked through a carbonyl group; such as e.g. acetyl, propionyl, butyryl, isobutyryl, pivaloyl, valeryl, and the like. The term "Ci.e-alkoxycarbonyP' as used herein refers to a monovalent substituent comprising a d. 6 - alkoxy group linked through a carbonyl group; such as e.g. methoxycarbonyl, carbethoxy, propoxycarbonyl, isopropoxycarbonyl, n-butoxycarbonyl, sec-butoxycarbonyl, tert-butoxycarbonyl, 3- methylbutoxycarbonyl, n-hexoxy carbony I and the like. The term "3-12 membered mono- or bicyclic system" as used herein refers to a monovalent substituent of formula -NR R 3 or -NR 8 R 9 where R 2 and R 3 , or R 8 and R 9 together with the nitrogen atom form a 3-12 membered mono- or bicyclic system, in which one or more of the carbon atoms may be exchanged with nitrogen, oxygen or sulfur, such as 1-pyrrolidyl, piperidino, morpholino, thiomoφholino, 4-methylpiperazin-1-yl, 7-azabicyclo[2.2.1]heptan-7-yl, tropanyl and the like. The term "3-6 membered saturated ring system" as used herein refers to a monovalent substituent comprising a monocyclic saturated system containing one or more hetero atoms selected from nitrogen, oxygen and sulfur and having 3-6 members and having its free valence from a carbon atom, e.g. 2-pyrrolidyl, 4-piperidyl, 3-moφholinyl, 1 ,4-dioxan-2-yl, 5-oxazolidinyl, 4-isoxazolidinyl or 2- thiomoφholinyl. The term "bicycloalkyi" as used herein refers to a monovalent substituent comprising a bicyclic structure made of 6-12 carbon atoms such as e.g. 2-norbornyl, 7-norbornyl, 2-bicyclo[2.2.2]octyl and 9-bicyclo[3.3.1]nonanyl. The term "aryl" as used herein refers to phenyl, 1-naphthyl or 2-naphthyl. The term "heteroaryl" as used herein, alone or in combination, refers to a monovalent substituent comprising a 5-6 membered monocyclic aromatic system or a 9-10 membered bicyclic aromatic system containing one or more heteroatoms selected from nitrogen, oxygen and sulfur, e.g. pyrrole, imidazole, pyrazole, triazole, pyridine, pyrazine, pyrimidine, pyridazine, isothiazole, isoxazole, oxazole, oxadiazole, thiadiazole, quinoline, isoquinoline, quinazoline, quinoxaline, indole, benzimidazole, benzofuran, pteridine and purine. The term "arylalkyl" as used herein refers to a straight or branched saturated carbon chain containing from 1 to 6 carbons substituted with an aromatic caΦohydride; such as benzyl, phenethyl, 3- phenylpropyl, 1-naphtylmethyl, 2-(1-naphtyl)ethyl and the like. The term "aryloxy" as used herein refers to phenoxy, 1-naphthyloxy or 2-naphthyloxy. The term "arylalkoxy" as used herein refers to a Cι. 6 -alkoxy group substituted with an aromatic carbohydride, such as benzyloxy, phenethoxy, 3-phenylpropoxy, 1-naphthylmethoxy, 2-(1- naphtyl)ethoxy and the like. The term "heteroarylalkyl" as used herein refers to a straight or branched saturated carbon chain containing from 1 to 6 carbons substituted with a heteroaryl group; such as (2-furyl)methyl, (3- furyl)methyl, (2-thienyl)methyl, (3-thienyl)methyl, (2-pyridyl)methyl, 1 -methyl-1 -(2-pyrimidyl)ethyl and the like. The term "d. 6 -alkylsulfonyl" as used herein refers to a monovalent substituent comprising a d. 6 -alkyl group linked through a sulfonyl group such as e.g. methylsulfonyl, ethylsulfonyl, n-propylsulfonyl, isopropylsulfonyl, n-butylsulfonyl, sec-butylsulfonyl, isobutylsulfonyl, tert-butylsulfonyl, π- pentylsulfonyl, 2-methylbutylsulfonyl, 3-methylbutylsulfonyl, n-hexylsulfonyl, 4-methylpentylsulfonyl, neopentylsulfonyl, n-hexylsulfonyl and 2,2-dimethylpropylsulfonyl. The term "d^-monoalkylaminosulfoπyl" as used herein refers to a monovalent substituent comprising a d. 6 -monoalkylamino group linked through a sulfonyl group such as e.g. methylaminosulfonyl, ethylaminosulfonyl, n-propylaminosulfonyl, isopropylaminosulfoπyl, n- butylaminosulfonyl, sec-butylaminosulfonyl, isobutylaminosulfonyl, tert-butylaminosulfonyl, n- pentylaminosulfonyl, 2-methylbutylaminosulfonyl, 3-methylbutylaminosulfonyl, n-hexylaminosulfonyl, 4-methylpentylaminosulfonyl, neopentylaminosulfonyl, n-hexylaminosulfonyl and 2,2- dimethylpropylaminosulfonyl. The term "C 1 - s -dialkylaminosulfonyl" as used herein refers to a monovalent substituent comprising a d. 6 -dialkylamino group linked through a sulfonyl group such as dimethylaminosulfonyl, N-ethyl-N- methylaminosulfonyl, diethylaminosulfonyl, dipropylaminosulfonyl, N-(n-butyl)-N- methylaminosulfonyl, di(n-pentyl)aminosulfonyl, and the like. The term "d- 5 -alkylsulfιnyl" as used herein refers to a monovalent substituent comprising a straight or branched d-e-alkyl group linked through a sulfmyl group (-S(=0)-); such as e.g. methylsulf inyl, ethylsulfinyl, isopropylsulfinyl, butylsulfinyl, pentylsulfinyl, and the like. The term "d. 6 -alkylcarbonylamino" as used herein refers to an amino group wherein one of the hydrogen atoms is substituted with an acyl group, such as e.g. acetamido, propionamido, isopropylcarbonylamino, and the like. The term "(C 3 . 6 -cycloalkyl)Cι. 6 -alkyl" as used herein, alone or in combination, refers to a straight or branched, saturated hydrocarbon chain having 1 to 6 carbon atoms and being monosubstituted with a C 3 ^-cycloalkyl group, the cycloalkyl group optionally being mono- or polysubstituted with d-β-alkyl, halogen, hydroxy or Cι.ralkoxy; such as e.g. cyclopropylmethyl, (l-methylcyclopropyl)methyl, 1- (cyclopropyl)ethyl, cyclopentylmethyl, cyclohexylmethyl, and the like. The term "arylthio" as used herein, alone or in combination, refers to an aryl group linked through a divalent sulfur atom having its free valence bond from the sulfur atom, the aryl group optionally being mono- or polysubstituted with d-e-alkyl, halogen, hydroxy or Cι. 6 -alkoxy; e.g. phenylthio, (4- methylphenyl)- thio, (2-chlorophenyl)thio, and the like. The term "arylsulfinyl" as used herein refers to an aryl group linked through a sulfmyl group (-S(=0)-), the aryl group optionally being mono- or polysubstituted with halogen, hydroxy or d-s- alkoxy; such as e.g. phenylsulfinyl, (4-chlorophenyl)sulfinyl, and the like. The term "arylsulfonyl" as used herein refers to an aryl group linked through a sulfonyl group, the aryl group optionally being mono- or polysubstituted with halogen, hydroxy or Ci-s-alkoxy; such as e.g. phenylsulfonyl, tosyl, and the like. The term "d. 6 -monoalkylaminocarbonyl" as used herein refers to a monovalent substituent comprising a Cι- 6 -monoalkylamino group linked through a carbonyl group such as e.g. methylaminocarbonyl, ethy laminocarbonyl, n-propylaminocarbonyl, isopropylaminocarbonyl, n- butylaminocarbonyl, sec-buty laminocarbonyl, isobutylaminocarbonyl, tert-butylaminocarbonyl, n- pentylaminocarbonyl, 2-methylbutytaminocarbonyl, 3-methylbutylaminocarbonyl, n-hexylamino- carbonyl, 4-methylpentylaminocarbonyl, neopentylaminocarbonyl, n-hexylaminocarbonyl and 2-2- dimethylpropylaminocarbonyl. The term H d. 6 -dialkylaminocarbonyr as used herein refers to a monovalent substituent comprising a d-β-dialkytamino group linked through a carbonyl group such as dimethylaminocarbonyl, N-ethyl-N- methylaminocarbonyl, diethylaminocarbonyl, dipropylaminocarbonyl, N-(n-butyl)-N- methylaminocaΦonyl, di(n-pentyl)aminocarbonyl, and the like. The term "Cι. 6 -monoalkylaminocarbonylamino" as used herein refers to an amino group wherein one of the hydrogen atoms is substituted with a Cι_s-monoalkylaminocarbonyl group, e.g. methylaminocarbonylamino, ethylamino-carbonylamino, n-propylaminocarbonylamino, isopro- pylaminocarbonylamino, n-butylaminocarbonylamino, sec-butylaminocarbonylamino, iso- butylaminocarbonylamino, tert-butylaminocarbonylamino, and 2-methylbutylaminocarbonylamino. The term "Cι. 6 -dialkylaminocarbonylamino" as used herein refers to an amino group wherein one of the hydrogen atoms is substituted with a d-β-dialkylaminocarbonyl group, such as dimethylaminocarbonylamino, N-ethyl-N-methylaminocarbonylamino, diethylaminocarbonylamino, dipropylaminocarbonylamino, N-(n-butyl)-N-methylaminocarbonylamino, di(n- pentyl)aminocaΦonylamino, and the like. The term "5- or 6-membered heterocyclic system" as used herein refers to: a monocyclic unsaturated or saturated system containing one, two or three hetero atoms selected from nitrogen, oxygen and sulfur and having 5 members, e.g. pyrrole, furan, thiophene, pyrroline, dihydrofuran, dihydrothiophene, imidazole, imidazoline, pyrazole, pyrazoline, oxazole, thiazole, isoxazole, isothiazole, 1 ,2,3-oxadiazole, furazan, 1 ,2,3-triazole, 1 ,2,3-thiadiazole or 2,1 ,3-thiadiazole; an aromatic monocyclic system containing two or more nitrogen atoms and having 6 members, e.g. pyrazine, pyrimidine, pyridazine, 1 ,2,4-triazine, 1 ,2,3-triazine ortetrazine; a non-aromatic monocyclic system containing one or more hetero atoms selected from nitrogen, oxygen and sulfur and having 6 members, e.g. pyran, thiopyran, piperidine, dioxane, oxazine, isoxazine, dithiane, oxathine, thiazine, piperazine, thiadiazine, dithiazine or oxadiazine. The term "5- or 6-membered nitrogen containing ring" as used herein refers to a monovalent substituent comprising a monocyclic unsaturated or saturated system containing one or more nitrogen atoms and having 5 or 6 members, e.g. pyrrolidinyl, pyrrolinyl, imidazolidinyl, pyrazolidinyl, pyra- zolinyl, piperidyl, piperazinyl, pyrrolyl, 2H-pyrrolyl, imidazolyl, pyrazolyl, triazolyl, pyridyl, pyraztnyl, pyrimidinyl, pyridazinyl, moφholino, thiomoφholino, isothiazolyl, isoxazolyl, oxazolyl, oxadiazolyl, thiadiazolyl, 1,3-dioxolanyl and 1 ,4-dioxolanyl. Within its scope the invention includes all optical isomers of compounds of formula I, some of which are optically active, and also their mixtures including racemic mixture thereof. In a preferred embodiment of the invention the general formula of formula I is selected from wherein R 1 and R 5 independently are hydrogen; hydroxy; d-e-alkoxy; or C 1-6 -alkyl, C 3 .β-cycloalkyl, C 2 . 6 -alkenyl or C 2 _ 6 -alkynyl optionally mono- or polysubstituted with halogen and R 4 is hydrogen; or R 4 together with R 5 represent one of the bonds in a double bond between the atoms 2 and 3 of formula I and R 1 is as defined above; or R 4 together with R 1 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I and R 5 is as defined above; D represents -S(=0) 2 - or -S(=0)-. In another preferred embodiment of the invention the general formula of formula I is selected from wherein R 1 is hydrogen; hydroxy; Ci-s-alkoxy; or Ci-s-alkyl, C 3 - 6 -cycloalkyl, C 2 _s-alkenyl or C 2 -6-alkynyl optionally mono- or polysubstituted with halogen and R 4 is hydrogen; or R 4 together with R represent one of the bonds in a double bond between the atoms 3 and 4 of formula I; D represents -S(=0)R 7 = wherein R 7 is d-β-alkyl; or aryl or heteroaryl optionally mono- or polysubstituted with halogen, hydroxy, Cve-alkoxy, aryloxy, arylalkoxy, nitro, amino, Ci-s-monoalkyl- or dialkylamino, cyano, acyl or d-s-alkoxy carbonyl. In another preferred embodiment of the invention the general formula of formula I is selected from wherein R 1 , R 5 and R 6 independently are hydrogen; hydroxy; Ci-s-alkoxy; or Ci-β-alkyl, C^e-cycloalkyl, C 2 . 6 - alkenyl or C 2 - 6 -alkynyl optionally mono- or polysubstituted with halogen and R 4 is hydrogen; or R 4 together with R 5 represent one of the bonds in a double bond between the atoms 2 and 3 of formula I and R 1 and R 6 are as defined above; or R 4 together with R 1 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I and R 5 and R 6 are as defined above; D represents -S(=0) 2 - or S(=0). Preferably, the general formula of formula I is (la). In another preferred embodiment of the invention D is -S(=0) 2 -. In another preferred embodiment of the invention R 1 is selected from hydrogen, dialkyl, C3^- cycloalkyl or C 2 -s-alkenyl. Preferably R 1 is hydrogen or d-s-alkyl. In another preferred embodiment of the invention R 1 together with R 4 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I. In another preferred embodiment of the invention R 4 together with R 5 represent one of the bonds in a double bond between the atoms 2 and 3 of formula I. In another preferred embodiment of the invention R 2 is selected from hydrogen, hydroxy, d- 6 -alkyl, C 3 - 6 -cycloalkyl or C 2 _s-alkenyl. Preferably R 2 is hydrogen or C 1-6 alkyl. In another preferred embodiment of the invention R 3 is selected from R 8 ,-OR 8 , -NR 8 R 9 or aryl, the aryl group optionally being substituted with d-e-alkyl; wherein R 8 is hydrogen; C 3 - 6 -cycloalkyl; (C^e- cycloalkyl)d. 6 -alkyl; a 3-6-membered saturated ring system comprising one, two or three nitrogen-, oxygen- or sulfur atoms; or straight or branched d. 18 -alkyl optionally substituted with halogen, hydroxy, d. 6 -alkoxy, d. 6 -alkylthio, C 3 ^-cycloalkyl or aryl; R 9 is hydrogen, d-e-alkyl or C 3 - 6 -cycloalkyl; or R 8 and R 9 together with the nitrogen atom form a 4 - 6 membered ring, preferably 1-pyrrolidyl, piperidine or moφholino. In yet another preferred embodiment of the invention R 3 is selected from secondary C h alky!, tertiary C β-alkyl, C 3 -s-cycloalkyl or (C 3 - 3 -cycloalkyl)methyl optionally mono- or polysubstituted with d-s-alkyl, halogen, hydroxy or Preferably R 3 is selected from isopropyl, 1-methylpropyl, 2-methylpropyl, tert-butyl, 1 ,1-dimethylpropyl, 1 ,2-dimethylpropyl, 1 ,2,2-trimethylpropyl, 2,3-dimethylbutyl, 1-ethylpropyl, 1- ethyl-2-methylpropyl, 1-ethyl-2,2-dimethylpropyl, 2,3,3-trimethylbutyl, 2-methylbutyl, 1,5-dimethylhexyl, 3- methylbutyl, 3-methylhexyl, cyclopropyl, 1-methylcyclopropyl, cyclobutyl, cyclopentyl, cyclohexyl, cyclopropylmethyl, 1-(cyclopropyl)ethyl cyclobutylmethyl, cyclopentylmethyl or cyclohexy lmethyl. In a further preferred embodiment of the invention R 2 and R 3 together with the nitrogen atom forms a six membered ring, optionally substituted in the 2-position with a d.6-alkyl group, preferably selected from methyl, ethyl or isopropyl. Preferably the six membered ring is a piperidine, piperazine, morpholine or thiomorpholine ring. In another preferred embodiment of the invention R 7 is selected from C 1-6 -alkyl, phenyl or pyridyl. In another preferred embodiment of the invention A forms together with carbon atoms 5 and 6 of formula I a 5 membered heterocyclic system containing one hetero atom selected from nitrogen and sulfur, a 5 membered heterocyclic system containing two hetero atoms selected from nitrogen, oxygen and sulfur, a 6 membered aromatic heterocyclic system containing two or three nitrogen atoms, a 6 membered non-aromatic heterocyclic system containing one or two hetero atoms selected from nitrogen, oxygen and sulfur; the heterocyclic systems optionally being mono- or disubstituted with halogen; Cι.ι 2 -alkyl; C 3 -s-cycloalkyl; cyano; cyanomethyl; perhalomethyl; sulfamoyi; d-e-alkylthio; d- 6 -alkylsulfonyl; d.«-alkylsulfinyl; arylthio, arylsulfinyl, arylsulfonyl, the aryl group optionally being mono- or polysubstituted with Ci-s-alkyl, halogen, hydroxy or Ci-s-alkoxy; d-6-alkoxycarbonyl-d.e- alkyl; carbamylmethyl; carboxy-Ci-s-alkyl; aryloxy; (I .Σ^-oxadiazol-δ-y - or O .∑ -oxadiazol-S-y d.e- alkyl, the oxadiazolyl group optionally being substituted with d-s-alkyl or C 3 - 6 -cycloalkyl; acyl; or a 5 - 6 membered nitrogen containing ring, optionally substituted with phenyl or d-β-alkyl. Preferably, A forms together with carbon atoms 5 and 6 a thieno[3,2-e]- or pyrrolo[3,2-e]-ring, thiophene, imidazole, thiazole, pyrazole, isoxazole or isothiazole, a pyrazino[2,3-e]-, a pyrimido[4,5- e , a pyrimido[5,4-e]-, a pyridazino[4,5-e}- or a pyridazino[4,3-e ring, thiopyran, piperidine, dioxane , oxazine or dithiane. Prefe ed compounds of the invention are: 6-Chloro-3-(1 ,2-dimethylpropyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-ethylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-isopropylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; (R)-6-Chloro-3-(1-phenylethyl)amino-4H-thieno[3,2-e]-1,2,4-thiadiazine 1 ,1-dioxide; 3-Allylamino-6-chloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-cyclopropylamino-4H-thieno[3,2-e 1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-hexylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-tetradecylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide 6-Chloro-3-methylamino-4H-thieno[3,2-el-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-Benzylamino-6-chloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-octylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-isobutylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-(4-phenylbutyl)amino-4H-thieno[3,2-e 1,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-(1 ,5-dimethylhexyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiaziπe 1 ,1-dioxide; 6-Chloro-3-propylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1,1-dioxide; (R)-6-Chloro-3-(2-hydroxy-1-methylethyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; (S)-6-Chloro-3-(2-hydroxy-1-methylethyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; (R)-3-sec-Butylamino-6-chloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-Butylamino-6-chloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-lsopropylamino-7-methyl-4,7-dihydro-pyrazolo[4,3-e][1 ,2,4]thiadiazine 1 ,1-dioxide; (S)-6-Chloro-3-(1 ,2-dimethylpropylamino-4H-thienof3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; (R)-6-Chloro-3-(1 ,2-dimethylpropylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-lsopropylamino-6-methyl-4H-thiazolo[4,5-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-Hexylamino-6-methyl-4H-thiazolo[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-methyl-3-octylamino-4H-thiazolo[4,5-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-isopropylamino-4H-thiazolo[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Dimethylamino-3-isopropylamino-4H-thiazolo[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Bromo-3-isopropylamino-4H-thiazolo[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-lsopropylamino-4H-thiazolo[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Ethyrthio-3-isopropylamino-4H-thiazolo[4,5-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-lsopropylamino-6-methoxy-4H-thiazolo[4,5-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-lsopropylamino-4H-thiazolo[5,4-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Bromo-3-isopropylamino-4H-thiazolo[5,4-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-5-bromo-3-isopropylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 5,6-Dibromo-3-isopropylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Benzenesulfonyl-3-isopropylamino-4H-thieno[3,2-e]-1,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-isopropylamino-5-nitro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-lsopropylamino-5-methyl-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-lsopropylamino-5-phenyl-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-lsopropylamino-6-phenyl-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Cyano-3-isopropylamino-5-methyl-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Cyano-3-isopropylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-lsopropylamino-5,6-dimethyl-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 5-Cyclopropyl-3-isopropylamιno-4H-thieno[3,2-e]-1,2,4-thiadiazine 1 ,1 -dioxide; 3-lsopropylamino-5-(4-methoxyphenyl)-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 5-Cyclohexyl-3-isopropylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 5-Ethyl-3-isopropylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-(3-methylbutyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-(3-methylhexyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-lsopropylamino-4H-thieno[2,3-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-lsopropylamino-7-methyl-4H-thieno{2,3-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 7-Cyano-3-isopropylamino-6-methyl-4H-thieno[2,3-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-lsopropylamino-7-ethyl-4H-thieno[2,3-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 7-Cyano-3-isopropylamino-6-methylthio-4H-thieno[2,3-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 7-Cyano-3-isopropylamino-4H-thieno[2,3-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-lsopropylamino-4H-thieno[3,4-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 5,7-Dichloro-3-isopropylamino-4H-thieno[3,4-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-Cyclopropylamino-7-methyl-4,7-dihydro-pyrazolo[4,3-e][1 ,2,4]thiadiazine 1 ,1-dioxide; 3-Hexylamino-7-methyl-4,7-dihydro-pyrazolo[4,3-e][1 ,2,4]thiadiazine 1 ,1-dioxide; 7-Methyl-3-octylamino-4,7-dihydro-pyrazolo[4,3-e][1 ,2,4]thiadiazine 1 ,1-dioxide; 2,5-Dihydro-3-isopropylamino-imidazo[4,5-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 2,5-Dihydro-3-isopropylamino-5-methyl-imidazo[4,5-e]-1,2,4-thiadiazine 1 ,1-dioxide; 2,7-Dihydro-3-isopropylamino-7-methyl-imidazo[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-lsopropylamino-4H-pyrazino[2,3-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-lsopropylamino-5,7-dimethyl-6,8-dioxo-5,6,7,8-tetrahydro-4H-pyrimido[4,5-e]-1 ,2,4-thiadiazine 1 ,1- dioxide; 3-(1 ,2-Dimethylpropyl)amino-2H-pyrazino[2,3-e]-1 ,2,4-thiadiazine 1,1-dioxide; 3-(1-Methylpropyl)amino-2H-pyrazino[2,3-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-(2-Methylpropyl)amino-2H-pyrazino[2,3-e]-1 ,2,4-thiadiaziπe 1 ,1-dioxide; 3-Butylamino-2H-pyrazino[2,3-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-Propylamino-2H-pyrazino[2,3-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-(1 ,2,2-Trimethylpropyl)amino-2H-pyrazino[2,3-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-(1 ,2-dimethylpropyl)amino-2H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 6-Chloro-3-(1-methylpropyl)amino-2H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 6-Chloro-3-(2-methylpropyl)amino-2H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 3-Butylamino-6-chloro-2H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 6-Chloro-3-propylamino-2H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 6-Chloro-3-(1 ,2,2-trimethylpropyl)amino-2H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 3-(1 ,2-Dimethylpropyl)amino-2H-thieno[2,3-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 3-(1 -Methylpropyl)amino-2H-thieno[2,3-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 3-(2-Methylpropyl)amino-2H-thieno[2,3-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 3-Butylamino-2H-thieno[2,3-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 3-Propylamino-2H-thieno[2,3-e]-1 ,2,4-thiadiazine 1,1 dioxide; 3-(1 ,2,2-Trimethylpropyl)amino-2H-thieno[2,3-e]-1 ,2,4-thiadiazine 1 ,1 dioxide; 3-(1 ,2-Dimethylpropyl)amino-2H-pyrimido[4,5-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-(1 -Methylpropyl)amino-2H-pyrimido[4,5-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-(2-Methylpropyl)amino-2H-pyrimido[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-Butylamino-2H-pyrimidot4,5-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-Propylamino-2H-pyrimido[4,5-e]-1 ,2,4-thiadiazine 1 , 1 -dioxide; 3-(1 ,2,2-Trimethylpropyl)amino-2H-pyrimido[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-(1 ,2-Dimethylpropyl)amino-2H-pyridazino(4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-(1-Methylpropyl)amino-2H-pyridazinp[4,5-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-(2-Methylpropyl)amino-2H-pyridazino[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-Butylamino-2H-pyridazino[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-Propylamino-2H-pyridazino[4,5-e]-1,2,4-thiadiazine 1,1-dioxide; 3-(1 ^^-Trimethylpropy amino-ΣH-pyridazino^.S-el-l ,2,4-thiadiazine 1 ,1 -dioxide. The compounds of the present invention interact with the potassium channels and hence act as openers or blockers of the ATP-regulated potassium channels, which make them useful in the treatment of various diseases of the cardiovascular system, e.g. cerebral ischemia, hypertension, ischemic heart diseases, angina pectoris and coronary heart diseases; the pulmonary system; the gastrointestinal system; the central nervous system and the endocrinological system. Since some K AT p-openers are able to antagonize vasospasms in basilar or cerebral arteries the compounds of the present invention can be used for the treatment of vasospastic disorders such as subarachnoid haemorrhage and migraine. Potassium channel openers hypeφolarizes neurons and inhibit neurotransmitter release and it is expected that the present compounds can be used for the treatment of various diseases of the central nervous system, e.g. epilepsia, ischemia and neurodegenerative diseases, and for the management of pain. By acting on potassium channels of the central nervous system the compounds of the present invention can be used for treatment of various neurological and psychiatric diseases such as Alzheimer, epilepsia and cerebral ischemia. The compounds of the present invention may also be used for the treatment of diseases associated with decreased skelettal muscle blood flow such as Reynauds disease and intermittent claudication. Further, the compounds of the invention may be used for the treatment of chronic airway diseases, including asthma, and for treatment of detrusor muscle instability secondary to bladder outflow obstruction and therefore for kidney stones by aiding their passage along the ureter. Potassium channel openers also relax urinary bladder smooth muscle, thus, the compounds of the present invention can be used for the treatment of urinary incontinence. The present compounds could also be used for treatment of conditions associated with disturbances in gastrointestinal mobility such as irritable bowel syndrome. Additionally these compounds can be used for the treatment of premature labor and dysmenorrhea. Further, potassium channel openers promote hairgrowth, therefore, the compounds of the present invention can be used for the treatment of baldness. In diseases such as nesidioblastosis and insulinoma in which a hypersecretion of insulin causes severe hypoglycemia the compounds of the present invention can be used to reduce insulin secretion. In obesity hyperinsulinemia and insulin resistance is very frequently encountered. This condition could lead to the development of noninsulin dependent diabetes (NIDDM). It is expected that potassium channel openers and hence the compounds of the present invention can be used for contracting the hyperinsulinemia and thereby prevent diabetes and reduce obesity. In overt NIDDM treatment of hyperinsulinemia with potassium channel openers, and hence the present compounds, can be of benefit in restoring glucose sensitivity and normal insulin secretions. In early cases of insulin dependent diabetes (IDDM) or in prediabetic cases, potassium channel openers and hence the present compounds can be used to induce betacell rest which may prevent the progression of the autoimmune disease. Compounds of the present invention which act as blockers of KΛTP -channels can be used for the treatment of NIDDM. Preferably, the compounds of the present invention may be used for treatment or prevention of di¬ seases of the endocrinological system such as hyperinsuiinaemia and diabetes. Accordingly, in another aspect the invention relates to a compound of the general formula I or a pharmaceutically acceptable acid addition salt thereof for use as a therapeutically acceptable substance, preferably for use as a therapeutically acceptable substance in the treatment of hyperinsuiinaemia and treatment or prevention of diabetes. Furthermore, the invention also relates to the use of the inventive compounds of formula I as medicaments useful for treating hyperinsuiinaemia and treating or preventing diabetes . In yet another aspect, the present invention relates to methods of preparing the above mentioned compounds. The methods comprises: a) reacting a compound of formula II: wherein A, B, D, R 1 and R 4 are as defined above and Z is a leaving group such as alkoxy, alkylthio, halogen, preferentially chloro, bromo, iodo, trimethylamino, or methylsulfonyl with a compound of formula III: wherein R and R 3 are defined above to form a compound of the general formula I using procedures described by e.g. T. H. Cronon et al., J. Med. Chem. H, 136 (1968); L. Raffa et al., Farmaco Ed. Sci. 29, 411 (1974); B. Pirotte et al., J. Med. Chem. 36, 3211 (1993). Another method comprises: b) reacting a compound of formula IV: wherein R 1 is hydrogen and A, B, D and X are as defined above, or B is NH and R 1 , A, D and X are as defined above, with the compound of formula III, or a suitable salt thereof in the presence of P 2 O s and a high boiling tertiary amine or a suitable salt therof using a procedure described by Jensen K.G. and Pedersen E.B., Chem. Ser., 20, 248-250 (1988) and Andersen L, Nielsen F.E. and Pedersen E.B., Chem. Ser., 29, 45-49 (1989), to form a compound of the general formula I. c) reacting a compound of the formula IV: wherein R 1 is hydrogen and A, B, D and X are as defined above or B is NH and R 1 , A, D and X are as defined above, with a compound of the formula III, or a suitable salt thereof in the presence of titanium tetrachloride and a solvent with which it may form a complex, like e.g. tetrahydrofuran, or a mixture of toluene and anisole, according to the methods described in R.I. Fryer, J.V. Earley, G.F. Field, W. Zally, and L.H. Stembach, J.Org.Chem. 34. 1143-1145 (1969); J.B. Press et al., J.Med.Chem. 2J 725-731 (1979); or G. Roma et al. Eur. J.Med.Chem. 26. 489-496 (1991), to form a compound of the general formula I. d) reacting a compound of formula V wherein R 1 and A are as defined above, with a compound of formula VI R 3 NCO (VI) wherein R 3 is as defined above using the method described by Chern J.W. et al., J. Heterocycl. Chem., 27, 1909-1915 (1990), to form a compound of the general formula I wherein D is S0 2 , B is >NR 5 , R 2 is H, and R 4 and R 5 together form a bond. e) reacting a compound of the formula -V wherein R 1 and A are as defined above, with a compound of formula VII R 3 NHC(=0)CI (VII) wherein R 3 is as defined above using the method described by Chem J.W. et al., J. Heterocycl. Chem., 27, 1909-1915 (1990), to form a compound of the general formula I wherein D is S0 2 , B is >NR 5 , R 2 is H, and R 4 and R 5 together form a bond. f) reacting a compound of the formula V wherein R 1 and A are defined as above, with a compound of formula VIII wherein Y is NH or S, or a suitable salt thereof using procedures described by Kotovskaya S.K. et al. Khim.-Farm. Zh., 13, 54-57 (russ.) (1979) and Topliss J.G. et al., J. Org. Chem., 28, 2313 (1963), to form a compound of the general formula I, wherein D is S0 2 , B is >NR 5 , R 4 and R 5 together form a bond, and R 2 and R 3 are H. g) reacting in the presence of a base a compound of formula IX or a suitable salt thereof, wherein R 11 is R 1 or EtOC(=0), wherein R 1 and A are defined as above, with a compound of formula X R 3 N=C=S (X) wherein R 3 is as defined above, to fonn an adduct which may have either of the two structures XI or XII or be a mixture of the two either of which by ring-closure, e.g. by treatment with phosgene in a suitable solvent, forms a compound of the general formula I, if R 11 is R 1 , wherein D is S(=0) 2 , B is >NR 5 , R 2 is H, and R 4 and R 5 together form a bond, and a compound of the general formula XIII if R 11 is EtOC(=0); h) hydrolyzing and subsequently decarboxylating a compound of the general formula XIII to form a compound of the general structure I, wherein D is S(=0) 2 , B is >NR 5 , R and R 2 are H, and R 4 and R 5 together form a bond, e.g. by heating the starting compound in aqueous base. The starting materials are either known compounds or compounds which may be prepared in analogy with the preparation of known compounds or in analogy with known methods as described by e.g Huang B.-S., et al., J. Med. Chem., 23, 575-7 (1980), Ofitserov V. I. et al., Khim. Geterotsikl. Soedin., 1119-22 (russ.) (1976), Topliss J. G., U.S. 3,641,017 (1972), Kotovskaya S. K. et al., Khim.- Farm. Zh., 13, 54-57 (russ.) (1979), Meyer R. F., J. Heterocycl. Chem., 6, 407-408 (1969) and Hattori M., Yoneda M., and Goto M., Bull. Chem. Soc. Jap., 46, 1890-1 (1973), Williams T.R. and Cram D.J., J. Org. Chem., 38, 20-26 (1973), Barnes A.C., Kennewell P.D. and Taylor J.B., J. Chem. Soc. Chem. Commun., 1973, 776-777, Stoss and Satzinger, Chem. Ber., 109, 2097 (1976), Kresze G., Hatjiissaak A., Phosphorus Sulfur, 29, 41-47 (1987), Dillard R.D., Yen T.T., Stark P., Pavey D.E., J. Med. Chem., 23, 717-722 (1980). PHARMACOLOGICAL METHODS The ability of the compounds to interact with potassium channels can be determined by various methods. When patch-clamp techniques (Hamill O.P., Marty A., Nefer E., Sakman B. and Sigworth F.J., Plϋgers Arch., 39 ., 85-100 (1981» are used the ionic current through a single channel of a cell can be recorded. The activity of the compounds as potassium channel openers can also be measured as relaxation of rat aortas rings according to the following procedure: A section of rat thoracic aorta between the aortic arch and the diaphragm was dissected out and mounted as ring preparations as described by Taylor P.D. et al , BritJ. Pharmacol, HI, 42-48 (1994). After a 45 min. equilibration period under a tension of 2 g, the preparations were contracted to achieve 80% of the maximum response using the required concentration of phenylephrine. When the phenylephrine response reached a plateau, potential vasodilatory agents were added cumulatively to the bath in small volumes using half log molar increments at 2 min intervals. Relaxation was expressed at the percentage of the contracted tension. The potency of a compound was expressed as the concentration required to evoke a 50% relaxation of the tissue. Relaxation of rat aorta rings Compound EC50 micro M 1 1.2 2 15 16 6.1 In the pancreatic b-cell the opening of the K A τp-channels can be determined by measuring the subsequent change in the concentration of cytoplasmic free Ca 2* concentration according to the method of Arkhammer P. et al. , J. Biol. Chem., 262, 5448-5454 (1987). " Rb * efflux from a β-cell line The RIN 5F cell line was grown in RPM1 1640 with Glutamax I, supplemented with 10 % fetal calf serum (from GibcoBRL, Scotland, UK) and maintained in an atmosphere of 5 % C0 2 / 95 % air at 37°C. The cells were detached with a Trypsin-EDTA solution (from GibcoBRL, Scotland, UK), resuspended in medium, added 1 mCi/ml 86 Rb * and replated into microtiter plates (96 well cluster 3596, sterile, from Costar Corporation, MA, USA) at a density of 50000 cells/well in 100 ml/well, and grown 24 hours before use in assay. The plates were washed 4 times with Ringer buffer (150 mM NaCl, 10 mM Hepes, 3.0 mM KCl, 1.0 mM CaCI 2 , 20 mM Sucrose, pH 7.1). Eighty ml Ringer buffer and 1 ml control- or test compound dissolved in DMSO was added. After incubation 1 h at room temperature with a lid, 50 ml of the supernatant was transferred to PicoPlates (Packard Instrument Company, CT, USA) and 100 ml MicroScint40 (Packard Instrument Company, CT, USA) added. The plates were counted in TopCount (Packard Instrument Company, CT, USA) for 1 min/well at the 32 P program. The calculation of EC 50 and E max was done by SlideWrite (Advanced Graphics Software, Inc., CA, USA) using a four parameter logistic curve: y = (a-d)/(1+(x/c) )+d, where a = the activity estimated at concentration zero, b = a slope factor, c = the concentration at the middle of the curve and, d = the activity estimated at infinite concentration. EC S0 = c and E max = d, when the curve is turned of at infinite concentrations. Inhibition of Rb-efflux in rin 5F cells Compound EC50 micro M 1 2.7 16 5.9 The compounds according to the invention are effective over a wide dosage range. In general satisfactory results are obtained with dosages from about 0.05 to about 1000 mg, preferably from about 0.1 to about 500 mg, per day. A most preferable dosage is about 5 mg to about 200 mg per day. The exact dosage will depend upon the mode of administration, form in which administered, the subject to be treated and the body weight of the subject to be treated, and the preference and experience of the physician or veterinarian in charge. The route of administration may be any route, which effectively transports the active compound to the appropriate or desired site of action, such as oral or parenteral e.g. rectal, transdermal, subcutaneous, intravenous, intramuscular or intranasal, the oral route being preferred. Typical compositions include a compound of formula I or a pharmaceutically acceptable acid addition salt thereof, associated with a pharmaceutically acceptable excipient which may be a carrier or a diluent or be diluted by a carrier, or enclosed within a earner which can be in form of a capsule, sachet, paper or other container. In making the compositions, conventional techniques for the preparation of pharmaceutical compositions may be used. For example, the active compound will usually be mixed with a earner, or diluted by a carrier, or enclosed within a carrier which may be in the form of a ampoule, capsule, sachet, paper, or other container. When the carrier serves as a diluent, it may be solid, semi-solid, or liquid material which acts as a vehicle, excipient, or medium for the active compound. The active compound can be adsorbed on a granular solid container for example in a sachet. Some examples of suitable carriers are water, salt solutions, alcohols, polyethylene glycols, polyhydroxyethoxylated castor oil, gelatine, lactose, amylose, magnesium stearate, talc, silicic acid, fatty acid monoglycerides and diglycerides, pentaerythritol fatty acid esters, hydroxymethylcellulose and polyvinylpyrrolidone. The formulations may also include wetting agents, emulsifying and suspending agents, preserving agents, sweetening agents or flavouring agents. The formulations of the invention may be formulated so as to provide quick, sustained, or delayed release of the active ingredient after administration to the patient by employing procedures well known in the art. The pharmaceutical preparations can be sterilized and mixed, if desired, with auxiliary agents, emulsifiers, salt for influencing osmotic pressure, buffers and/or coloring substances and the like, which do not deleteriously react with the active compounds. For parenteral application, particularly suitable are injectable solutions or suspensions, preferably aqueous solutions with the active compound dissolved in polyhydroxylated castor oil. Tablets, dragees, or capsules having talc and/or a carbohydrate carrier or binder or the like are particularly suitable for oral application. Preferable carriers for tablets, dragees, or capsules include lactose, com starch, and/or potato starch. A syrup or elixir can be used in cases where a sweetened vehicle can be employed. A typical tablet, appropriate for use in this method, may be prepared by conventional tabletting techniques and contains: Active compound 5.0 mg Lactosum 67.8 mg Ph.Eur. Avicel® 31.4 mg Amberlite® 1.0 mg Magnesii stearas 0.25 mg Ph.Eur. Due to their high degree of activity, the compounds of the invention may be administered to an animal in need of such treatment, prevention, elimination, alleviation or amelioration of various diseases as mentioned above and especially of diseases of the endocrinological system such as hyperinsuiinaemia and diabetes. Such animals include both domestic animals, e.g. household pets, and non-domestic animals such as wildlife. Preferably the animal is a mammal especially a human. EXAMPLES The process for preparing compounds of formula I and preparations containing them is further illustrated in the following examples which, however, are not to be construed as limiting. EXAMPLE 1 6-Chloro-3-(1.2-dimethylpropyl)amino-4H-thienor3,2-el-1.2.4-thiadiazine 1 ,1-dioxide A. a) Ethyl 5-chloro-2-sulfamoylthiophene-3-carboxylate A solution of 2-(N-tert-butylsulfamoyl)-5-chlorothiophene-3-carboxylic acid (60.0 g; 0.201 mol) made by the procedure described by B. Unterhalt and S. Moghaddam, Pharmazie 49, 115-117 (1994) in 700 ml of abs. ethanol saturated with hydrogen chloride was heated with stirring at reflux for 17 h. The cooled solution was evaporated to dryness and the residue was purified by trituration with water and dried to give 52.3 g (96%) of the title compound; 1 H-NMR (DMSO-d 6 ): δ 1.31 (t, J = 7 Hz, 3H, CH 3 ), 4.32 (q, J = 7 Hz, 2H, CH 2 ), 7.55 (s, 1H), 7.77 (br. s, 2H, NH 2 ). b) 5-Chloro-2-sulfamoylthiophene-3-carbohvdrazide Ethyl 5-chloro-2-sulfamoylthiophene-3-carboxylate (50.0 g; 0.185 mol) was added in one portion to 98% hydrazine hydrate (50 ml) with stirring at ambient temperature. The reaction was slightly exothermic. The solution was stirred for 90 min. and concentrated. The residue was crystallised by trituration with 250 ml of water and the mixture was adjusted to pH 2-3 with cone, hydrochloric acid and stirred for 30 min. at 0 β C. The product was isolated by filtration, washed with water and dried to give 42.4 g (89%) of the title compound; 1 H-NMR (DMSO-d 6 ): δ 4.7 (br. s, 2H, NH 2 ), 7.49 (s, 1H), 7.71 (br. s, 2H, NH 2 ), 9.94 (br. s, 1H, NH). c) 5-Chloro-2-sulfamoyl-3-thenoyl azide A solution of sodium nitrite (3.0 g; 43.4 mmol) in 20 ml of water was added dropwise with stirring at 0°C to a solution of 5-chloro-2-sulfamoylthiophene-3-carbohydrazide (10.0 g; 39.1 mmol) in 80 ml of 1M hydrochloric acid and the mixture was stirred for 15 min. The precipitate was isolated by filtration, washed with water and dried to give 9.93 g (96%) of the title compound; 1 H-NMR (DMSO-d 6 ): δ 7.55 (s, 1 H), 7.97 (br. s, 2H, NH 2 ). d) 6-Chloro-2.3-dihvdro-3-oxo-4H-thieno[3,2-el-1.2,4-thiadiazine 1 ,1-dioxide 5-Chloro-2-sulfamoyl-3-thenoyl azide (7.0 g; 26.2 mmol) was added in portions to 50 ml of refluxing dry toluene during 10 min. The mixture was stirred for 5 min. and cooled on an ice bath. The precipitate was isolated by filtration, washed with toluene and dried to give 5.90 g (94%) of the title compound; m.p. 245-248 β C decomp.; 1 H-NMR (DMSO-d 6 ): δ 6.93 (s, 1H), 11.98 (s, 1 H, NH). e) 6-Chloro-3-(1.2-dimethylpropyl)amino-4H-thienof3.2-el-1 ,2.4-thiadiazine 1.1-dioxide Phosphorus pentoxide (2.84 g; 20 mmol), N,N-dimethylcyclohexylamine (5 ml, 33 mmol) and 1 ,2- dimethylpropylamine hydrochloride (2.47 g; 20 mmol) were carefully mixed in a three necked flask equipped with mechanical stirring and condenser with drying tube. The mixture was heated on an oil bath at 200°C until a homogeneous mass was obtained. Then 6-chloro-2,3-dihydro-3-oxo-4H- thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide (1.2 g; 5 mmol) was added and the mixture was stirred at 240°C for 45 min. The mixture was allowed to cool to about 100 β C, 150 ml of water was added and stirring was continued at ambient temperature for approximately 1 h. The hydrolysed mixture was filtered and the dark precipitate was washed with water and dissolved in boiling ethanol, treated with charcoal, filtered and finally evaporated to dryness. Flash chromatography (ethyl acetate/silica gel) afforded 105 mg (7%) of the pure title compound; m.p. 216-218 β C; 1 H-NMR (DMSO-d 6 ): δ 0.90 (d, 6H, CH(CH 3 ) ), 1.08 (d, 3H, NCHCH 3 ), 1.75 (m, 1H, CH(CH 3 ) 2 ), 3.65 (m, 1H, NHCH), 7.11 (br. s, 2H, 5-H + NH), 10.68 (s, 1H, NH); MS m/e: 307/309 (M * ). Alternatively, 6-chloro-3-(1 ,2-dimethylpropyl)amino-4H-thieno{3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide could be prepared by the following procedure B. a) 3.6-Dichloro-4H-thienoi3.2-el-1.2.4-thiadiazine 1.1-dioxide A suspension of 6-chloro-2,3-dihydro-3-oxo-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide (10.75 g, 0.045 mol) in phosphorus oxychloride (100 ml) was cooled on an ice bath and dry pyridine (7.3 ml, 0.09 mol) was added dropwise at such a rate that the temperature did not exceed 10°C. The mixture was then heated at 95°-100"C for 16 h, and cooled to room temperature. A yellow precipitate was removed by filtration, and the filtrate was concentrated in vacuo . To the residue was added 200 g of ice, and the resulting mixture was stirred for 1 h, and filtered. The isolated solid was dissolved in saturated aqueous sodium hydrogen carbonate (100 ml), and filtered to remove a small amount of insoluble material . After treatment with decolorising charcoal the filtrate was adjusted to pH 2 with 4 M hydrochloric acid and the precipitate that formed was filtered, washed with water and dried to yield 5.55 g (48 %) of the title compound; mp >240"C decomp. b) 6-Chloro-3-π .2-dimethylpropyl)amino-4H-thieno[3.2-e1-1.2.4-thiadiazine 1.1 -dioxide A solution of 3,6-dichloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide (0.5 g, 1.94 mmol) in 1 ,2- dimethylpropylamine (5 ml) was stirred for 48 h at 100 C C in a sealed flask. The cooled mixture was concentrated in vacuo and the residue was stirred with water (20 ml) followed by adjustment to pH 2 with 4M hydrochloric acid. The initially formed gummy product crystallised by stirring the mixture for about 2 h at 0 β C. The precipitate was isolated by filtration, washed with water, and recrystallised from ethyl acetate/methanol followed by drying in vacuo at 60°C over night to give 0.43 g (72 %) of the pure title compound. EXAMPLE 2 6-Chloro-3-ethylamino-4H-thienof3.2-el-1.2,4-thiadiazine 1.1 -dioxide Phosphorus pentoxide (2.84 g, 20 mmol), N,N-dimethylcyclohexylamine (3 ml, 20 mmol) and ethylamine hydrochloride (1.63 g, 20 mmol) were carefully mixed and heated with stirring on an oil bath at 180°C for 20 min. To the homogeneous mass was added 6-chloro-2,3-dihydro-3-oxo-4H- thieno[3,2-e]-1 ,2,4-thiadiazine 1,1-dioxide (1.2 g, 5 mmol) and the mixture was stirred at 180 β C for 5 h. After cooling to ca. 10CC, water (150 ml) was added and the mixture was stirred for 1 h at room temperature. Then the mixture was extracted with ethyl acetate (3 x 100 ml). The organic phase was washed with saturated aqueous sodium hydrogen carbonate, dried and evaporated to dryness. The residue was recrystallised from ethyl acetate/methanol to give 282 mg (21%) of the pure title compound; m.p. 271-274°C; 1 H-NMR (DMSO-d 6 ): δ 1.11 (t, 3H, CH 3 ), 3.22 (m, 2H, CH 2 ), 7.04 (s, 1H, 5-H), 7.3 (br. s, 1 H, NH), 11.1 (br. s, 1H, NH); MS m/e: 265/267 (M + ); calc. C 31.64 H 3.03 N 15.81 , found C 31.57 H 3.12 N 15.63. EXAMPLE 3 6-Chloro-3-isopropylamino-4H-thienof3.2-el-1.2.4-thiadiazine 1.1-dioxide A. The title compound was made by a similar procedure as described in example 2 except that isopropylamine hydrochloride (1.91 g, 20 mmol) was used as the primary amine. Yield: 150 mg (11%); m.p. 281-283°C (ethyl acetate); 1 H-NMR (DMSO-d 6 ): δ 1.15 (d, 6H, CH(CH 3 ) 2 ), 3.88 (m, 1H, CH), 7.08 (s, 1 H, 5-H), 7.20 (br. d, 1H. -NH), 10.74 (br. s, 1H, NH); MS m/e: 279/281 (M * ); calc. C 34.35 H 3.60 N 15.02, found C 34.37 H 3.70 N 14.95. Alternatively, 6-chloro-3-isopropylamino-4H-thieno[3,2-e]-1,2,4-thiadiazine 1 ,1 -dioxide could be prepared by the following procedure B. a) 3-Amino-5-chlorothioρheπe-2-sulfonic acid terf-butylamide: A solution of 38.1 g (0.15 mol) of 5-chlorothiophene-2- sulfonic acid tert-butylamide in 300 ml of dry tetrahydrofuran was cooled to -70°C, and n-BuLi (190 ml, 1.6 M in hexane) was added, maintaining the temperature < -65°C. After addition, the mixture was allowed to warm to -20°C and stirred at this temperature for 30 min. A solution of p-toluenesulfonyl azide (34 g, 0.17 mol) in 100 ml of dry tetrahydrofuran was added, maintaining the temperature at -20°C, and the cooling bath was removed. After the mixture had reached room temperature, water (100 ml) was added . The organic phase was isolated and the aqueous phase was extracted with toluene (2 x 50 ml). To the combined organic phases was added hexadecyltributylphosphonium bromide (7.62 g, 15 mmol) followed by the dropwise addition of a solution of sodium borohydride (6.58 g, 0.174 mol) in 20 ml of water with stirring and cooling to room temperature. The mixture was stirred over night at room temperature, and water (100 ml) was added. The organic phase was isolated, washed with water (2 x 100 ml), dried, and evaporated to dryness. The oily residue was dissolved in ethyl acetate (150 ml) and washed with 1 N sodium hydroxide (6 x 100 ml). The organic phase was dried with sodium sulfate, and evaporated to afford a quantitative yield (40.6 g) of crude title compound as an oil, which was used without further purification in the next step. b) 3-Amino-5-chlorothiophene-2-sulfonamide hydrochloride 3-Amino-5-chlorothiophene-2-sulfonic acid tert-butylamide (40.4 g) was heated with stirring at 50°C to 60 β C in 200 ml of cone, hydrochloric acid for 2.5 h. The crude product was isolated from the cooled mixture by filtration, dried and purified by trituration with 60 ml of ether to afford 17.8 g (48 %) of the title compound. Η-NMR (DMSO-d 6 ): δ 6.64 (s, 1H), 6.84 (very br., 5H). c) Λ/-(3-Amino-5-chloro-2-thienylsulfonyl)-Λ '-isopropylthiourea Potassium tert-butoxide (0.49 g, 4.4 mmol) was added to a solution of 3-amino-5-chlorothiophene-2- sulfonamide hydrochloride (0.5 g, 2.0 mmol) in dry W,Λ/-dimethylformamide (5 ml) with stirring on an ice bath. After 5 min, isopropyl isothiocyanate (0.26 ml, 2.4 mmol) was added dropwise to the resulting suspension, and the mixture was stiσed for 30 min at OX. The cooling bath was removed, and stirring was continued at room temperature for 30 min. The solvent was evaporated at <50 β C, and the residue was taken up in 25 ml of water, treated with decolorising charcoal, and filtered. Acidification of the filtrate with acetic acid to pH 3-4 and filtration afforded 0.50 g (80%) the title compound; mp 142.0-142.5 decomp., Η-NMR (DMSO-dg): δ 1.12 (d, 6H), 4.25 (m, 1H), 6.48 (br s, 2H), 6.65 (s, 1 H), 8.02 (d, 1H), 11.2 (br s, 1H). d) 6-Chloro-3-isopropylamino-4H-thienor3.2-er-1 ,2.4-thiadiazine 1.1-dioxide Phosgene (1.14 ml, 20 % in toluene) was added dropwise to a solution of Λ-(3-amino-5-chloro-2- thienylsulfonyl)-Λ/'-isopropylthiourea (0.63 g, 2.0 mmol) and dry triethylamine (0.56 ml, 4.0 mmol) in dry tetrahydrofuran (10 ml) with stirring at OX. The mixture was stiσed for 1 h at OX, and evaporated to dryness. The residue was triturated with water, and the precipitate was isolated by filtration, washed with water and dried affording 0.52 g (93%) of the title compound. Alternatively 6-chloro-3-isopropylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide could be prepared by the following procedure C. A solution of 3,6-dichloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide (1.5 g, 5.83 mmol) in isopropylamine (10 ml) was stiσed in a Teflon-lined stainless steel pressure bomb at 100X for 24 h. Excess amine was evaporated, and the residue was stiσed in water (25 ml) followed by the addition of 4M hydrochloric acid to pH 2. The mixture was stiσed on an ice bath for about 1 h to afford 0.99 g (61 %) of the title compound as a crystalline product. EXAMPLE 4 (R)-6-Chloro-3-f1-phenylethyl)amino-4H-thienor3.2-eT-1.2,4-thiadiazine 1 ,1-dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfonamide hydrochloride and L-α-methylbenzyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp 195-204X (ethyl acetate), Η-NMR (DMSO-d 6 ): δ 1.46 (d, 3H), 4.95 (m, 1H), 7.1 (s, 1H), 7.2-7.45 (m, 5H), 7.78 (br. s, 1 H), 10.85 (s, 1H). EXAMPLE 5 3-Allylamino-6-chloro-4H-thienof3.2-er-1 ,2,4-thiadiazine 1 ,1-dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfonamide hydrochloride and allyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp 217- 221 ; 1 H-NMR (DMSO-d 6 ): δ 3.83 (distorted t, 2H), 5.08-5.27 (m, 2H), 5.75-5.99 (m, 1H), 7.07 (s, 1H), 7.49 (br. t, 1H), 11.1 (s, 1H). EXAMPLE 6 6-Chloro-3-cvclopropylamino-4H-thienθι3.2-er-1.2.4-thiadiazine 1 ,1-dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfonamide hydrochloride and cyclopropyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp 272-273X; Η-NMR (DMSO-d 6 ): δ 0.55 (m, 2H), 0.78 (m, 2H), 2.6 (m, 1H), 7.10 (s, 1H), 7.88 (br. s, 1H), 10.95 (br. s, 1H). EXAMPLE 7 6-Chloro-3-hexylamino-4H-thienof3.2-er-1 ,2.4-thiadiazine 1.1 -dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfonamide hydrochloride and n-hexyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp 207-209X; 'H-NMR (DMSO-dg): δ 0.87 (distorted t, 3H), 1.28 ( , 6H), 1.51 (m, 2H), 3.17 (q, 2H), 7.05 (s, 1H), 7.30 (br. S, 1H), 11.01 (s, 1H). EXAMPLE 8 6-Chloro-3-tetradecylamino-4H-thienoi3.2-ei-1 ,2.4-thiadiazine 1 ,1-dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfonamide hydrochloride and n-tetradecyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp 157-158X; H-NMR (DMSO-d 6 ): δ 0.85 (distorted t, 3H), 1.25 (m, 22H), 1.50 (m, 2H), 3.19 (q, 2H), 7.05 (s, 1H), 7.26 (br. s, 1H), 10.95 (br. s, 1H). EXAMPLE 9 6-Chloro-3-methylamino-4H-thienor3.2-eT-1.2.4-thiadiazine 1 ,1-dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfonamide hydrochloride and methyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp > 190X decomp.; Η-NMR (DMSO-d 6 ): δ 2.75 (s, 3H), 7.02 (s, 1 H), 7.25 (br, 1 H), 11.3 (br s, 1H). EXAMPLE 10 3-Benzylamino-6-chloro-4H-thienor3.2-e]-1.2,4-thiadiazine 1 ,1-dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfoπamide hydrochloride and benzyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp 223-226X.; 1 H-NMR (DMSO-d 6 ): δ 4.42 (d, 2H), 7.05 (s, 1 H), 7.30 (m, 5H), 7.78 (br t, 1 H),11.22 (br s, 1H). EXAMPLE 11 6-Chloro-3-octylamino-4H-thienor3.2-el-1 ,2,4-thiadiazine 1 ,1-dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfonamide hydrochloride and n-octyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp >190X decomp.; Η-NMR (DMSO-dg): δ 0.85 (t, 3H), 1.28 (m, 10H), 1.50 (m, 2H), 3.18 (q, 2H), 7.03 (s, 1H), 7.25 (br. s, 1H), 10.2 (br. s, 1H). EXAMPLE 12 6-Chloro-3-isobutylamino-4H-thienor3.2-eT-1.2.4-thiadiazine 1.1-dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfonamide hydrochloride and isobutyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp 262-264X.; 1 H-NMR (DMSO-d 6 ): δ 0.90 (d, 6H), 2.85 (m, 1H), 3.02 (t, 2H), 7.08 (s, 1H), 7.3 (br. s, 1H), 10.9 (br. s, 1H). EXAMPLE 13 6-Chloro-3-(4-phenylbutyl)amino-4H-thienor3,2-eT-1.2.4-thiadiazine 1 ,1-dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfonamide hydrochloride and 4-phenylbutyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp 201-205X; Η-NMR (DMSO-dg): δ 1.55 (m, 4H), 2.6 (t, 2H), 3.2 (q, 2H), 7.04 (s, 1H), 7.1-7.4 (m, 6H), 10.94 (br. s, 1H). EXAMPLE 14 6-Chloro-3-(1.5-dimethylhexyl)amino-4H-thienor3.2-er-1.2.4-thiadiazine 1.1 -dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfoπamide hydrochloride and 1 ,5-dimethylhexyl isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp 197-199X (ethyl acetate); Η-NMR (DMSO-dg): δ 0.85 (d, 6H), 1.12 (d, 3H), 1.1-1.6 (m, 7H), 3.77 (m, 1H), 7.07 (s, 1H), 7.12 (br. s, 1H), 10.72 (br.s, 1H). EXAMPLE 15 6-Chloro-3-propylamino-4H-thienof3.2-er-1.2.4-thiadiazine 1.1-dioxide The title compound was prepared from 3,6-dichloro-4H-thieno[3,2-e]-1,2,4-thiadiazine 1,1-dioxide and n-propylamine by a procedure analogous to the procedure described in example 1Bb, except that the mixture was stiσed for 16 h at 60X; mp 258-261 X (ethyl acetate); Η-NMR (DMSO-d 6 ): δ 0.89 (t, 3H), 1.52 (sext, 2H), 3.15 (q, 2H), 7.05 (s, 1H), 7.29 (br. s, 1H), 10.95 (br. s, 1H). EXAMPLE 16 (R)-6-Chloro-3-f2-hvdroxy-1-methylethyl)amino-4H-thienof3.2-er-1.2.4-thiadiazine 1.1-dioxide The title compound was prepared from 3,6-dichloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide and (R)-(-)-2-amino-1 -propanol by a procedure analogous to the procedure described in example 1Bb; mp 203-204X (water), 1 H-NMR (DMSO-d 6 ): δ 1.11 (d, 3H), 3.4 (d, 2H), 3.78 (m, 1H), 4.95 (br. s, 1H), 7.05 (br. s, 1H), 7.09 (s, 1H), 10.8 (br. s, 1 H). EXAMPLE 17 (SV6-Chloro-3-(2-hvdroxy-1-methylethyl)amino-4H-thienor3.2-e1-1.2,4-thiadiazine 1.1-dioxide The title compound was prepared from 3,6-dichloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide and L-alaπinol by a procedure analogous to the procedure described in example 1Bb; mp 204-206X (water), 1 H-NMR (DMSO-d 6 ): δ 1.11 (d, 3H), 3.4 (d, 2H), 3.78 (m, 1H), 4.95 (br. s, 1H), 7.05 (br. s, 1H), 7.09 (s, 1H), 10.8 (br. s, 1 H). EXAMPLE 18 (R)-3-sec-Butylamino-6-chloro-4H-thienor3.2-e -1.2,4-thiadiazine 1.1 -dioxide The title compound was prepared from 3,6-dichloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide and (R)-(-)-sec-butylamine by a procedure analogous to the procedure described in example 1Bb; mp 215-220X (water), 1 H-NMR (DMSO-d 6 ): δ 0.88 (t, 3H), 1.11 (d, 3H), 1.48 (m, 2H), 3.69 (m, 1H), 7.07 (s, 1H), 7.14 (br. s, 1H), 10.75 (br. s, 1H). EXAMPLE 19 3-Butylamino-6-chloro-4H-thienor3.2-er-1.2.4-thiadiazine 1.1-dioxide The title compound was prepared from 3-amino-5-chlorothiophene-2-sulfonamide hydrochloride and n-butylamino isothiocyanate by a procedure analogous to the procedure described in example 3Bc-d; mp 218-219X; 1 H-NMR (DMSO-d 6 ): δ 0.90 (t, 3H), 1.35 (sext, 2H), 1.50 (quint, 2H), 3.18 (q, 2H), 7.02 (s, 1H), 7.25 (br. s, 1H), 10.95 (br.s, 1 H). EXAMPLE 20 3-lsopropylamino-7-methyl-4.7-dihvdro-pyrazolθι4.3-elH .2.41thiadiazine 1.1 -dioxide a) 1-Methyl-5-sulfamoylpyrazole-4-carbohvdrazide Ethyl 1-methyl-5-sulfamoylpyrazole-4-caΦoxylate (1.0 g), prepared according to Bellemin and Festal, J.Heterocycl.Chem. 1984, 21, 1017, was stiσed with 1 ml of hydrazine monohydrate at room temperature for 3 h and then evaporated to dryness. The residue was taken up in 5 ml of water and extracted with 25 ml of dichloromethane. The aqueous phase was evaporated to give 0.85 g (90%) of the title compound as a slowly crystallizing oil. Trituration with 5 ml of a 2:1 mixture of methanol and ethyl acetate gave a pure product; m.p. 172-173 X. b) 1-Methyl-4-(azidocarbonyl)pyrazole-5-sulf onamide A solution of sodium nitrite (0.19 g) in 5 ml of water was added dropwise to a stiσed solution of 1- methyl-5-sulfamoylpyrazole-4-carbohydrazide (0.55 g) in 8 ml of 1 M hydrochloric acid at OX. The resulting mixture was stirred for 15 min. and then filtered. The filter cake was washed with water and dried in vacuum to give 0.29 g (47%) of the title compound as a crystalline solid. The product was pure according to TLC (ethyl acetate) and was used immediately for the next step. c) 1 -Methyl-4-(ethoxycarbonylamino)Pyrazole-5-sulfonamide 1-Methyl-4-(azidocarbonyl)pyrazole-5-sulfonamide (0.29 g) was added over 5 min. to 10 ml of abs. ethanol at reflux temperature. The resulting solution was refluxed for 15 min. and then evaporated to give 0.33 g of the title compound as a yellow oil containing a small residue of ethanol. The product was used without purification for the next step. d) N-(4-EthoxycaΦonylamino-1 -methyl-5-pyrazolesulfonvD-N '-isopropylthiourea A mixture of 1-methyl-4-(ethoxycarbonylamino)pyrazole-5-sulfonamide (0.42 g), potassium carbonate (0.34 g) and isopropyl isothiocyanate (280 μl) in 10 ml of dry acetone was heated at 55 X for 18 h and then evaporated to dryness. The residue was dissolved in 10 ml of water, and pH was adjusted to 2 by dropwise addition of 4 M hydrochloric acid. The precipitate was filtered off, rinsed with a small amount of water and dried to give 0.38 g (64%) of the title compound; m.p. 141-144 X. e) 4-Ethoxycarbonyl-3-isopropylamino-7-methyl-4.7-dihvdropyrazolof4,3-eiπ .2.41thiadiazine 1.1- dioxide To a stirred solution of N-(4-ethoxycarbonylamino-1-methyl-5-pyrazolesulfonyl)-N ' -isopropylthiourea (0.37 g) and triethylamine (0.45 ml) in 5 ml of dry THF at 0 X was added 1.0 ml of a 20% solution of phosgene in toluene. The mixture was stiσed at 0 X for 30 min. and then evaporated to dryness. The residue was triturated with 10 ml of water, filtered off, rinsed on the filter with water and dried to give 0.27 g (82%) of the title compound; m.p. 141-145 X. 0 3-lsopropylamino-7-methyl-4.7-dihvdro-pyrazolθι4.3-elf1 ,2.41thiadiazine 1.1 -dioxide A mixture of 4-ethoxycarbonyl-5-isopropylamino-1 -methyl-1 ,4-dihydro-pyrazolo[4,3- e][1 ,2,4]thiadiazine 7,7-dioxide (0.23 g) and 2 ml of 2 M aqueous sodium hydroxide was heated at reflux for 2 h. Then the mixture was cooled to room temperature and pH was adjusted to 2 by dropwise addition of 4M hydrochloric acid. After stirring for 15 min. the precipitate was filtered off, rinsed with a small amount of water and dried to give 0.11 g (61%) of the title compound; m.p. 242- 243 X; 1 H-NMR (DMSO-d 6 ): δ (ppm) 10.25 (s, 1 H, NH), 7.42 (s, 1 H, 3-H), 7.21 (br d, 1 H, NH), 3.98 - 3-75 (m, 4 H, CH and N-CH 3 ), 1 ,15 (d, 6 H, CH 3 ). EXAMPLE 21 3-lsopropyl-6-methyl-4H-thiazolθι4.5-el-1 ,2,4-thiadiazine 1.1 -dioxide The title compound may be prepared by a similar procedure as described in example 20 starting with ethyl 2-methyl-5-sulfamoylthiazole-4-carboxylate, which in turn was prepared according to Tamura et al. Chem.Pharm.Bull. 1971, 19, 119.

Claims: CLAIMS A compound of the general formula wherein B represents >NR 5 or >CR 5 R 6 , wherein R 5 and R 6 independently are hydrogen; hydroxy; Cι.g-alkoxy; or C 3 .e-cycloalkyl, C 2 .β-alkenyl or C 2 .g-alkynyl optionally mono- or polysubstituted with halogen; or R 5 and R 4 together represent one of the bonds in a double bond between the atoms 2 and 3 of formula I; D represents - S(=0) 2 - or -S(=0)-; or D-B represents -S(=0)(R 7 )=N- wherein R 7 is d-e-alkyl; or aryl or heteroaryl optionally mono- or polysubstituted with halogen, hydroxy, Cι.g-alkoxy, aryloxy, arylalkoxy, nitro, amino, Cι.g-monoalkyl- or dialkylamino, cyano, acyl, or CLg-alkoxycarbonyl; R 1 is hydrogen; hydroxy; Cι. 6 -alkoxy; or C h alky!, C 3 - -cycioalkyl, C 2 ^- alkenyl or C 2 _s-alkynyl optionally mono- or polysubstituted with halogen and R 4 is hydrogen; or R 4 together with R 5 represent one of the bonds in a double bond between the atoms 2 and 3 of formula I; or R 1 together with R 4 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I; R 2 is hydrogen; hydroxy; Ci-s-alkoxy; or d-g-alkyl, C3-r cycloalkyl, C 2 _s- alkenyl or C 2 .e-alkynyl optionally mono- or polysubstituted with halogen; R 3 is R 8 ; -OR 8 ; -C(=X)R 8 ; -NR 8 R 9 ; bicycloalkyi, aryl, heteroaryl, arylalkyl or heteroarylalkyl optionally mono- or polysubstituted with halogen, hydroxy, Cι_ralkoxy, aryloxy, arylalkoxy, nitro, amino, d-β- monoalkyl- or dialkylamino, cyano, oxo, acyl or d.e-alkoxycarbonyl; or aryl substituted with d^-alkyl; wherein R 8 is hydrogen; C 3 . 6 -cycloalkyl or (C3.6-cycloalkyl)Cι.g-alkyl, the C 3 _e-cycloalkyl group optionally being mono- or polysubstituted with d.g-alkyl, halogen, hydroxy or d-ε-alkoxy; a 3-6 membered saturated ring system comprising one or more nitrogen-, oxygen- or sulfur atoms; or straight or branched Ci.iβ-alkyl optionally mono- or polysubstituted with halogen, hydroxy, d.g-alkoxy, d-g-alkylthio, C 3 . 6 -cycloalkyl, aryl, aryloxy, arylalkoxy, nitro, amino, C 1-6 - monoalkyl- or dialkylamino, cyano, oxo, formyl, acyl, carboxy, Cι_ 5 -alkoxycarbonyl, or carbamoyl; X is O or S; R 9 is hydrogen; Cι-s-alkyl; C 2 .e-alkenyl; C3_g-cycloalkyl optionally mono- or polysubstituted with d.e- alkyl, halogen, hydroxy or d.g-alkoxy; or R 8 and R 9 together with the nitrogen atom form a 3-12 membered mono- or bicyclic system, in which one or more of the carbon atoms may be exchanged with nitrogen, oxygen or sulfur, each of these ring systems optionally being mono- or polysubstituted with halogen, Cι-6-alkyl, hydroxy, Cι.e-alkoxy, d-β-alkoxy-d-g-alkyl, nitro, amino, cyano, trifluoromethyl, d-g-monoalkyl- or dialkylamino, oxo; or R 3 is wherein n.m.p independently are 0,1,2,3 and R ,10 i:s hydrogen; hydroxy; d-e-alkoxy; C3-6-cycloalkyl optionally mono- or polysubstituted with d_ralkyl, halogen, hydroxy or Cι. r alkoxy; d_6-alkyl, C 2 _s- alkenyl or C 2 ^-alkynyl optionally mono- or polysubstituted with halogen; or R 2 and R 3 together with the nitrogen atom forms a 3-12 membered mono- or bicyclic system, in which one or more of the carbon atoms may be exchanged with nitrogen, oxygen or sulfur, each of these ring systems optionally being mono- or polysubstituted with halogen, Ci-s-alkyl, hydroxy, d-β-alkoxy, C 1 ^-alkoxy-Cι. 6 -alkyl, nitro, amino, cyano, trifluoromethyl, d.g-monoalkyl- or dialkylamino or oxo; A together with carbon atoms 5 and 6 of formula I represents a 5 or 6 membered heterocyclic system comprising one or more nitrogen-, oxygen- or sulfur atoms, the heterocyclic systems optionally being mono- or polysubstituted with halogen; Cι. 12 -alkyl; C 3 . 6 -cycloalkyl; hydroxy; d-β-alkoxy; d^-alkoxy- C-ι- 6 -afkyl; nitro; amino; cyano; cyanomethyl; perhalomethyl; d.e-monoalkyl- or dialkylamino; sulfamoyi; C 6 -alkylthio; C^-alkylsulfonyl; d-g-alkylsulfinyl; Ci-β-alkylcarbonylamino; arylthio, arylsulfinyl, arylsulfonyl, the aryl group optionally being mono- or polysubstituted with C 1-6 -alkyl, halogen, hydroxy or d-β-alkoxy; Cι- 6 -alkoxycarbonyl; d-g-alkoxycarbonyl-d-e-alkyl; carbamyl; carbamyl- methyl; d-e-monoalkyl- or dialkylaminocarbonyl; C 1-6 -monoalkyl- or dialkylaminothiocarbonyl; ureido; Ct-g-monoalkyl- or dialkylaminocarbonylamino, thioureido; d-e- monoalkyl- or dialkylaminothiocarbonyl- amino; Cι.e-monoalkyl- or dialkylaminosulfonyt; carboxy; carboxy-Cι. 6 -alkyl; acyl; aryl, arylalkyl, aryloxy, the aryl group optionally being mono- or polysubstituted with Cι. 6 -alkyl, halogen, hydroxy or d-e-alkoxy; (1 ,2,4-oxadiazol-5-yl)- or (1,2,4- oxadiazol-3-yl)-d-s-alkyl the oxadiazolyl group optionally being substituted with Cι.g-alkyl or C^g- cycloalkyl; or a 5 - 6 membered nitrogen containing ring, optionally substituted with phenyl or alkyl; provided that A together with carbon atoms 5 and 6 of formula I do not form a pyridine ring and that the following compounds 3-aminoimidazo[4,5-e]-1 ,2,4-thiadiazine 1 ,1-dioxide and 3- (beπzoylamino)imidazo[4,5-e]-1,2,4-thiadiazine 1,1-dioxide are not included; or a salt thereof with a pharmaceutically acceptable acid or base, or any optical isomer or mixture of optical isomers, including a racemic mixture, or any tautomeric form. 2. A compound according to claim 1 , wherein R is hydrogen or C,.g-alkyl. 3. A compound according to claim 1 or 2 wherein R 3 is R β , -OR 8 , NR 8 R 9 or aryl, the aryl groups optionally being substituted with dialkyl; wherein R 8 is hydrogen; C 3 -g-cycloalkyl; a 3 - 6 membered saturated ring system comprising one, two or three nitrogen-, oxygen- or sulfur atoms; or straight or branched d. 18 -alkyl optionally substituted with halogen, hydroxy, Ci-s-alkoxy, C 1-6 -alkylthio, C3_s-cycloalkyl or aryl, R 9 is hydrogen, d-s-alkyl or C 3 ^-cycloalkyl; or R 8 and R 9 together with the nitrogen atom form a 4 - 6 membered ring. 4. A compound according to any one of the preceding claims wherein R 3 is secondary C 3 -S- alkyl, tertiary C 4 .e-alkyl, dj-g-cycloalkyl or (C 3 _s-cycloalkyl)methyl. 5. A compound according to any one of the preceding claims wherein A together with caΦon atoms 5 and 6 of formula I forms a 5 membered heterocyclic system containing one hetero atom selected from nitrogen and sulfur, the heterocyclic system optionally being mono- or disubstituted with halogen; d.-ι 2 -alkyl; C 3 . 6 -cycloalkyl; cyano; cyanomethyl; perhalomethyl; sulfamoyi; d. e-alkylsulfonyl; d-β-alkylsulfinyl; arylthio, arylsulfinyl, arylsulfonyl, the aryl group optionally being mono- or polysubstituted with C 1-6 -alkyl, halogen, hydroxy or d-e-alkoxy; C 1 . 6 -alkoxycarbonyl-Cι. 6 - alkyl; carbamylmethyl; carboxy-d-6-alkyl; aryloxy; (1 ,2,4-oxadiazol-5-yl)- or (1 ,2,4-oxadiazol-3-yl)d- 6 - alkyl, the oxadiazolyl group optionally being substituted with C 1 _ 6 -alkyl or acyl or a 5 - 6 membered nitrogen containing ring, optionally substituted with phenyl or d-e-alkyl. 6. A compound according to any one of the preceding claims wherein A together with carbon atoms 5 and 6 of formula I forms a 5 membered heterocyclic system containing two hetero atoms selected from nitrogen, oxygen and sulfur, the heterocyclic system optionally being substituted with halogen; d- 12 -alkyl; C 3 . 6 -cycloalkyl; cyano; cyanomethyl; perhalomethyl; sulfamoyi; d-e-alkylsulfonyl; d. 6 -alkylsulfιnyl; arylthio, arylsulfinyl, arylsulfonyl, the aryl group optionally being mono- or polysubstituted with d-s-aikyl, halogen, hydroxy or d. 6 -alkoxy; d-g-alkoxycarbonyl-C L e-alkyl; carbamylmethyl; carboxy-Cι.e-alkyl; aryloxy; (1 ,2,4-oxadiazol-5-yl)- or (1 ,2,4-oxadiazol-3-yl)d^-alkyl, the oxadiazolyl group optionally being substituted with C^e-alkyl or C^e-cycloalkyl; acyl; or a 5 - 6 membered nitrogen containing ring, optionally substituted with phenyl or d-s-alkyl. 7. A compound according to any one of the preceding claims wherein A together with carbon atoms 5 and 6 of formula I forms a 6 membered aromatic heterocyclic system containing two or three nitrogen atoms, the heterocyclic system optionally being substituted with halogen; Cι.ι 2 -alkyl; Gj-s- cycloalkyl; cyano; cyanomethyl; perhalomethyl; sulfamoyi; d-β-alkylthio; Cι- 6 alkylsulfonyl; C 1 - 6 - alkylsulfinyl; arylthio, arylsulfinyl, arylsulfonyl, the aryll group optionally being mono- or polysubstituted with d-g-alkyl, halogen, hydroxy or d.g-alkoxy; d- 5 -alkoxycarbonyl-d.g-alkyl; carbamylmethyl; carboxy-d-e-alkyl: aryloxy; (1,2,4-oxadiazol-5-yl)- or (1 ,2,4-oxadiazol-3-yl)d^-alkyl, the oxadiazolyl group optionally being substituted with d-g-alkyl or acyl; or a 5 - 6 membered nitrogen containing ring, optionally substituted with phenyl or Ci-s-alky!. 8. A compound according to any one of the preceding claims wherein A together with carbon atoms 5 and 6 of formula I forms a 6 membered non-aromatic heterocyclic system containing one or two hetero atoms selected from nitrogen, oxygen and sulfur, the heterocyclic system optionally being substituted with halogen; d. 12 -alkyl; C 3 -s-cycloalkyl; cyano; cyanomethyl; perhalomethyl; sulfamoyi; d-g-alkylthio; d. 6 alkylsulfonyl; d.e-alkylsulfιnyl; arylthio, arylsulfinyl, arylsulfonyl, the aryll group optionally being mono- or polysubstituted with d_s-alkyl, halogen, hydroxy or d.g-alkoxy; d_s- alkoxycarbonyl-Cι_ 6 -alkyl; carbamylmethyl; carboxy-Cvβ-alkyl: aryloxy; (1 ,2,4-oxadiazol-5-yl)- or (1 ,2,4-oxadiazol-3-yl)d. 6 -alkyl, the oxadiazolyl group optionally being substituted with d.g-alkyl or C 3 . s-cycloaikyl; acyl; or a 5 - 6 membered. nitrogen containing ring, optionally substituted with phenyl or d. 6 -alkyl. 9. A compound according to any one of the claims 1 - 8, wherein the general formula I is wherein R 1 and R 5 independently are hydrogen; hydroxy; or d-β-alkyl. d-s-cycloalkyl, C 2 .e-alkenyl or C 2 .g-alkynyl optionally mono- or polysubstituted with halogen and R 4 is hydrogen; or R 4 together with R 5 represent one of the bonds in a double bond between the atoms 2 and 3 of formula I and R 1 is as defined above; or R 4 together with R 1 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I and R 5 is as defined above; D represents -S(=0) 2 - or S(=0)-; and A, R 2 and R 3 are as defined above. 10. A compound according to claim 9 wherein R and R 5 independently are hydrogen or d-s- alkyl. 1 1 . A compound according to claims 9 or 10 wherein R 1 together with R 4 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I. 12. A compound according to any one of the claims 9 - 11 , wherein R 4 together with R 5 represent one of the bonds in a double bond between the atoms 2 and 3 of formula I. 13. A compound according to any one of the claims 9 - 12 wherein D is -S(=0) 14. A compound according to any one of the claims 1 - 8 wherein the general formula I is wherein R 1 is hydrogen; hydroxy; Cι_ 5 -alkoxy; or Cι.g-alkyl, C 3 ^-cycloalkyl, C 2-6 -alkenyl or C 2 . 6 -alkynyl optionally mono- or polysubstituted with halogen and R 4 is hydrogen; or R 4 together with R 1 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I; D represents -S(=0)R 7 = wherein R 7 is d.e-alkyl; or aryl or heteroaryl optionally mono- or polysubstituted with halogen, hydroxy, d-s-alkoxy, aryloxy, arylalkoxy, nitro, amino, d. 6 -monoalkyl- or dialkylamino, cyano, acyl or A, R 2 and R 3 are as defined above. 1 5. A compound according to claim 14 wherein R 1 is hydrogen or Cι.g-alkyl. 1 6. A compound according to claim 14 or 15 wherein R 1 together with R 4 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I. 1 7. A compound according to any one of the claims 14 - 16 wherein R 7 is Cι. 6 -alkyl, phenyl or pyridyl. 1 8. A compound according to any one of the claims 1 - 8 wherein the general formula I is wherein R 1 , R 5 and R 6 independently are hydrogen; hydroxy; d-s-alkoxy; or d-β-alkyl, C 3 . 6 -cycloalkyl, C 2 -s- alkenyl or C 2 .g-alkynyl optionally mono- or polysubstituted with halogen and R 4 is hydrogen; or R 4 together with R 5 represent one of the bonds in a double bond between the atoms 2 and 3 of formula I and R 1 and R 6 are as defined above; or R 4 together with R 1 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I and R 5 and R 6 are as defined above; D represents -S(=0) 2 - or -S(=0)-; and A, R 2 , R 3 are as defined above. 19. A compound according to claim 18 wherein R 1 , R 5 and R 6 independently are hydrogen or d. g-alkyl. 20. A compound according claim 18 or 19 wherein R 1 together with R 4 represent one of the bonds in a double bond between the atoms 3 and 4 of formula I. 21 . A compound according to any one of the claims 18 - 20 wherein R 4 together with R 5 represent one of the bonds in a double bond between the atoms 2 and 3 of formula I. 22. A compound according to any one of the claims 18 - 21 wherein D is -S(=0) 2 -. 23. A compound selected from the following: 6-Chloro-3-(1 ,2-dimethylpropyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-ethylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-isopropylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; (R)-6-Chloro-3-(1-phenylethyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-Allylamino-6-chloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-cyclopropylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-hexylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-tetradecylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-methylamino-4H-thieno[3,2,e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 3-Benzylamino-6-chloro-4H-thieno[3,2,e]-1,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-octylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-isobutylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-(4-phenylbutyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 6-Chloro-3-(1 ,5-dimethylhexyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1 -dioxide; 6-Chloro-3-propylamino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; (R)-6-Chloro-3-(2-hydroxy-1-methylethyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; (S)-6-Chloro-3-(2-hydroxy-1-methylethyl)amino-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; (R)-3-sec-Butylamino-6-chloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-Butylamino-6-chloro-4H-thieno[3,2-e]-1 ,2,4-thiadiazine 1 ,1-dioxide; 3-lsopropylamino-7-methyl-4,7-dihydro-pyrazolo[4,3-e][1 ,2,4]thiadiazine 1 ,1-dioxide. 24. Compounds according to any one of the preceding claims which acts as openers of the KATP- regulated potassium channels. 25. A method of preparing a compound of formula I, characterized in a) reacting a compound of formula II: wherein A, B, D, R 1 and R 4 are as defined above and Z is a leaving group such as alkoxy, alkylthio, halogen, preferentially chloro, bromo, iodo, trimethylamino, or methylsulfonyl with a compound of formula III: R 3 (ill) wherein R 2 and R 3 are defined above to form a compound of the general formula I; b) reacting a compound of formula IV: wherein R 1 is hydrogen and A, B, D and X are as defined above, or B is NH and R 1 , A, D and X are as defined above, with the compound of formula III, or a suitable salt thereof in the presence of P 2 0 5 and a high boiling tertiary amine or a suitable salt thereof, to form a compound of the general formula I; c) reacting a compound of the formula IV: wherein R 1 is hydrogen and A, B, D and X are as defined above or B is NH and R 1 , A, D and X are as defined above, with a compound of the formula III, or a suitable salt thereof in the presence of titanium tetrachloride and a solvent with which it may form a complex, like e.g. tetrahydrofuran, or a mixture of toluene and anisole, to form a compound of the general formula I; d) reacting a compound of formula V (V) wherein R 1 and A are as defined above, with a compound of formula VI R 3 NCO (VI) wherein R 3 is as defined above, to form a compound of the general formula I wherein D is S0 2 , B is >NR 5 , R 2 is H, and R 4 and R 5 together form a bond; e) reacting a compound of the formula V wherein R 1 and A are as defined above, with a compound of formula VII R 3 NHC(=0)CI (VII) wherein R 3 is as defined, to form a compound of the general formula I wherein D is S0 2 , B is >NR 5 , R 2 is H, and R 4 and R 5 together form a bond; f) reacting a compound of the formula V wherein R 1 and A are defined as above, with a compound of formula VIII H 2 N^ ^ H 2 « wherein Y is NH or S, or a suitable salt thereof, to form a compound of the general formula I, wherein D is S0 2 , B is >NR ,5 , R and R together form a bond, and R and R are H; g) reacting in the presence of a base a compound of formula IX or a suitable salt thereof, wherein R 11 is R 1 or EtOC(=0), wherein R 1 and A are defined as above, with a compound of formula X R 3 N=C=S 00 wherein R 3 is as defined above, to form an adduct which may have either of the two structures XI or XII or be a mixture of the two either of which by ring-closure, e.g. by treatment with phosgene in a suitable solvent, forms a compound of the general formula I, if R 11 is R 1 , wherein D is S(=0) 2 , B is >NR 5 , R 2 is H, and R 4 and R 5 together form a bond, and a compound of the general formula XIII if R 11 is EtOC(=0); h) hydrolyzing and subsequently decarboxylating a compound of the general formula XIII to form a compound of the general formula I, wherein D is S(=0) 2 , B is >NR 5 , R 1 and R 2 are H, and R 4 and R 5 together form a bond, e.g. by heating the starting compound in aqueous base. 26. A pharmaceutical composition comprising a compound according to any of the claim 1 - 24 or a or a pharmaceutical acceptable salt thereof with a pharmaceutically acceptable acid or base, or any optical isomer or mixture of optical isomers, including a racemic mixture, or any tautomeric form together with one or more pharmaceutically acceptable earners or diluents. 27. A pharmaceutical composition for use in the treatment of diseases of the endocrinological system such as hyperinsuiinaemia and diabetes comprising a compound according to any of the claims 1 - 24 or a pharmaceutical acceptable salt thereof with a pharmaceutically acceptable acid or base, or any optical isomer or mixture of optical isomers, including a racemic mixture, or any tautomeric form together with one or more pharmaceutically acceptable carriers or diluents. 28. The pharmaceutical composition according to claim 26 or 27 in the form of an oral dosage unit or parenteral dosage unit. 29. A pharmaceutical composition according to claim 26 or 27 wherein said compound is administered as a dose in a range from about 0.05 to 1000, preferably from about 0.1 to 500 and especially in the range from 50 to 200 mg per day. 30. A compound according to any one of the claims 1 - 24 or a pharmaceutically acceptable salt thereof with a pharmaceutically acceptable acid or base, or any optical isomer or mixture of optical isomers, including a racemic mixture, or any tautomeric form for therapeutical use. 31. A compund according to any one of the claims 1 - 24 or a pharmaceutically acceptable salt thereof with a pharmaceutically acceptable acid or base, or any optical isomer or mixture of optical isomers, including a racemic mixture, or any tautomeric form for therapeutical use in the treatment or prevention of diseases of the endocrinological system, such as hyperinsuiinaemia and diabetes. 32. The use of a compound according to any one of the claims 1 - 24 or a pharmaceutically acceptable salt thereof with a pharmaceutically acceptable acid or base, or any optical isomer or mixture of optical isomers, including a racemic mixture, or any tautomeric form as a medicament. 33. The use of a compound according to any of the claims 1 - 24 for preparing a medicament. 34. The use of a compound according to any one of the claims 1 - 24 or a pharmaceutically acceptable salt thereof with a pharmaceutically acceptable acid or base, or any optical isomer or mixture of optical isomers, including a racemic mixture, or any tautomeric form for the preparation of a medicament for the treatment or prevention of diseases of the endocrinological system, such as hyperinsuiinaemia and diabetes. 35. A method of treating or preventing diseases of the endocrinological system, such as hyperinsuiinaemia and diabetes in a subject in need thereof comprising administering an effective amount of a compound according to any of the claims 1 - 24 to said subject. 36. A process for the manufacture of a medicament, particular to be used in the treatment or prevention of diseases of the endocrinological system, such as hyperinsuiinaemia and diabetes which process comprising bringing a compound of formula I according to any of the claims 1 - 24 or a pharmaceutically acceptable salt thereof into a galenic dosage form. 37. Any novel feature or combination of features as described herein.

Inventors: HANSEN HOLGER CLAUS, HANSEN JOHN BONDO, NIELSEN FLEMMING ELMELUND, TAGMOSE TINA MOELLER, HANSEN, HOLGER, CLAUS, HANSEN, JOHN, BONDO, NIELSEN, FLEMMING, ELMELUND, TAGMOSE, TINA, MOELLER
Applicants: NOVONORDISK AS, NOVO NORDISK A/S
Application year: 1997
Main classification: C07D513
IPC codes: A61K31, A61P1, A61P3, A61P9, A61P11, A61P13, A61P15, A61P17, A61P25, A61P43, C07D513