Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Création Panel_Question Dim Panel_Question As New Panel Panel_Question.Name = "Panel_Question" Panel_Question.BackColor = Color.Transparent Panel_Question.Visible = True Me.Controls.Add(Panel_Question) AddHandler Panel_Question.MouseDown, AddressOf Panel_Question_MouseDown Select Case Mode Case "Valider_Creer_Question" Call Creer_Boutons_Creation() Call Gerer_Enable_Boutons_Creation() 'Taille et position du panel Panel_Question.Size = New Size(Me.ClientSize.Width, Me.ClientSize.Height - 2 * Marge - Me.Controls("Button_Valider").Height) Panel_Question.Location = New Point(0, 0) Call Creer_Et_Afficher_Question() Mode = "Valider_Creer_Question_Temp" Case "Editer_Question" ........
Option Strict On Option Explicit On Imports Microsoft.DirectX.AudioVideoPlayback Module Module1 ..... Public Sub Creer_Et_Afficher_Question() 'Panel_Affichage de la question Select Case mode Case "Noeud_Question_Selectionne", "Noeud_Question_Importee_Selectionne", _ "Imprimer_Sans_Solution", "Imprimer_Avec_Solution" Panel_Affichage = CType(Form1.Controls("Panel_Image_Question"), Panel) Case Else Panel_Affichage = CType(Form6.Controls("Panel_Question"), Panel) End Select '----------------------------- 'Calcul de l'echelle d'affichage par rapport à la création Dim Array_Valeur(1) As String Array_Valeur = Question.Taille_Ecran.Split(Caractere_Separateur_Champs) Coefficient_Affichage = Math.Min(Screen.PrimaryScreen.Bounds.Width / CInt(Array_Valeur(0)), _ Screen.PrimaryScreen.Bounds.Height / CInt(Array_Valeur(1))) '----------------------------- 'Effacement, suppression de tous les controles du panel d'affichage de la question à afficher Panel_Affichage.Controls.Clear() '----------------------------- 'Création du textbox de saisie If Mode "Valider_Creer_Question" OrElse Mode "Editer_Question" OrElse Mode = "Creer_Editer_Entete_Impression" Then Call Creer_Textebox_De_Saisie() End If '----------------------------- 'Intitulé de la question - Label_Intitule_Question Call Creer_Label_Intitule_Question() 'Chargement du son If Question.Audio <> Nothing Then Form6.Lecteur_Audio = New Audio(Question.Audio) 'Chargement image ou video dans leur CTL receptacle respectif If Question.Image_Ou_Video <> Nothing Then If My.Computer.FileSystem.GetFileInfo(Question.Image_Ou_Video).Extension.ToUpper <> ".AVI" Then Call Creer_Image() Else 'Video Call Creer_Panel_Video() End If End If 'Page d'entête d'impression If Question.Type = "Entete_Impression" Then Call Creer_Editer_Entete_Impression(Question.Nb_Items_Colonnes_Itemsgauche) 'Question QCM If Question.Type = "QCM" Then Call Creer_Question_QCM(Question.Nb_Items_Colonnes_Itemsgauche) 'Question Zones_Image If Question.Type = "Zones_Image" AndAlso Question.Image_Ou_Video <> Nothing Then Call Centrer_Image_Seule() Call Creer_Question_Zones_Image() End If '----------------------------- 'Affichage du pb de la question si édition If (Mode "Editer_Question" OrElse Mode "Editer_Question_Importee") _ AndAlso Question.Probleme <> Nothing Then Dim titre_MessageBox As String Dim msg_MessageBox As String = Nothing Dim boutons_MessageBox As MessageBoxButtons Dim icone_boutons_MessageBox As MessageBoxIcon titre_MessageBox = "Problème sur la question" 'msg_MessageBox = "Erreur" & Environment.NewLine If Question.Probleme.Contains("Audio") Then msg_MessageBox = msg_MessageBox & "Audio" & Environment.NewLine If Question.Probleme.Contains("Image") Then msg_MessageBox = msg_MessageBox & "Image" & Environment.NewLine If Question.Probleme.Contains("Document") Then msg_MessageBox = msg_MessageBox & "Document" & Environment.NewLine If Question.Probleme.Contains("Police_Intitule") Then msg_MessageBox = msg_MessageBox & "Police intitulé" & Environment.NewLine If Question.Probleme.Contains("Police_Items") Then msg_MessageBox = msg_MessageBox & "Police items" & Environment.NewLine boutons_MessageBox = MessageBoxButtons.OK icone_boutons_MessageBox = MessageBoxIcon.Error MessageBox.Show(msg_MessageBox, titre_MessageBox, boutons_MessageBox, icone_boutons_MessageBox) End If End Sub .......