executer un fichier

Discussions gérénales sur Microsoft Windows Vista, des différentes versions.
Verrouillé
Avatar du membre
prefix
Intermédiaire
Intermédiaire
Messages : 489
Enregistré le : 04 juin 2009, 21:57
Configuration matérielle : pc assemblé
carte-mère:msi 790xt-g45 model ms-7388
micro-processeur:AMD Athlon X2 4200+
memoire vive:8 go
windows vista professionnel 32 bits
carte graphique:asus geforce 8600 GTS

executer un fichier

Message par prefix »

bonjour, :coucou:

je suis sur windows vista et je voudrais faire fonctionner un code que j'ai recuperer sur le net,il s'agit d'un bout de code pour rendre les fenetres transparentes

donc j'ai ouvert un nouveau fichier et j'ai collé tel quel le code dans le fichier,maintenant je ne sais pas ce qu'il faut faire pour l'executer

quel est le demarche a suivre pour pouvoir executer ce fichier?

merci d'avance :)

je vous colle le code

Code : Tout sélectionner

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace test_opacite
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.TrackBar trackBar1;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Label label1;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;
		public Form1()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}
		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.label1 = new System.Windows.Forms.Label();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.button1 = new System.Windows.Forms.Button();
			this.trackBar1 = new System.Windows.Forms.TrackBar();
			((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(32, 16);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(88, 16);
			this.label1.TabIndex = 3;
			this.label1.Text = "Opacité :";
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(24, 40);
			this.textBox1.Name = "textBox1";
			this.textBox1.TabIndex = 1;
			this.textBox1.Text = "100 %";
			// 
			// button1
			// 
			this.button1.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
			this.button1.Location = new System.Drawing.Point(288, 24);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(75, 32);
			this.button1.TabIndex = 2;
			this.button1.Text = "Quitter";
			this.button1.Click += new System.EventHandler(this.Quitter);
			// 
			// trackBar1
			// 
			this.trackBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
			this.trackBar1.LargeChange = 10;
			this.trackBar1.Location = new System.Drawing.Point(0, 73);
			this.trackBar1.Maximum = 100;
			this.trackBar1.Minimum = 5;
			this.trackBar1.Name = "trackBar1";
			this.trackBar1.Size = new System.Drawing.Size(368, 45);
			this.trackBar1.SmallChange = 5;
			this.trackBar1.TabIndex = 0;
			this.trackBar1.TickFrequency = 5;
			this.trackBar1.Value = 100;
			this.trackBar1.Scroll += new System.EventHandler(this.RegleOpacite);
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(368, 118);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.label1,
																		  this.button1,
																		  this.textBox1,
																		  this.trackBar1});
			this.Name = "Form1";
			this.Text = "Form1";
			((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}
		void RegleOpacite(object ob,System.EventArgs ev)
//Fonction reglant la transparance
		{
			this.Opacity = ((double)this.trackBar1.Value)/100.0;
			this.textBox1.Text = this.trackBar1.Value.ToString();
		}
		void Quitter(object ob,System.EventArgs ev)
		{
			Application.Exit();
		}
	}
}


 
Windows vista intégrale 32 bits
hewlett packard -- pavilion a6309

Biens mal acquis ne profitent jamais... (applicable dès la première installation !! ) ^^
Avatar du membre
prefix
Intermédiaire
Intermédiaire
Messages : 489
Enregistré le : 04 juin 2009, 21:57
Configuration matérielle : pc assemblé
carte-mère:msi 790xt-g45 model ms-7388
micro-processeur:AMD Athlon X2 4200+
memoire vive:8 go
windows vista professionnel 32 bits
carte graphique:asus geforce 8600 GTS

Re: executer un fichier

Message par prefix »

c'est si compliqué que ca???
Windows vista intégrale 32 bits
hewlett packard -- pavilion a6309

Biens mal acquis ne profitent jamais... (applicable dès la première installation !! ) ^^
lool_lauris
Support
Support
Messages : 2922
Enregistré le : 21 mars 2008, 22:14
Configuration matérielle : Proc : dual core 2.66Ghz - ram : 4Go - HDD 2x300Go + HDD ext 1To - graphic : nVidia Ge8600GT - OS : Dual boot Seven Intégrale 64bits & Vista intégrale 32bits
Localisation : Vaucluse

Re: executer un fichier

Message par lool_lauris »

Bonsoir,

T'as trouvé un truc qui trainait quelque part (et d'ailleurs sans que celui qui l'a mis en ligne en explique clairement les tenants et aboutissants) et tu demandes comment t'en servir !
Je vais te répondre par une métaphore ... c'est un peu comme si tu trouvais une clé dans la rue et que tu nous envois un message pour nous demander dans quelle serrure elle va !

En plus, bidouiller dans le système notamment quand il s'agit du fenêtrage est une source potentielle de dysfonctionnements.

Bye,
lool

PS. Ton truc ressemble à du code css (utilisé par exemple pour les mises en pages Firefox)
Avatar du membre
prefix
Intermédiaire
Intermédiaire
Messages : 489
Enregistré le : 04 juin 2009, 21:57
Configuration matérielle : pc assemblé
carte-mère:msi 790xt-g45 model ms-7388
micro-processeur:AMD Athlon X2 4200+
memoire vive:8 go
windows vista professionnel 32 bits
carte graphique:asus geforce 8600 GTS

Re: executer un fichier

Message par prefix »

bon ben je laisse tomber...
Windows vista intégrale 32 bits
hewlett packard -- pavilion a6309

Biens mal acquis ne profitent jamais... (applicable dès la première installation !! ) ^^
Avatar du membre
nardino
Modérateurs
Modérateurs
Messages : 11993
Enregistré le : 05 févr. 2007, 17:38
Localisation : Reims
Contact :

Re: executer un fichier

Message par nardino »

Bonjour
C'est du langage C# ou C++
Ce n'est pas moi qui t'expliquerai comment l'utiliser. :lol:
@+
Image
Clic sur l'image pour ouvrir le site.
Verrouillé