10046 : converting a program from vb6 to vb.net. Everything seems to go fine, exept for the userdraw ackground part.

…can convert a Hdc to a Graphic object like in the sample below. private void axphSchemaX1_OnUserDrawTime(object sender, AxphGantXControl.IphSchemaXEvents_OnUserDrawTimeEvent e) {   Graphics gr=System.Drawing.Graphics.FromHdc((IntPtr)e.theHDC);   gr.DrawLine(new Pen(Color.Beige,5),e.left,e.top,e.right,e.bottom);   gr.DrawLine(new Pen(Color.BlueViolet,5),e.right,e.top,e.left,e.bottom); }… Continue reading

10019 : How to display the start and end time of a time object while it is being dragged

…being applied. private void axphGantX1_OnHintInfo(object sender, AxphGantXControl.IphGantXEvents_OnHintInfoEvent e) {   if (e.theStart.ToOADate()>0)   {     labelHint.Text=”Starts”+e.theStart.ToString()+” and This long:”+e.theLength.ToString();   }   else   {     labelHint.Text=”nada”;   } }… Continue reading

10007 : Multi page print

…        Call .PrintToHdc(Printer.hDC, 1, lngTitleHeight, dblXscale, dblXscale, .TreeWidth, _                             .TopItemTree, -1, False, .Start, .Stop, .GetScaleLen, .ScalerHeight, _                             lngWidthReturned, lngHeightReturned)                End With     Printer.EndDoc     End Sub… Continue reading

11229 : Resizing the TimeItem”s Region

…GanttRow.FromGridNode(gn);       TimeItem ti=gr.Layers[0].AddNewTimeItem();       ti.Start=gantt1.DateScaler.StartTime.AddDays(5);       ti.Stop=ti.Start.AddDays(10);       ti.TimeItemLayout=ti.TimeItemLayout.Clone() as TimeItemLayout;       ti.TimeItemLayout.TimeItemStyle=TimeItemStyle.User;     }     /// <summary>     /// This event can help you override how a time… Continue reading