Search Results

Search found 2702 results on 109 pages for 'drawing'.

Page 1/109 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Drawing continuously in drawing application

    - by user146780
    I was wondering how drawing applications draw the entire time the mouse is down without having empty gaps. What I mean is, for example if the program only drew circles at the mouse's X, y coordinate, then if the mouse went too quicly it would seem like a bunch of little circles rather than a nice continuous line. How can this be done without constantly drawing a short straight line between where the mouse was 0.001 seconds ago and where the mouse now is. Thanks

    Read the article

  • Drawing order in XNA

    - by marc wellman
    When manually setting the drawing order of game components by setting int DrawableGameComponent.DrawOrder can one use any integer numbers as long an order is defined like component1 = drawing order: 2 component2 = drawing order: 5 component3 = drawing order: 10 component4 = drawing order: 323 or do these integers have to be consecutive and starting with zero like component1 = drawing order: 0 component2 = drawing order: 1 component3 = drawing order: 2 component4 = drawing order: 3 ?

    Read the article

  • Designer issue in VS: Events cannot be set on the object passed to the event binding service ...

    - by serhio
    I have a little problem: the Winform control (that contains between others WPF) suddenly stopped to be displayed in Designer. Message: Events cannot be set on the object passed to the event binding service because a site associated with the object could not be located. Call Stack: at System.ComponentModel.Design.EventBindingService.EventPropertyDescriptor.SetValue(Object component, Object value) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAttachEventStatement(IDesignerSerializationManager manager, CodeAttachEventStatement statement) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) Where could be the problem? InitializeComponent code Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(PlanDeLigne)) Dim Appearance1 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance2 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance3 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance4 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance5 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance6 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance7 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance8 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance9 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance10 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance11 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Dim Appearance12 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance() Me.mnbMenu = New System.Windows.Forms.ToolStrip() Me.mncMode = New System.Windows.Forms.ToolStripComboBox() Me.mnbSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.mnbAdd = New System.Windows.Forms.ToolStripButton() Me.mnbDelete = New System.Windows.Forms.ToolStripButton() Me.mnbSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.mnbDropDownAction = New System.Windows.Forms.ToolStripDropDownButton() Me.mnbDropDownActionSens = New System.Windows.Forms.ToolStripMenuItem() Me.mnbDropDownActionSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.mnbDropDownActionDistances = New System.Windows.Forms.ToolStripMenuItem() Me.mnbDropDownActionSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.mnbDropDownActionArretsPhysiques = New System.Windows.Forms.ToolStripMenuItem() Me.mnbSeparator3 = New System.Windows.Forms.ToolStripSeparator() Me.mnbSelectionZoom = New System.Windows.Forms.ToolStripButton() Me.mnbCancelZoom = New System.Windows.Forms.ToolStripButton() Me.mnbSeparator4 = New System.Windows.Forms.ToolStripSeparator() Me.mnbParametrage = New System.Windows.Forms.ToolStripButton() Me.mncSPlacerArret = New System.Windows.Forms.ToolStripMenuItem() Me.mncSSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.mncSImage = New System.Windows.Forms.ToolStripMenuItem() Me.mncSDefinirLastArret = New System.Windows.Forms.ToolStripMenuItem() Me.mncSSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.mncSSupprimerArrets = New System.Windows.Forms.ToolStripMenuItem() Me.mncSInsererArret = New System.Windows.Forms.ToolStripMenuItem() Me.mncSSeparator3 = New System.Windows.Forms.ToolStripSeparator() Me.mncSInformations = New System.Windows.Forms.ToolStripMenuItem() Me.mncSSupprimerSegment = New System.Windows.Forms.ToolStripMenuItem() Me.mncSSeparator4 = New System.Windows.Forms.ToolStripSeparator() Me.mncSBatirTroncon = New System.Windows.Forms.ToolStripMenuItem() Me.mncTInformations = New System.Windows.Forms.ToolStripMenuItem() Me.mncTDistances = New System.Windows.Forms.ToolStripMenuItem() Me.mncTSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.mncTTempsDeParcours = New System.Windows.Forms.ToolStripMenuItem() Me.mncTSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.mncTCreerSensInverse = New System.Windows.Forms.ToolStripMenuItem() Me.mncTSeparator3 = New System.Windows.Forms.ToolStripSeparator() Me.mncTSupprimerTroncon = New System.Windows.Forms.ToolStripMenuItem() Me.mncTBatirItineraire = New System.Windows.Forms.ToolStripMenuItem() Me.mncIInformations = New System.Windows.Forms.ToolStripMenuItem() Me.mncISeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.mncISupprimerItineraire = New System.Windows.Forms.ToolStripMenuItem() Me.SplitContainer = New System.Windows.Forms.SplitContainer() Me.ElementHost1 = New System.Windows.Forms.Integration.ElementHost() Me._StopsCanvas = New Keolis.ctlWpfPlanDeLigne.StopsCanvas() Me.lblTitreCreation = New Keolis.ctlComponents.Label() Me.Panel1 = New System.Windows.Forms.Panel() Me.btnOk = New Keolis.ctlComponents.Button() Me.btnAnnuler = New Keolis.ctlComponents.Button() Me.grdCreation = New Keolis.ctlWinGrid.WinGrid() Me.mnbMenu.SuspendLayout() CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainer.Panel1.SuspendLayout() Me.SplitContainer.Panel2.SuspendLayout() Me.SplitContainer.SuspendLayout() Me.Panel1.SuspendLayout() CType(Me.grdCreation, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'mnbMenu ' Me.mnbMenu.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden Me.mnbMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mncMode, Me.mnbSeparator1, Me.mnbAdd, Me.mnbDelete, Me.mnbSeparator2, Me.mnbDropDownAction, Me.mnbSeparator3, Me.mnbSelectionZoom, Me.mnbCancelZoom, Me.mnbSeparator4, Me.mnbParametrage}) Me.mnbMenu.Location = New System.Drawing.Point(0, 0) Me.mnbMenu.Name = "mnbMenu" Me.mnbMenu.Size = New System.Drawing.Size(605, 25) Me.mnbMenu.TabIndex = 2 ' 'mncMode ' Me.mncMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.mncMode.Name = "mncMode" Me.mncMode.Size = New System.Drawing.Size(121, 25) Me.mncMode.ToolTipText = "Mode du plan de ligne" ' 'mnbSeparator1 ' Me.mnbSeparator1.AutoSize = False Me.mnbSeparator1.Name = "mnbSeparator1" Me.mnbSeparator1.Size = New System.Drawing.Size(20, 25) ' 'mnbAdd ' Me.mnbAdd.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.mnbAdd.Image = CType(resources.GetObject("mnbAdd.Image"), System.Drawing.Image) Me.mnbAdd.ImageTransparentColor = System.Drawing.Color.Magenta Me.mnbAdd.Name = "mnbAdd" Me.mnbAdd.Size = New System.Drawing.Size(23, 22) Me.mnbAdd.Text = "Création Tronçon / Itinéraire" ' 'mnbDelete ' Me.mnbDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.mnbDelete.Image = CType(resources.GetObject("mnbDelete.Image"), System.Drawing.Image) Me.mnbDelete.ImageTransparentColor = System.Drawing.Color.Magenta Me.mnbDelete.Name = "mnbDelete" Me.mnbDelete.Size = New System.Drawing.Size(23, 22) Me.mnbDelete.Text = "Supprimer les éléments sélectionnés" ' 'mnbSeparator2 ' Me.mnbSeparator2.AutoSize = False Me.mnbSeparator2.Name = "mnbSeparator2" Me.mnbSeparator2.Size = New System.Drawing.Size(20, 25) ' 'mnbDropDownAction ' Me.mnbDropDownAction.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.mnbDropDownAction.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnbDropDownActionSens, Me.mnbDropDownActionSeparator1, Me.mnbDropDownActionDistances, Me.mnbDropDownActionSeparator2, Me.mnbDropDownActionArretsPhysiques}) Me.mnbDropDownAction.Image = CType(resources.GetObject("mnbDropDownAction.Image"), System.Drawing.Image) Me.mnbDropDownAction.ImageTransparentColor = System.Drawing.Color.Magenta Me.mnbDropDownAction.Name = "mnbDropDownAction" Me.mnbDropDownAction.Size = New System.Drawing.Size(29, 22) Me.mnbDropDownAction.Text = "Action sur le plan de ligne" ' 'mnbDropDownActionSens ' Me.mnbDropDownActionSens.Checked = True Me.mnbDropDownActionSens.CheckOnClick = True Me.mnbDropDownActionSens.CheckState = System.Windows.Forms.CheckState.Checked Me.mnbDropDownActionSens.Name = "mnbDropDownActionSens" Me.mnbDropDownActionSens.Size = New System.Drawing.Size(222, 22) Me.mnbDropDownActionSens.Text = "Afficher le sens" ' 'mnbDropDownActionSeparator1 ' Me.mnbDropDownActionSeparator1.Name = "mnbDropDownActionSeparator1" Me.mnbDropDownActionSeparator1.Size = New System.Drawing.Size(219, 6) ' 'mnbDropDownActionDistances ' Me.mnbDropDownActionDistances.Checked = True Me.mnbDropDownActionDistances.CheckOnClick = True Me.mnbDropDownActionDistances.CheckState = System.Windows.Forms.CheckState.Checked Me.mnbDropDownActionDistances.Name = "mnbDropDownActionDistances" Me.mnbDropDownActionDistances.Size = New System.Drawing.Size(222, 22) Me.mnbDropDownActionDistances.Text = "Afficher les distances" ' 'mnbDropDownActionSeparator2 ' Me.mnbDropDownActionSeparator2.Name = "mnbDropDownActionSeparator2" Me.mnbDropDownActionSeparator2.Size = New System.Drawing.Size(219, 6) ' 'mnbDropDownActionArretsPhysiques ' Me.mnbDropDownActionArretsPhysiques.Checked = True Me.mnbDropDownActionArretsPhysiques.CheckOnClick = True Me.mnbDropDownActionArretsPhysiques.CheckState = System.Windows.Forms.CheckState.Checked Me.mnbDropDownActionArretsPhysiques.Name = "mnbDropDownActionArretsPhysiques" Me.mnbDropDownActionArretsPhysiques.Size = New System.Drawing.Size(222, 22) Me.mnbDropDownActionArretsPhysiques.Text = "Afficher les arrêts physiques" ' 'mnbSeparator3 ' Me.mnbSeparator3.AutoSize = False Me.mnbSeparator3.Name = "mnbSeparator3" Me.mnbSeparator3.Size = New System.Drawing.Size(20, 25) ' 'mnbSelectionZoom ' Me.mnbSelectionZoom.CheckOnClick = True Me.mnbSelectionZoom.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.mnbSelectionZoom.Image = CType(resources.GetObject("mnbSelectionZoom.Image"), System.Drawing.Image) Me.mnbSelectionZoom.ImageTransparentColor = System.Drawing.Color.Magenta Me.mnbSelectionZoom.Name = "mnbSelectionZoom" Me.mnbSelectionZoom.Size = New System.Drawing.Size(23, 22) Me.mnbSelectionZoom.Text = "Zoom par sélection" ' 'mnbCancelZoom ' Me.mnbCancelZoom.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.mnbCancelZoom.Image = CType(resources.GetObject("mnbCancelZoom.Image"), System.Drawing.Image) Me.mnbCancelZoom.ImageTransparentColor = System.Drawing.Color.Magenta Me.mnbCancelZoom.Name = "mnbCancelZoom" Me.mnbCancelZoom.Size = New System.Drawing.Size(23, 22) Me.mnbCancelZoom.Text = "Annuler le zoom" ' 'mnbSeparator4 ' Me.mnbSeparator4.AutoSize = False Me.mnbSeparator4.Name = "mnbSeparator4" Me.mnbSeparator4.Size = New System.Drawing.Size(20, 25) ' 'mnbParametrage ' Me.mnbParametrage.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.mnbParametrage.Image = CType(resources.GetObject("mnbParametrage.Image"), System.Drawing.Image) Me.mnbParametrage.ImageTransparentColor = System.Drawing.Color.Magenta Me.mnbParametrage.Name = "mnbParametrage" Me.mnbParametrage.Size = New System.Drawing.Size(23, 22) Me.mnbParametrage.Text = "Paramétrage" ' 'mncSPlacerArret ' Me.mncSPlacerArret.Name = "mncSPlacerArret" Me.mncSPlacerArret.Size = New System.Drawing.Size(216, 22) Me.mncSPlacerArret.Text = "Placer un arrêt" ' 'mncSSeparator1 ' Me.mncSSeparator1.Name = "mncSSeparator1" Me.mncSSeparator1.Size = New System.Drawing.Size(213, 6) ' 'mncSImage ' Me.mncSImage.Name = "mncSImage" Me.mncSImage.Size = New System.Drawing.Size(216, 22) Me.mncSImage.Text = "Image..." ' 'mncSDefinirLastArret ' Me.mncSDefinirLastArret.Name = "mncSDefinirLastArret" Me.mncSDefinirLastArret.Size = New System.Drawing.Size(216, 22) Me.mncSDefinirLastArret.Text = "Définir comme dernier arrêt" ' 'mncSSeparator2 ' Me.mncSSeparator2.Name = "mncSSeparator2" Me.mncSSeparator2.Size = New System.Drawing.Size(213, 6) ' 'mncSSupprimerArrets ' Me.mncSSupprimerArrets.Name = "mncSSupprimerArrets" Me.mncSSupprimerArrets.Size = New System.Drawing.Size(216, 22) Me.mncSSupprimerArrets.Text = "Supprimer le ou les arrêts" ' 'mncSInsererArret ' Me.mncSInsererArret.Name = "mncSInsererArret" Me.mncSInsererArret.Size = New System.Drawing.Size(216, 22) Me.mncSInsererArret.Text = "Insérer un arrêt" ' 'mncSSeparator3 ' Me.mncSSeparator3.Name = "mncSSeparator3" Me.mncSSeparator3.Size = New System.Drawing.Size(213, 6) ' 'mncSInformations ' Me.mncSInformations.Name = "mncSInformations" Me.mncSInformations.Size = New System.Drawing.Size(216, 22) Me.mncSInformations.Text = "Modifier les informations" ' 'mncSSupprimerSegment ' Me.mncSSupprimerSegment.Name = "mncSSupprimerSegment" Me.mncSSupprimerSegment.Size = New System.Drawing.Size(216, 22) Me.mncSSupprimerSegment.Text = "Supprimer le segment" ' 'mncSSeparator4 ' Me.mncSSeparator4.Name = "mncSSeparator4" Me.mncSSeparator4.Size = New System.Drawing.Size(213, 6) ' 'mncSBatirTroncon ' Me.mncSBatirTroncon.Name = "mncSBatirTroncon" Me.mncSBatirTroncon.Size = New System.Drawing.Size(216, 22) Me.mncSBatirTroncon.Text = "Bâtir un tronçon" ' 'mncTInformations ' Me.mncTInformations.Name = "mncTInformations" Me.mncTInformations.Size = New System.Drawing.Size(201, 22) Me.mncTInformations.Text = "Modifier les informations" ' 'mncTDistances ' Me.mncTDistances.Name = "mncTDistances" Me.mncTDistances.Size = New System.Drawing.Size(201, 22) Me.mncTDistances.Text = "Modifier les distances" ' 'mncTSeparator1 ' Me.mncTSeparator1.Name = "mncTSeparator1" Me.mncTSeparator1.Size = New System.Drawing.Size(198, 6) ' 'mncTTempsDeParcours ' Me.mncTTempsDeParcours.Name = "mncTTempsDeParcours" Me.mncTTempsDeParcours.Size = New System.Drawing.Size(201, 22) Me.mncTTempsDeParcours.Text = "Temps de parcours" ' 'mncTSeparator2 ' Me.mncTSeparator2.Name = "mncTSeparator2" Me.mncTSeparator2.Size = New System.Drawing.Size(198, 6) ' 'mncTCreerSensInverse ' Me.mncTCreerSensInverse.Name = "mncTCreerSensInverse" Me.mncTCreerSensInverse.Size = New System.Drawing.Size(201, 22) Me.mncTCreerSensInverse.Text = "Créer le sens inverse" ' 'mncTSeparator3 ' Me.mncTSeparator3.Name = "mncTSeparator3" Me.mncTSeparator3.Size = New System.Drawing.Size(198, 6) ' 'mncTSupprimerTroncon ' Me.mncTSupprimerTroncon.Name = "mncTSupprimerTroncon" Me.mncTSupprimerTroncon.Size = New System.Drawing.Size(201, 22) Me.mncTSupprimerTroncon.Text = "Supprimer le tronçon" ' 'mncTBatirItineraire ' Me.mncTBatirItineraire.Name = "mncTBatirItineraire" Me.mncTBatirItineraire.Size = New System.Drawing.Size(201, 22) Me.mncTBatirItineraire.Text = "Bâtir un itinéraire" ' 'mncIInformations ' Me.mncIInformations.Name = "mncIInformations" Me.mncIInformations.Size = New System.Drawing.Size(201, 22) Me.mncIInformations.Text = "Modifier les informations" ' 'mncISeparator1 ' Me.mncISeparator1.Name = "mncISeparator1" Me.mncISeparator1.Size = New System.Drawing.Size(198, 6) ' 'mncISupprimerItineraire ' Me.mncISupprimerItineraire.Name = "mncISupprimerItineraire" Me.mncISupprimerItineraire.Size = New System.Drawing.Size(201, 22) Me.mncISupprimerItineraire.Text = "Supprimer l'itinéraires" ' 'SplitContainer ' Me.SplitContainer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.SplitContainer.Dock = System.Windows.Forms.DockStyle.Fill Me.SplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2 Me.SplitContainer.Location = New System.Drawing.Point(0, 25) Me.SplitContainer.Name = "SplitContainer" ' 'SplitContainer.Panel1 ' Me.SplitContainer.Panel1.AutoScroll = True Me.SplitContainer.Panel1.Controls.Add(Me.ElementHost1) ' 'SplitContainer.Panel2 ' Me.SplitContainer.Panel2.Controls.Add(Me.lblTitreCreation) Me.SplitContainer.Panel2.Controls.Add(Me.Panel1) Me.SplitContainer.Panel2.Controls.Add(Me.grdCreation) Me.SplitContainer.Panel2MinSize = 0 Me.SplitContainer.Size = New System.Drawing.Size(605, 418) Me.SplitContainer.SplitterDistance = 428 Me.SplitContainer.SplitterWidth = 2 Me.SplitContainer.TabIndex = 1 ' 'ElementHost1 ' Me.ElementHost1.Dock = System.Windows.Forms.DockStyle.Fill Me.ElementHost1.Location = New System.Drawing.Point(0, 0) Me.ElementHost1.Name = "ElementHost1" Me.ElementHost1.Size = New System.Drawing.Size(424, 414) Me.ElementHost1.TabIndex = 0 Me.ElementHost1.Text = "ElementHost1" Me.ElementHost1.Child = Me._StopsCanvas ' 'lblTitreCreation ' Me.lblTitreCreation.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lblTitreCreation.Location = New System.Drawing.Point(3, 4) Me.lblTitreCreation.Name = "lblTitreCreation" Me.lblTitreCreation.Size = New System.Drawing.Size(167, 16) Me.lblTitreCreation.TabIndex = 4 ' 'Panel1 ' Me.Panel1.AutoSize = True Me.Panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.Panel1.Controls.Add(Me.btnOk) Me.Panel1.Controls.Add(Me.btnAnnuler) Me.Panel1.Dock = System.Windows.Forms.DockStyle.Bottom Me.Panel1.Location = New System.Drawing.Point(0, 385) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(171, 29) Me.Panel1.TabIndex = 3 ' 'btnOk ' Me.btnOk.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btnOk.BackColor = System.Drawing.SystemColors.Control Me.btnOk.FlatAppearance.MouseDownBackColor = System.Drawing.Color.LightSlateGray Me.btnOk.FlatAppearance.MouseOverBackColor = System.Drawing.Color.LightSteelBlue Me.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnOk.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnOk.ForeColor = System.Drawing.SystemColors.ControlText Me.btnOk.Location = New System.Drawing.Point(12, 3) Me.btnOk.Name = "btnOk" Me.btnOk.Size = New System.Drawing.Size(75, 23) Me.btnOk.TabIndex = 6 Me.btnOk.Text = "OK" Me.btnOk.UseVisualStyleBackColor = True ' 'btnAnnuler ' Me.btnAnnuler.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btnAnnuler.BackColor = System.Drawing.SystemColors.Control Me.btnAnnuler.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.btnAnnuler.FlatAppearance.MouseDownBackColor = System.Drawing.Color.LightSlateGray Me.btnAnnuler.FlatAppearance.MouseOverBackColor = System.Drawing.Color.LightSteelBlue Me.btnAnnuler.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnAnnuler.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnAnnuler.ForeColor = System.Drawing.SystemColors.ControlText Me.btnAnnuler.Location = New System.Drawing.Point(93, 3) Me.btnAnnuler.Name = "btnAnnuler" Me.btnAnnuler.Size = New System.Drawing.Size(75, 23) Me.btnAnnuler.TabIndex = 7 Me.btnAnnuler.Text = "Annuler" Me.btnAnnuler.UseVisualStyleBackColor = True ' 'grdCreation ' Me.grdCreation.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.grdCreation.AutoResizeColumns = False Me.grdCreation.ColumnsFiltreActif = False Appearance1.BackColor = System.Drawing.SystemColors.Window Appearance1.BorderColor = System.Drawing.SystemColors.InactiveCaption Me.grdCreation.DisplayLayout.Appearance = Appearance1 Me.grdCreation.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid Me.grdCreation.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.[False] Appearance2.BackColor = System.Drawing.SystemColors.ActiveBorder Appearance2.BackColor2 = System.Drawing.SystemColors.ControlDark Appearance2.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical Appearance2.BorderColor = System.Drawing.SystemColors.Window Me.grdCreation.DisplayLayout.GroupByBox.Appearance = Appearance2 Appearance3.ForeColor = System.Drawing.SystemColors.GrayText Me.grdCreation.DisplayLayout.GroupByBox.BandLabelAppearance = Appearance3 Me.grdCreation.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid Appearance4.BackColor = System.Drawing.SystemColors.ControlLightLight Appearance4.BackColor2 = System.Drawing.SystemColors.Control Appearance4.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal Appearance4.ForeColor = System.Drawing.SystemColors.GrayText Me.grdCreation.DisplayLayout.GroupByBox.PromptAppearance = Appearance4 Me.grdCreation.DisplayLayout.MaxColScrollRegions = 1 Me.grdCreation.DisplayLayout.MaxRowScrollRegions = 1 Appearance5.BackColor = System.Drawing.SystemColors.Window Appearance5.ForeColor = System.Drawing.SystemColors.ControlText Me.grdCreation.DisplayLayout.Override.ActiveCellAppearance = Appearance5 Appearance6.BackColor = System.Drawing.SystemColors.Highlight Appearance6.ForeColor = System.Drawing.SystemColors.HighlightText Me.grdCreation.DisplayLayout.Override.ActiveRowAppearance = Appearance6 Me.grdCreation.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.[False] Me.grdCreation.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.Dotted Me.grdCreation.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted Appearance7.BackColor = System.Drawing.SystemColors.Window Me.grdCreation.DisplayLayout.Override.CardAreaAppearance = Appearance7 Appearance8.BorderColor = System.Drawing.Color.Silver Appearance8.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter Me.grdCreation.DisplayLayout.Override.CellAppearance = Appearance8 Me.grdCreation.DisplayLayout.Override.CellPadding = 0 Appearance9.BackColor = System.Drawing.SystemColors.Control Appearance9.BackColor2 = System.Drawing.SystemColors.ControlDark Appearance9.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element Appearance9.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal Appearance9.BorderColor = System.Drawing.SystemColors.Window Me.grdCreation.DisplayLayout.Override.GroupByRowAppearance = Appearance9 Appearance10.TextHAlignAsString = "Left" Me.grdCreation.DisplayLayout.Override.HeaderAppearance = Appearance10 Me.grdCreation.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti Me.grdCreation.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.WindowsXPCommand Appearance11.BackColor = System.Drawing.SystemColors.Window Appearance11.BorderColor = System.Drawing.Color.Silver Me.grdCreation.DisplayLayout.Override.RowAppearance = Appearance11 Me.grdCreation.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.[False] Appearance12.BackColor = System.Drawing.SystemColors.ControlLight Me.grdCreation.DisplayLayout.Override.TemplateAddRowAppearance = Appearance12 Me.grdCreation.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill Me.grdCreation.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate Me.grdCreation.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy Me.grdCreation.Font = New System.Drawing.Font("Times New Roman", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.grdCreation.Location = New System.Drawing.Point(0, 23) Me.grdCreation.Name = "grdCreation" Me.grdCreation.PrintColumnsKey = Nothing Me.grdCreation.PrintRowsIndex = Nothing Me.grdCreation.PrintTitle = Nothing Me.grdCreation.RowsActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit Me.grdCreation.Size = New System.Drawing.Size(175, 391) Me.grdCreation.TabIndex = 5 Me.grdCreation.Tag = "" ' 'PlanDeLigne ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.Controls.Add(Me.SplitContainer) Me.Controls.Add(Me.mnbMenu) Me.MinimumSize = New System.Drawing.Size(605, 431) Me.Name = "PlanDeLigne" Me.Size = New System.Drawing.Size(605, 443) Me.mnbMenu.ResumeLayout(False) Me.mnbMenu.PerformLayout() Me.SplitContainer.Panel1.ResumeLayout(False) Me.SplitContainer.Panel2.ResumeLayout(False) Me.SplitContainer.Panel2.PerformLayout() CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainer.ResumeLayout(False) Me.Panel1.ResumeLayout(False) CType(Me.grdCreation, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub

    Read the article

  • Undo button for System.Drawing?

    - by Tanner
    Hi guys, I am making a image editor kinda for own enjoyment and was wondering how could I make a undo button to undo the last paints I did? I want to know how I would about this, a tutorial or sample code would be nice or at least something pointing me in the right direction. Thanks!

    Read the article

  • Change the contrast of Image like Adobe Photoshop in ASP.net C#

    - by Hoque
    While I was trying to change the brightness and contrast of Image using C#, but I could not get success in changing the contrast of the Image. May I expect any support from here. I am using ColorMatrix to do that. Here are the code that I am using for brightness(works fine) and contrast(does not work properly). public static ColorMatrix CreateBrightnessMatrix(float Brightness) { if (Brightness < -1 || Brightness > 1) throw new ArgumentOutOfRangeException("Brightness value is out of range"); ColorMatrix cm = new ColorMatrix(new float[][]{ new float[] { 1f, 0, 0, 0, 0}, new float[] { 0, 1f, 0, 0, 0}, new float[] { 0, 0, 1f, 0, 0}, new float[] { 0, 0, 0, 1f, 0}, new float[] {Brightness, Brightness, Brightness, 1f, 1f}}); return cm; } public static ColorMatrix CreateContrastMatrix(float Contrast) { if (Contrast < 0 || Contrast > 3) throw new ArgumentOutOfRangeException("Contrast value is out of range"); float Trans = (1f - Contrast) / 2f; ColorMatrix cm = new ColorMatrix(new float[][]{ new float[] {Contrast, 0f, 0f, 0f, 0f}, new float[] { 0f, Contrast, 0f, 0f, 0f}, new float[] { 0f, 0f, Contrast, 0f, 0f}, new float[] { 0f, 0f, 0f, 1f, 0f}, new float[] { Trans, Trans, Trans, 0f, 1f}}); return cm; } Thanks.

    Read the article

  • Use XML Layout to contain a simple drawing

    - by user329999
    I would like to create a simple drawing (lines, circles, squares, etc...) but I'm having difficulty figuring out the best way to do this. The drawing would need to be scaled to fit the display since the size is indirectly specified by the user (like in a CAD application). Also, I don't want to take up the entire display, leaving room for some controls (buttons, etc). I would pass the data to describe the drawing. Here's how I imagine it would work. I create an XML layout that contains something that holds the drawing (ImageView, BitmapDrawable, ShapeDrawable, ...??? not sure exactly what). Then in my Activity I would load the main XML and obtain the resource for the control that holds the drawing. I would then draw to a bitmap. Once the bitmap was completed I would load it into the control that is to hold the drawing. Somewhere along this path it would be scaled to fill the entire area allocated for the drawing in the XML layout. I don't know if my approach is the way to do this or what classes to use. I read the http://developer.android.com/guide/topics/graphics/2d-graphics.html documentation, but it's not helping me with an example. The examples I do find leave me with hints, but nothing concrete enough to do what I want, especially when it comes to scaling, using XML and/or having other controls. Also, there seems to be no good documentation on the design of the 2D drawing system in a more conceptual manner, so it makes what I read difficult to put into any useful context. Any hints on what classes would be useful and/or a good example any other reading materials? Thanks

    Read the article

  • Looking for real time collaborative diagram drawing tool

    - by taotree
    I have seen a number of diagram software packages but most don't support real time collaboration. Google docs Drawing does the real-time collaboration, but is severely limited on features--focused on drawing rather than diagrams. I want something that supports connectors and such. Mind maps would be also be nice but would be a secondary requirement.

    Read the article

  • The best way to implement drawing features like Keynote

    - by Shamseddine
    Hi all, I'm trying to make a little iPad tool's for drawing simple geometrical objects (rect, rounded rect, ellipse, star, ...). My goal is to make something very close to Keynote (drawing feature), i.e. let the user add a rect (for instance), resizing it and moving it. I want too the user can select many objects and move them together. I've thought about at least 3 differents ways to do that : Extends UIView for each object type, a class for Rect, another for Ellipse, ... With custom drawing method. Then add this view as subview of the global view. Extends CALayer for each object type, a class for Rect, another for Ellipse, ... With custom drawing method. Then add this layer as sublayer of the global view layer's. Extends NSObject for each object type, a class for Rect, another for Ellipse, ... With just a drawing method which will get as argument a CGContext and a Rect and draw directly the form in it. Those methods will be called by the drawing method of the global view. I'm aware that the two first ways come with functions to detect touch on each object, to add easily shadows,... but I'm afraid that they are a little too heavy ? That's why I thought about the last way, which it seems to be straight forward. Which way will be the more efficient ??? Or maybe I didn't thought another way ? Any help will be appreciated ;-) Thanks.

    Read the article

  • Graph paper like drawing software

    - by Algorist
    Hi, I have a college assignment, where I have to draw diagrams of voronoi, delaunay, minimum spanning tree etc for the college. I want to do that in computer. I searched in google with no luck. Is there any good graph drawing software you are aware of? Thank you Bala

    Read the article

  • drawing hierarchical tree with orthogonal lines ( HV-Drawing – Binary Tree)

    - by user267530
    Hi I need to work on drawing a hierarchical tree structure (HV-Drawing – Binary Tree) with orthogonal lines(straight rectangular connecting lines) between root and children ( like the following: http://lab.kapit.fr/display/visualizationlayouts/Hierarchical+Tree+layout ). I want to know if there are any open source examples of the algorithm of drawing trees like that so that I can implement the same algorithm in actionscript. Thanks Palash

    Read the article

  • Resizing a drawing area in GTK

    - by Pieter
    My application performs a 90 degree rotation on a drawing area, so the width and height of the drawing area need to be swapped. How can I resize the drawing area with GTK in a way so that the new width and height are actually enforced, not just requested?

    Read the article

  • Project compile perfectly but i get unhandled exception and have no idea why??? any clues?

    - by JB
    get unhandled exception that says: System.NullReferenceException: Object reference not set to an instance of an object. at Eagle_Eye_Class_Finder.GetSchedule.GetDataFromNumber(String ID) in C:\Users\Joshua Banks\Desktop\EET Project\Eagle Eye Class Finder\GetSchedule.cs:line 24 at Eagle_Eye_Class_Finder.Form1.button2_Click(Object sender, EventArgs e) in C:\Users\Joshua Banks\Desktop\EET Project\Eagle Eye Class Finder\Form1.cs:line 196 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.PerformClick() at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData) at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData) at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData) at System.Windows.Forms.Control.PreProcessMessage(Message& msg) at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg) at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg) Here is my Get Schedule Class: using System; using System.IO; using System.Data; using System.Text; using System.Drawing; using System.Data.OleDb; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Drawing.Printing; using System.Collections.Generic; namespace Eagle_Eye_Class_Finder { public class GetSchedule { public string GetDataFromNumber(string ID) { IDnumber[] IDnumbers = new IDnumber[3]; foreach (IDnumber IDCandidateMatch in IDnumbers) { if (IDCandidateMatch.ID == ID) { StringBuilder myData = new StringBuilder(); myData.AppendLine(IDCandidateMatch.Name); myData.AppendLine(": "); myData.AppendLine(IDCandidateMatch.ID); myData.AppendLine(IDCandidateMatch.year); myData.AppendLine(IDCandidateMatch.class1); myData.AppendLine(IDCandidateMatch.class2); myData.AppendLine(IDCandidateMatch.class3); myData.AppendLine(IDCandidateMatch.class4); //return myData; return myData.ToString(); } } return ""; } public GetSchedule() { IDnumber[] IDnumbers = new IDnumber[3]; IDnumbers[0] = new IDnumber() { Name = "Joshua Banks", ID = "900456317", year = "Senior", class1 = "TEET 4090", class2 = "TEET 3020", class3 = "TEET 3090", class4 = "TEET 4290" }; IDnumbers[1] = new IDnumber() { Name = "Sean Ward", ID = "900456318", year = "Junior", class1 = "ENGNR 4090", class2 = "ENGNR 3020", class3 = "ENGNR 3090", class4 = "ENGNR 4290" }; IDnumbers[2] = new IDnumber() { Name = "Terrell Johnson", ID = "900456319", year = "Sophomore", class1 = "BUS 4090", class2 = "BUS 3020", class3 = "BUS 3090", class4 = "BUS 4290" }; } public class IDnumber { public string Name { get; set; } public string ID { get; set; } public string year { get; set; } public string class1 { get; set; } public string class2 { get; set; } public string class3 { get; set; } public string class4 { get; set; } public static void ProcessNumber(IDnumber myNum) { StringBuilder myData = new StringBuilder(); myData.AppendLine(myNum.Name); myData.AppendLine(": "); myData.AppendLine(myNum.ID); myData.AppendLine(myNum.year); myData.AppendLine(myNum.class1); myData.AppendLine(myNum.class2); myData.AppendLine(myNum.class3); myData.AppendLine(myNum.class4); MessageBox.Show(myData.ToString()); } } } } Here is my Form 1 class: using System; using System.IO; using System.Data; using System.Text; using System.Drawing; using System.Data.OleDb; using System.Collections; using System.Windows.Forms; using System.ComponentModel; using System.Drawing.Printing; using System.Collections.Generic; namespace Eagle_Eye_Class_Finder { /// This form is the entry form, it is the first form the user will see when the app is run. /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.ProgressBar progressBar1; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Button button2; private System.Windows.Forms.DateTimePicker dateTimePicker1; private IContainer components; private Timer timer1; private BindingSource form1BindingSource; public static Form Mainform = null; // creates new instance of second form YOURCLASSSCHEDULE SecondForm = new YOURCLASSSCHEDULE(); public Form1() { InitializeComponent(); // TODO: Add any constructor code after InitializeComponent call } /// Clean up any resources being used. 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.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.textBox1 = new System.Windows.Forms.TextBox(); this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.button2 = new System.Windows.Forms.Button(); this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.form1BindingSource = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.form1BindingSource)).BeginInit(); this.SuspendLayout(); // // textBox1 // this.textBox1.BackColor = System.Drawing.SystemColors.ActiveCaption; this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.form1BindingSource, "Text", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, null, "900456317")); this.textBox1.Location = new System.Drawing.Point(328, 280); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(208, 20); this.textBox1.TabIndex = 2; this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); // // progressBar1 // this.progressBar1.Location = new System.Drawing.Point(258, 410); this.progressBar1.MarqueeAnimationSpeed = 10; this.progressBar1.Name = "progressBar1"; this.progressBar1.Size = new System.Drawing.Size(344, 8); this.progressBar1.TabIndex = 3; this.progressBar1.Click += new System.EventHandler(this.progressBar1_Click); // // pictureBox1 // this.pictureBox1.BackColor = System.Drawing.SystemColors.ControlLightLight; this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(680, 400); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(120, 112); this.pictureBox1.TabIndex = 4; this.pictureBox1.TabStop = false; this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); // // button2 // this.button2.Font = new System.Drawing.Font("Mistral", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button2.Image = ((System.Drawing.Image)(resources.GetObject("button2.Image"))); this.button2.Location = new System.Drawing.Point(699, 442); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(78, 28); this.button2.TabIndex = 5; this.button2.Text = "OK"; this.button2.Click += new System.EventHandler(this.button2_Click); // // dateTimePicker1 // this.dateTimePicker1.Location = new System.Drawing.Point(336, 104); this.dateTimePicker1.Name = "dateTimePicker1"; this.dateTimePicker1.Size = new System.Drawing.Size(200, 20); this.dateTimePicker1.TabIndex = 6; this.dateTimePicker1.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged); // // timer1 // this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // form1BindingSource // this.form1BindingSource.DataSource = typeof(Eagle_Eye_Class_Finder.Form1); // // Form1 // this.AcceptButton = this.button2; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(856, 556); this.Controls.Add(this.dateTimePicker1); this.Controls.Add(this.button2); this.Controls.Add(this.pictureBox1); this.Controls.Add(this.progressBar1); this.Controls.Add(this.textBox1); this.Name = "Form1"; this.Text = "Eagle Eye Class Finder"; this.Load += new System.EventHandler(this.Form1_Load); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.form1BindingSource)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion /// The main entry point for the application. [STAThread] static void Main() { Application.Run(new Form1()); } public void Form1_Load(object sender, System.EventArgs e) { } public void textBox1_TextChanged(object sender, System.EventArgs e) { //allows only numbers to be entered in textbox string Str = textBox1.Text.Trim(); double Num; bool isNum = double.TryParse(Str, out Num); if (isNum) Console.ReadLine(); else MessageBox.Show("Enter A Valid ID Number!"); } public void button2_Click(object sender, System.EventArgs e) { string text = textBox1.Text; Mainform = this; this.Hide(); GetSchedule myScheduleFinder = new GetSchedule(); string result = myScheduleFinder.GetDataFromNumber(text); if (!string.IsNullOrEmpty(result)) { MessageBox.Show(result); } else { MessageBox.Show("Enter A Valid ID Number!"); } } public void dateTimePicker1_ValueChanged(object sender, System.EventArgs e) { } public void pictureBox1_Click(object sender, System.EventArgs e) { } public void progressBar1_Click(object sender, EventArgs e) { //this.progressBar1 = new System.progressBar1(); //progressBar1.Maximum = 200; //progressBar1.Minimum = 0; //progressBar1.Step = 20; } private void timer1_Tick(object sender, EventArgs e) { //if (progressBar1.Value >= 200 ) //{ //progressBar1.Value = 0; //} //return; //} //progressBar1.Value != 20; } } } here is my form 2 class: using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; namespace Eagle_Eye_Class_Finder { /// /// Summary description for Form2. /// public class YOURCLASSSCHEDULE : System.Windows.Forms.Form { public System.Windows.Forms.LinkLabel linkLabel1; public System.Windows.Forms.LinkLabel linkLabel2; public System.Windows.Forms.LinkLabel linkLabel3; public System.Windows.Forms.LinkLabel linkLabel4; private Button button1; /// Required designer variable. public System.ComponentModel.Container components = null; public YOURCLASSSCHEDULE() { // InitializeComponent(); // TODO: Add any constructor code after InitializeComponent call } /// Clean up any resources being used. 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() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(YOURCLASSSCHEDULE)); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.linkLabel2 = new System.Windows.Forms.LinkLabel(); this.linkLabel3 = new System.Windows.Forms.LinkLabel(); this.linkLabel4 = new System.Windows.Forms.LinkLabel(); this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // linkLabel1 // this.linkLabel1.BackColor = System.Drawing.SystemColors.ActiveCaption; this.linkLabel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.linkLabel1.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel1.LinkArea = new System.Windows.Forms.LinkArea(0, 7); this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabel1.Location = new System.Drawing.Point(41, 123); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(288, 32); this.linkLabel1.TabIndex = 1; this.linkLabel1.TabStop = true; this.linkLabel1.Text = "Class 1"; this.linkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // linkLabel2 // this.linkLabel2.BackColor = System.Drawing.SystemColors.ActiveCaption; this.linkLabel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.linkLabel2.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel2.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabel2.Location = new System.Drawing.Point(467, 123); this.linkLabel2.Name = "linkLabel2"; this.linkLabel2.Size = new System.Drawing.Size(288, 32); this.linkLabel2.TabIndex = 2; this.linkLabel2.TabStop = true; this.linkLabel2.Text = "Class 2"; this.linkLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.linkLabel2.VisitedLinkColor = System.Drawing.Color.Navy; this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); // // linkLabel3 // this.linkLabel3.BackColor = System.Drawing.SystemColors.ActiveCaption; this.linkLabel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.linkLabel3.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel3.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabel3.Location = new System.Drawing.Point(41, 311); this.linkLabel3.Name = "linkLabel3"; this.linkLabel3.Size = new System.Drawing.Size(288, 32); this.linkLabel3.TabIndex = 3; this.linkLabel3.TabStop = true; this.linkLabel3.Text = "Class 3"; this.linkLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked); // // linkLabel4 // this.linkLabel4.BackColor = System.Drawing.SystemColors.ActiveCaption; this.linkLabel4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.linkLabel4.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel4.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabel4.Location = new System.Drawing.Point(467, 311); this.linkLabel4.Name = "linkLabel4"; this.linkLabel4.Size = new System.Drawing.Size(288, 32); this.linkLabel4.TabIndex = 4; this.linkLabel4.TabStop = true; this.linkLabel4.Text = "Class 4"; this.linkLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.linkLabel4.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel4_LinkClicked); // // button1 // this.button1.BackColor = System.Drawing.SystemColors.ActiveCaptionText; this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(64))))); this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.button1.Font = new System.Drawing.Font("Pristina", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button1.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.button1.ImageAlign = System.Drawing.ContentAlignment.TopCenter; this.button1.Location = new System.Drawing.Point(358, 206); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(101, 25); this.button1.TabIndex = 5; this.button1.Text = "Go Back"; this.button1.UseVisualStyleBackColor = false; this.button1.Click += new System.EventHandler(this.button1_Click); // // YOURCLASSSCHEDULE // this.AutoScaleBaseSize = new System.Drawing.Size(6, 15); this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(790, 482); this.Controls.Add(this.button1); this.Controls.Add(this.linkLabel4); this.Controls.Add(this.linkLabel3); this.Controls.Add(this.linkLabel2); this.Controls.Add(this.linkLabel1); this.Font = new System.Drawing.Font("OldDreadfulNo7 BT", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Name = "YOURCLASSSCHEDULE"; this.Text = "Your Classes"; this.Load += new System.EventHandler(this.Form2_Load); this.ResumeLayout(false); } #endregion public void Form2_Load(object sender, System.EventArgs e) { // if (text == "900456317") // { //} } public void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("http://www.georgiasouthern.edu/map/"); } private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("http://www.georgiasouthern.edu/map/"); } private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("http://www.georgiasouthern.edu/map/"); } private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("http://www.georgiasouthern.edu/map/"); } private void button1_Click(object sender, EventArgs e) { Form1 form1 = new Form1(); form1.Show(); this.Hide(); } } }

    Read the article

  • Have a program/winform that outputs name and classes in message box, my objective is to write the cl

    - by JB
    Here is my Get Schedule Class: using System; using System.IO; using System.Data; using System.Text; using System.Drawing; using System.Data.OleDb; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Drawing.Printing; using System.Collections.Generic; namespace Eagle_Eye_Class_Finder { public class GetSchedule { public string GetDataFromNumber(string ID) { IDnumber[] IDnumbers = new IDnumber[3]; foreach (IDnumber IDCandidateMatch in IDnumbers) { if (IDCandidateMatch.ID == ID) { StringBuilder myData = new StringBuilder(); myData.AppendLine(IDCandidateMatch.Name); myData.AppendLine(": "); myData.AppendLine(IDCandidateMatch.ID); myData.AppendLine(IDCandidateMatch.year); myData.AppendLine(IDCandidateMatch.class1); myData.AppendLine(IDCandidateMatch.class2); myData.AppendLine(IDCandidateMatch.class3); myData.AppendLine(IDCandidateMatch.class4); //return myData; return myData.ToString(); } } return ""; } public GetSchedule() { IDnumber[] IDnumbers = new IDnumber[3]; IDnumbers[0] = new IDnumber() { Name = "Joshua Banks", ID = "900456317", year = "Senior", class1 = "TEET 4090", class2 = "TEET 3020", class3 = "TEET 3090", class4 = "TEET 4290" }; IDnumbers[1] = new IDnumber() { Name = "Sean Ward", ID = "900456318", year = "Junior", class1 = "ENGNR 4090", class2 = "ENGNR 3020", class3 = "ENGNR 3090", class4 = "ENGNR 4290" }; IDnumbers[2] = new IDnumber() { Name = "Terrell Johnson", ID = "900456319", year = "Sophomore", class1 = "BUS 4090", class2 = "BUS 3020", class3 = "BUS 3090", class4 = "BUS 4290" }; } public class IDnumber { public string Name { get; set; } public string ID { get; set; } public string year { get; set; } public string class1 { get; set; } public string class2 { get; set; } public string class3 { get; set; } public string class4 { get; set; } public static void ProcessNumber(IDnumber myNum) { StringBuilder myData = new StringBuilder(); myData.AppendLine(myNum.Name); myData.AppendLine(": "); myData.AppendLine(myNum.ID); myData.AppendLine(myNum.year); myData.AppendLine(myNum.class1); myData.AppendLine(myNum.class2); myData.AppendLine(myNum.class3); myData.AppendLine(myNum.class4); MessageBox.Show(myData.ToString()); } } } } Here is my Form 1 class: using System; using System.IO; using System.Data; using System.Text; using System.Drawing; using System.Data.OleDb; using System.Collections; using System.Windows.Forms; using System.ComponentModel; using System.Drawing.Printing; using System.Collections.Generic; namespace Eagle_Eye_Class_Finder { /// This form is the entry form, it is the first form the user will see when the app is run. /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.ProgressBar progressBar1; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Button button2; private System.Windows.Forms.DateTimePicker dateTimePicker1; private IContainer components; private Timer timer1; private BindingSource form1BindingSource; public static Form Mainform = null; // creates new instance of second form YOURCLASSSCHEDULE SecondForm = new YOURCLASSSCHEDULE(); public Form1() { InitializeComponent(); // TODO: Add any constructor code after InitializeComponent call } /// Clean up any resources being used. 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.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.textBox1 = new System.Windows.Forms.TextBox(); this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.button2 = new System.Windows.Forms.Button(); this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.form1BindingSource = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.form1BindingSource)).BeginInit(); this.SuspendLayout(); // // textBox1 // this.textBox1.BackColor = System.Drawing.SystemColors.ActiveCaption; this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.form1BindingSource, "Text", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, null, "900456317")); this.textBox1.Location = new System.Drawing.Point(328, 280); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(208, 20); this.textBox1.TabIndex = 2; this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); // // progressBar1 // this.progressBar1.Location = new System.Drawing.Point(258, 410); this.progressBar1.MarqueeAnimationSpeed = 10; this.progressBar1.Name = "progressBar1"; this.progressBar1.Size = new System.Drawing.Size(344, 8); this.progressBar1.TabIndex = 3; this.progressBar1.Click += new System.EventHandler(this.progressBar1_Click); // // pictureBox1 // this.pictureBox1.BackColor = System.Drawing.SystemColors.ControlLightLight; this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(680, 400); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(120, 112); this.pictureBox1.TabIndex = 4; this.pictureBox1.TabStop = false; this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); // // button2 // this.button2.Font = new System.Drawing.Font("Mistral", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button2.Image = ((System.Drawing.Image)(resources.GetObject("button2.Image"))); this.button2.Location = new System.Drawing.Point(699, 442); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(78, 28); this.button2.TabIndex = 5; this.button2.Text = "OK"; this.button2.Click += new System.EventHandler(this.button2_Click); // // dateTimePicker1 // this.dateTimePicker1.Location = new System.Drawing.Point(336, 104); this.dateTimePicker1.Name = "dateTimePicker1"; this.dateTimePicker1.Size = new System.Drawing.Size(200, 20); this.dateTimePicker1.TabIndex = 6; this.dateTimePicker1.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged); // // timer1 // this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // form1BindingSource // this.form1BindingSource.DataSource = typeof(Eagle_Eye_Class_Finder.Form1); // // Form1 // this.AcceptButton = this.button2; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(856, 556); this.Controls.Add(this.dateTimePicker1); this.Controls.Add(this.button2); this.Controls.Add(this.pictureBox1); this.Controls.Add(this.progressBar1); this.Controls.Add(this.textBox1); this.Name = "Form1"; this.Text = "Eagle Eye Class Finder"; this.Load += new System.EventHandler(this.Form1_Load); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.form1BindingSource)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion /// The main entry point for the application. [STAThread] static void Main() { Application.Run(new Form1()); } public void Form1_Load(object sender, System.EventArgs e) { } public void textBox1_TextChanged(object sender, System.EventArgs e) { //allows only numbers to be entered in textbox string Str = textBox1.Text.Trim(); double Num; bool isNum = double.TryParse(Str, out Num); if (isNum) Console.ReadLine(); else MessageBox.Show("Enter A Valid ID Number!"); } public void button2_Click(object sender, System.EventArgs e) { string text = textBox1.Text; Mainform = this; this.Hide(); GetSchedule myScheduleFinder = new GetSchedule(); string result = myScheduleFinder.GetDataFromNumber(text); if (!string.IsNullOrEmpty(result)) { MessageBox.Show(result); } else { MessageBox.Show("Enter A Valid ID Number!"); } } public void dateTimePicker1_ValueChanged(object sender, System.EventArgs e) { } public void pictureBox1_Click(object sender, System.EventArgs e) { } public void progressBar1_Click(object sender, EventArgs e) { //this.progressBar1 = new System.progressBar1(); //progressBar1.Maximum = 200; //progressBar1.Minimum = 0; //progressBar1.Step = 20; } private void timer1_Tick(object sender, EventArgs e) { //if (progressBar1.Value >= 200 ) //{ //progressBar1.Value = 0; //} //return; //} //progressBar1.Value != 20; } } } here is my form 2 class: using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; namespace Eagle_Eye_Class_Finder { /// <summary> /// Summary description for Form2. /// </summary> public class YOURCLASSSCHEDULE : System.Windows.Forms.Form { public System.Windows.Forms.LinkLabel linkLabel1; public System.Windows.Forms.LinkLabel linkLabel2; public System.Windows.Forms.LinkLabel linkLabel3; public System.Windows.Forms.LinkLabel linkLabel4; private Button button1; /// Required designer variable. public System.ComponentModel.Container components = null; public YOURCLASSSCHEDULE() { // InitializeComponent(); // TODO: Add any constructor code after InitializeComponent call } /// Clean up any resources being used. 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() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(YOURCLASSSCHEDULE)); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.linkLabel2 = new System.Windows.Forms.LinkLabel(); this.linkLabel3 = new System.Windows.Forms.LinkLabel(); this.linkLabel4 = new System.Windows.Forms.LinkLabel(); this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // linkLabel1 // this.linkLabel1.BackColor = System.Drawing.SystemColors.ActiveCaption; this.linkLabel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.linkLabel1.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel1.LinkArea = new System.Windows.Forms.LinkArea(0, 7); this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabel1.Location = new System.Drawing.Point(41, 123); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(288, 32); this.linkLabel1.TabIndex = 1; this.linkLabel1.TabStop = true; this.linkLabel1.Text = "Class 1"; this.linkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // linkLabel2 // this.linkLabel2.BackColor = System.Drawing.SystemColors.ActiveCaption; this.linkLabel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.linkLabel2.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel2.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabel2.Location = new System.Drawing.Point(467, 123); this.linkLabel2.Name = "linkLabel2"; this.linkLabel2.Size = new System.Drawing.Size(288, 32); this.linkLabel2.TabIndex = 2; this.linkLabel2.TabStop = true; this.linkLabel2.Text = "Class 2"; this.linkLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.linkLabel2.VisitedLinkColor = System.Drawing.Color.Navy; this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); // // linkLabel3 // this.linkLabel3.BackColor = System.Drawing.SystemColors.ActiveCaption; this.linkLabel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.linkLabel3.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel3.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabel3.Location = new System.Drawing.Point(41, 311); this.linkLabel3.Name = "linkLabel3"; this.linkLabel3.Size = new System.Drawing.Size(288, 32); this.linkLabel3.TabIndex = 3; this.linkLabel3.TabStop = true; this.linkLabel3.Text = "Class 3"; this.linkLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked); // // linkLabel4 // this.linkLabel4.BackColor = System.Drawing.SystemColors.ActiveCaption; this.linkLabel4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.linkLabel4.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel4.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabel4.Location = new System.Drawing.Point(467, 311); this.linkLabel4.Name = "linkLabel4"; this.linkLabel4.Size = new System.Drawing.Size(288, 32); this.linkLabel4.TabIndex = 4; this.linkLabel4.TabStop = true; this.linkLabel4.Text = "Class 4"; this.linkLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.linkLabel4.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel4_LinkClicked); // // button1 // this.button1.BackColor = System.Drawing.SystemColors.ActiveCaptionText; this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(64))))); this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.button1.Font = new System.Drawing.Font("Pristina", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button1.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.button1.ImageAlign = System.Drawing.ContentAlignment.TopCenter; this.button1.Location = new System.Drawing.Point(358, 206); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(101, 25); this.button1.TabIndex = 5; this.button1.Text = "Go Back"; this.button1.UseVisualStyleBackColor = false; this.button1.Click += new System.EventHandler(this.button1_Click); // // YOURCLASSSCHEDULE // this.AutoScaleBaseSize = new System.Drawing.Size(6, 15); this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(790, 482); this.Controls.Add(this.button1); this.Controls.Add(this.linkLabel4); this.Controls.Add(this.linkLabel3); this.Controls.Add(this.linkLabel2); this.Controls.Add(this.linkLabel1); this.Font = new System.Drawing.Font("OldDreadfulNo7 BT", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Name = "YOURCLASSSCHEDULE"; this.Text = "Your Classes"; this.Load += new System.EventHandler(this.Form2_Load); this.ResumeLayout(false); } #endregion public void Form2_Load(object sender, System.EventArgs e) { // if (text == "900456317") // { //} } public void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("http://www.georgiasouthern.edu/map/"); } private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("http://www.georgiasouthern.edu/map/"); } private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("http://www.georgiasouthern.edu/map/"); } private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("http://www.georgiasouthern.edu/map/"); } private void button1_Click(object sender, EventArgs e) { Form1 form1 = new Form1(); form1.Show(); this.Hide(); } } }

    Read the article

  • Android Scaled Drawing to ImageView

    - by user329999
    Newbie question, so there's probably a simple answer to this problem. I'm drawing some simple shapes using canvas.drawCircle(), canvas.drawLine() etc. I originally copied the code from: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/DrawPoints.html Which extends a View and draws directly to a canvas. It doesn't load a pre-drawn bitmap because I need my application to turn data into a drawing and the user will enter the data. My changes work, but the drawing is too small (or big) and doesn't fill the screen using all the available screen. Ideally I'd rather use something like an ImageView in .XML like so: If that's possible. The documentation seems to imply that I want to set the scaleType as shown in the above .XML which seems like the simple way to do this. If using an ImageView in .XML is a good idea, then I'm lost on how to draw to the ImageView and could use some guidance on doing that task. If that won't work, then I'll need to do some more thinking about how to get my drawing scaled on the screen and basically I'm lazy and would rather have Android do the work for me. Feel free to suggest some other way that's completely different is this is the wrong solution path. :) Thanks.

    Read the article

  • [C#] Three System.Drawing methods manifest slow drawing or flickery: Solutions? or Other Options?

    - by Luke Mcneice
    Hi all, I am doing a little graphing via the System.Drawing and im having a few problems. I'm holding data in a Queue and i'm drawing(graphing) out that data onto three picture boxes this method fills the picture box then scrolls the graph across. so not to draw on top of the previous drawings (and graduly looking messier) i found 2 solutions to draw the graph. Call plot.Clear(BACKGOUNDCOLOR) before the draw loop [block commented] although this causes a flicker to appear from the time it takes to do the actual drawing loop. call plot.DrawLine(channelPen[5], j, 140, j, 0); just before each drawline [commented] although this causes the drawing to start ok then slow down very quickly to a crawl as if a wait command had been placed before the draw command. Here is the Code for reference: /*plotx.Clear(BACKGOUNDCOLOR) ploty.Clear(BACKGOUNDCOLOR) plotz.Clear(BACKGOUNDCOLOR)*/ for (int j = 1; j < 599; j++) { if (j > RealTimeBuffer.Count - 1) break; QueueEntity past = RealTimeBuffer.ElementAt(j - 1); QueueEntity current = RealTimeBuffer.ElementAt(j); if (j == 1) { //plotx.DrawLine(channelPen[5], 0, 140, 0, 0); //ploty.DrawLine(channelPen[5], 0, 140, 0, 0); //plotz.DrawLine(channelPen[5], 0, 140, 0, 0); } //plotx.DrawLine(channelPen[5], j, 140, j, 0); plotx.DrawLine(channelPen[0], j - 1, (((past.accdata.X - 0x7FFF) / 256) + 64), j, (((current.accdata.X - 0x7FFF) / 256) + 64)); //ploty.DrawLine(channelPen[5], j, 140, j, 0); ploty.DrawLine(channelPen[1], j - 1, (((past.accdata.Y - 0x7FFF) / 256) + 64), j, (((current.accdata.Y - 0x7FFF) / 256) + 64)); //plotz.DrawLine(markerPen, j, 140, j, 0); plotz.DrawLine(channelPen[2], j - 1, (((past.accdata.Z - 0x7FFF) / 256) + 94), j, (((current.accdata.Z - 0x7FFF) / 256) + 94)); } Is there any tricks to avoid these overheads? If not would there be any other/better solutions?

    Read the article

  • [C#] Two System.Drawing methods manifest slow drawing or flickery: Solutions? or Other Options?

    - by Luke Mcneice
    Hi all, I am doing a little graphing via the System.Drawing and im having a few problems. I'm holding data in a Queue and i'm drawing(graphing) out that data onto three picture boxes this method fills the picture box then scrolls the graph across. so not to draw on top of the previous drawings (and graduly looking messier) i found 2 solutions to draw the graph. Call plot.Clear(BACKGOUNDCOLOR) before the draw loop [block commented] although this causes a flicker to appear from the time it takes to do the actual drawing loop. call plot.DrawLine(channelPen[5], j, 140, j, 0); just before each drawline [commented] although this causes the drawing to start ok then slow down very quickly to a crawl as if a wait command had been placed before the draw command. Here is the Code for reference: /*plotx.Clear(BACKGOUNDCOLOR) ploty.Clear(BACKGOUNDCOLOR) plotz.Clear(BACKGOUNDCOLOR)*/ for (int j = 1; j < 599; j++) { if (j > RealTimeBuffer.Count - 1) break; QueueEntity past = RealTimeBuffer.ElementAt(j - 1); QueueEntity current = RealTimeBuffer.ElementAt(j); if (j == 1) { //plotx.DrawLine(channelPen[5], 0, 140, 0, 0); //ploty.DrawLine(channelPen[5], 0, 140, 0, 0); //plotz.DrawLine(channelPen[5], 0, 140, 0, 0); } //plotx.DrawLine(channelPen[5], j, 140, j, 0); plotx.DrawLine(channelPen[0], j - 1, (((past.accdata.X - 0x7FFF) / 256) + 64), j, (((current.accdata.X - 0x7FFF) / 256) + 64)); //ploty.DrawLine(channelPen[5], j, 140, j, 0); ploty.DrawLine(channelPen[1], j - 1, (((past.accdata.Y - 0x7FFF) / 256) + 64), j, (((current.accdata.Y - 0x7FFF) / 256) + 64)); //plotz.DrawLine(markerPen, j, 140, j, 0); plotz.DrawLine(channelPen[2], j - 1, (((past.accdata.Z - 0x7FFF) / 256) + 94), j, (((current.accdata.Z - 0x7FFF) / 256) + 94)); } Is there any tricks to avoid these overheads? If not would there be any other/better solutions?

    Read the article

  • System.Drawing.Image for Images in Business Objects?

    - by Mudu
    Hi Folks I'd like to store an image in a business object. In MSDN I saw that the System.Drawing-namespace provides lots of GDI+-features, etc. Is it okay to store an Image in an System.Drawing.Image class in business layer (which is a class library "only"), and thus including a reference to System.Drawing too? I slightly feel just kind of bad doing that, 'cause it seems like I have UI-specific references in business code. Moreover, the code could become unnecessarily platform-dependant (though this is only a problem in theory, because we do not develop for multiple platforms). If it isn't right that way, which type would fit best? Thank you for any response! Matthias

    Read the article

  • circuit/block-diagram drawing

    - by JCLL
    I'm looking for either algorithms or visualization tool for (nice) circuit/block-diagram drawing. I am also interested in a general formulation of the problem. By "circuit drawing", I mean the capability of exploring place & route for block-diagrams (rectangles) with I/O ports and their connections (wires). These block-diagrams can be hierarchical i.e some blocks may have some nested internal sub-structure etc. This topic is strongly related to classical graph-drawing, with the supplemental constraint of the need to take ports location into account, and possibly the shape of the blocks (rectangle of various sizes). Graphviz tools do not respond to the problem (at least my previous experiments have not been satisfactory). Force-directed algorithms retain my attention, but I have just found papers on classical directed graphs. Any hints ?

    Read the article

  • How to adjust size of programatically created Bitmap to match text drawn on it?

    - by TooFat
    I have the following .ashx page that takes some query string parameters and returns a bitmap with the specified text written on it. The problem I have is that I am currently just manually setting the initial size of the bitmap at 100 X 100 when what I really want is to have the bitmap be just big enough to include all the text that was written to it. How can I do this? public void ProcessRequest (HttpContext context) { context.Response.ContentType = "image/png"; string text = context.Request.QueryString["Text"]; //set FontName string fontName; if (context.Request.QueryString["FontName"] != null) { fontName = context.Request.QueryString["FontName"]; } else { fontName = "Arial"; } //Set FontSize int fontEms; if (context.Request.QueryString["FontSize"] != null) { string fontSize = context.Request.QueryString["FontSize"]; fontEms = Int32.Parse(fontSize); } else { fontEms = 12; } //Set Font Color System.Drawing.Color color; if (context.Request.QueryString["FontColor"] != null) { string fontColor = context.Request.QueryString["FontColor"]; color = System.Drawing.ColorTranslator.FromHtml(fontColor); context.Response.Write(color.ToString()); } else { color = System.Drawing.Color.Red; } using (System.Drawing.Text.PrivateFontCollection fnts = new System.Drawing.Text.PrivateFontCollection()) using (System.Drawing.FontFamily fntfam = new System.Drawing.FontFamily(fontName)) using (System.Drawing.SolidBrush brush = new System.Drawing.SolidBrush(color)) using (System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(100, 100)) { using (System.Drawing.Font fnt = new System.Drawing.Font(fntfam, fontEms)) { fnts.AddFontFile(System.IO.Path.Combine(@"C:\Development\Fonts\", fontName)); System.Drawing.Graphics graph = System.Drawing.Graphics.FromImage(bmp); graph.DrawString(text, fnt, brush, new System.Drawing.Point(0, 0)); string imgPath = System.IO.Path.Combine(@"C:\Development\MyPath\Images\Text", System.IO.Path.GetRandomFileName()); bmp.Save(imgPath); context.Response.WriteFile(imgPath); } } }

    Read the article

  • Converting a GUID to System.Drawing.Imaging.ImageFormat

    - by Kjensen
    I store information about images in a database - also their ImageFormat (jpeg, png etc). Console.WriteLine(System.Drawing.Imaging.ImageFormat.Jpeg.Guid); Outputs: b96b3cae-0728-11d3-9d7b-0000f81ef32e I want to store this in the database as a GUID - and read from the database and get the associated ImageFormat. How do I cast the GUID b96b3cae-0728-11d3-9d7b-0000f81ef32e to System.Drawing.Imaging.ImageFormat.Jpeg.Guid ?

    Read the article

  • gmail drawing send

    - by siran
    is there some online web app which would let me make a vector drawing, and give me the choice to write some text and send it through gmail ? for the magic to be complete, the web app would save my drawing as png (or whatever) and attach it to the sent email... i guess i would have to give the webapp my gmail account info so it can send it from my account...

    Read the article

  • Simple iPhone drawing app with Quartz 2D

    - by Mr guy 4
    I am making a simple iPhone drawing program as a personal side-project. I capture touches event in a subclassed UIView and render the actual stuff to a seperate CGLayer. After each render, I call [self setNeedsLayout] and in the drawRect: method I draw the CGLayer to the screen context. This all works great and performs decently for drawing rectangles. However, I just want a simple "freehand" mode like a lot of other iPhone applications have. The way I thought to do this was to create a CGMutablePath, and simply: CGMutablePathRef path; -(void)touchBegan { path = CGMutablePathCreate(); } -(void)touchMoved { CGPathMoveToPoint(path,NULL,x,y); CGPathAddLineToPoint(path,NULL,x,y); } -(void)drawRect:(CGContextRef)context { CGContextBeginPath(context); CGContextAddPath(context,path); CGContextStrokePath(context); } However, after drawing for more than 1 second, performance degrades miserably. I would just draw each line into the off-screen CGLayer, if it were not for variable opacity! The less-than-100% opacity causes dots to be left on the screen connecting the lines. I have looked at CGContextSetBlendingMode() but alas I cannot find an answer. Can anyone point me in the right direction? Other iPhone apps are able to do this with very good efficiency.

    Read the article

  • Drawing to the canvas

    - by Mattl
    I'm writing an android application that draws directly to the canvas on the onDraw event of a View. I'm drawing something that involves drawing each pixel individually, for this I use something like: for (int x = 0; x < xMax; x++) { for (int y = 0; y < yMax; y++){ MyColour = CalculateMyPoint(x, y); canvas.drawPoint(x, y, MyColour); } } The problem here is that this takes a long time to paint as the CalculateMyPoint routine is quite an expensive method. Is there a more efficient way of painting to the canvas, for example should I draw to a bitmap and then paint the whole bitmap to the canvas on the onDraw event? Or maybe evaluate my colours and fill in an array that the onDraw method can use to paint the canvas? Users of my application will be able to change parameters that affect the drawing on the canvas. This is incredibly slow at the moment.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >