Click here to Skip to main content
15,916,188 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Click throught a form Pin
[Marc]29-Oct-05 13:09
[Marc]29-Oct-05 13:09 
GeneralRe: Click throught a form Pin
Greeky30-Oct-05 0:23
Greeky30-Oct-05 0:23 
QuestionUser Control does not process KeyDown event Pin
Gulfraz Khan29-Oct-05 2:03
Gulfraz Khan29-Oct-05 2:03 
AnswerRe: User Control does not process KeyDown event Pin
Christian Graus30-Oct-05 11:51
protectorChristian Graus30-Oct-05 11:51 
GeneralRe: User Control does not process KeyDown event Pin
Gulfraz Khan30-Oct-05 23:56
Gulfraz Khan30-Oct-05 23:56 
Questioncon not find keycodev2.dll or invalid keycode Pin
mostafa_h29-Oct-05 1:44
mostafa_h29-Oct-05 1:44 
Questionmschart control Pin
amadullah29-Oct-05 1:37
amadullah29-Oct-05 1:37 
AnswerRe: mschart control Pin
Joshua Quick29-Oct-05 11:18
Joshua Quick29-Oct-05 11:18 
Yeah, the mschart is pretty under documented. Take a look at the below sample code of mine. It should be a good starting point for you. It shows you how to setup a graph and how to turn auto-scaling off so that you can set your own axis min/max. The below code assumes your mschart.ocx control is named "chtGraph".

(I wrote this code without the IDE and in a hurry, but based on existing working code, so I hope it still compiles. Smile | :) )

<br />
Private Sub BuildGraph()<br />
   Dim vData() As Variant<br />
   Dim iMaxPoints As Integer<br />
   Dim iIndexData As Integer<br />
<br />
   ' Activate error trapping.<br />
   On Error GoTo catch<br />
<br />
   ' Do not init max to zero. Graph requires at least one point in<br />
   ' order to draw, otherwise control is drawn blank.<br />
   iMaxPoints = 100<br />
<br />
   ' Setup data array to be added to graph.<br />
   ' Array is defined like this: vData(X,Y) where...<br />
   ' X is max number of points out of all plots.<br />
   ' Y is the number of axes your plot uses. 2 for 1 plot, 4 for 2 plots, etc.<br />
   ReDim vData(0 To (iMaxPoints - 1), 0 To 1)<br />
   For iIndexData = 1 To iMaxPoints Step 1<br />
      vData(iIndexData - 1, 0) = CDbl(Rnd() * iMaxPoints)<br />
      vData(iIndexData - 1, 1) = CDbl(iIndexData)<br />
   Next<br />
   chtGraph.RowCount = iMaxPoints<br />
   chtGraph.ColumnCount = 2<br />
   chtGraph.ChartData = vData<br />
<br />
   ' Setup legend.<br />
   chtGraph.ShowLegend = True<br />
   chtGraph.Plot.SeriesCollection(1).LegendText = "Plot Line 1"<br />
<br />
   ' Setup axes.<br />
   With chtGraph.Plot<br />
      .UniformAxis = False<br />
      With .Axis(VtChAxisIdY).ValueScale<br />
         .Auto = False       ' Turn auto-scaling off.<br />
         .MajorDivision = 4<br />
         .Minimum = 0<br />
         .Maximum = 100<br />
      End With<br />
      .Axis(VtChAxisIdX).ValueScale.Auto = True<br />
      .Axis(VtChAxisIdX).AxisTitle.Text = "X-Axis Title"<br />
      .Axis(VtChAxisIdY).AxisTitle.Text = "Y-Axis Title"<br />
   End With<br />
<br />
   ' Draw graph.<br />
   chtGraph.Refresh<br />
   Exit Sub<br />
<br />
catch:<br />
   ' Error occurred! Display error message.<br />
   MsgBox "Error building graph!", vbCritical, "Internal Error!"<br />
End Sub<br />

Questionputing a icon in treeview Pin
Paritos28-Oct-05 21:00
Paritos28-Oct-05 21:00 
AnswerRe: puting a icon in treeview Pin
S. Senthil Kumar29-Oct-05 19:28
S. Senthil Kumar29-Oct-05 19:28 
QuestionHow do I print an invoice Pin
William Penington28-Oct-05 13:51
William Penington28-Oct-05 13:51 
AnswerRe: How do I print an invoice Pin
Gulfraz Khan29-Oct-05 3:07
Gulfraz Khan29-Oct-05 3:07 
QuestionRe: How do I print an invoice Pin
| Muhammad Waqas Butt |30-Oct-05 22:18
professional| Muhammad Waqas Butt |30-Oct-05 22:18 
AnswerRe: How do I print an invoice Pin
Gulfraz Khan31-Oct-05 0:11
Gulfraz Khan31-Oct-05 0:11 
QuestionVS 2005 Windows Service Install Pin
Brent Lamborn28-Oct-05 11:34
Brent Lamborn28-Oct-05 11:34 
Questionvb6 web browser control Pin
Lord Bogy28-Oct-05 7:33
Lord Bogy28-Oct-05 7:33 
AnswerRe: vb6 web browser control Pin
rwestgraham28-Oct-05 8:06
rwestgraham28-Oct-05 8:06 
GeneralRe: vb6 web browser control Pin
Lord Bogy28-Oct-05 8:51
Lord Bogy28-Oct-05 8:51 
QuestionSaveFileDialog Pin
jotico28-Oct-05 7:30
jotico28-Oct-05 7:30 
AnswerRe: SaveFileDialog Pin
enjoycrack28-Oct-05 10:52
enjoycrack28-Oct-05 10:52 
QuestionFaulting application Events ID 1000 (But still Running, Why?) Pin
J Hatfield28-Oct-05 5:41
J Hatfield28-Oct-05 5:41 
QuestionNetwork detection Pin
taylom28-Oct-05 2:16
taylom28-Oct-05 2:16 
AnswerRe: Network detection Pin
MatthysDT28-Oct-05 4:29
MatthysDT28-Oct-05 4:29 
GeneralRe: Network detection Pin
taylom31-Oct-05 2:58
taylom31-Oct-05 2:58 
QuestionOpenGL and VB6 and .3ds Pin
3asal28-Oct-05 2:12
3asal28-Oct-05 2:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.