|
hello guys:
i need help in mschartcontrol in vb6. actually i need help abt the plotting of the graph.i can feed values in the graph by declaring a 2D array and then using the chartdata property.
the problem is that the i have declared column count =1 and by right clicking the graph in the property window i have defined the series color RED.but when i plot the graph it plots in green color.
the second thing is that of the scaling of the y axis. i wish that the yaxis should show me the values up to 100. but when the program is executed it dislays the scaling according to the values given in the array.
can any body help me in this regard.
thanks.
|
|
|
|
|
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. )
<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 />
|
|
|
|
|
hi,
I want to put a icon near the all the nodes of a treeview control.
The nodes , the nodes are creating at runtime from Oracle.
also how can i put one textbox near those nodes.
Paritosh
|
|
|
|
|
paritosha wrote: I want to put a icon near the all the nodes of a treeview control.
Did you take a look at the ImageIndex[^] property of System.Windows.Forms.TreeNode ?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I am having trouble working in visual studio 2005 trying to create an invoice. I have set up a dataset and I have tried using reports, crystal reports, forms, everything but it won't work! Help Please.
William Penington
|
|
|
|
|
It would be very helpful if you explain your problem with more detail.
|
|
|
|
|
Hi Gulfraz,
Could please help me in printpreview control of .Net.
I want to Print and view datagrid multiline in PrintPreview.
I want to make this kind of report
//Start Report
Report Header1 Report Header2
Page Header1 Page Header2
Datagrid Data
=========================================
Student ID Student Name
=========================================
1 Muhammad Waqas Butt
Line1 Continue End
2 Muhammad Waqas Butt
Line2 Continue End
3 Muhammad Waqas Butt
Line3 Continue End
=========================================
Page Footer Page Footer
Report Footer Report Footer
//End Report
Please tell me can you help me in this?
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
Hello Waqas!
I think Crystal Report is the best solution. Though, I am not an expert in using Crystal Reports, but if you have any problem in using Crystal Reports then you can ask me.
You could also use the 3rd party tool (I liked this tool very much) is "Janus GridEx for .NET" and "Janus GridExPrintDocument"
Thank You.
-- modified at 6:12 Monday 31st October, 2005
|
|
|
|
|
I'm having trouble installing my windows service on my machine. I'm running XP Pro SP2 and I use installutil from the VS 2005 Command Prompt to intall the service. Below is the text from the command window. After running this the service still does not appear in my list of services. I made sure the Computer Management console was closed before intalling, and also that I had admin rights on my machine. Any help would be appreciated!
<br />
Setting environment for using Microsoft Visual Studio 2005 x86 tools.<br />
<br />
c:\Program Files\Microsoft Visual Studio 8\VC>installutil C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.exe<br />
Microsoft (R) .NET Framework Installation utility Version 2.0.50215.44<br />
Copyright (C) Microsoft Corporation. All rights reserved.<br />
<br />
<br />
Running a transacted installation.<br />
<br />
Beginning the Install phase of the installation.<br />
See the contents of the log file for the C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.exe assembly's progress.<br />
The file is located at C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.InstallLog.<br />
Installing assembly 'C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.exe'.<br />
Affected parameters are:<br />
logtoconsole =<br />
assemblypath = C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.exe<br />
logfile = C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.InstallLog<br />
No public installers with the RunInstallerAttribute.Yes attribute could be found in the C:\SupService\SupConsoleListener\bin\Debug\SupConsol<br />
eListener.exe assembly.<br />
<br />
The Install phase completed successfully, and the Commit phase is beginning.<br />
See the contents of the log file for the C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.exe assembly's progress.<br />
The file is located at C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.InstallLog.<br />
Committing assembly 'C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.exe'.<br />
Affected parameters are:<br />
logtoconsole =<br />
assemblypath = C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.exe<br />
logfile = C:\SupService\SupConsoleListener\bin\Debug\SupConsoleListener.InstallLog<br />
No public installers with the RunInstallerAttribute.Yes attribute could be found in the C:\SupService\SupConsoleListener\bin\Debug\SupConsol<br />
eListener.exe assembly.<br />
Remove InstallState file because there are no installers.<br />
<br />
The Commit phase completed successfully.<br />
<br />
The transacted install has completed.<br />
<br />
c:\Program Files\Microsoft Visual Studio 8\VC><br />
<br />
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
I am trying to change the user-agent header sent by a web browser control in my application.
The method I used is catching the BeforeNavigation2 event fired by the control and stopping the request to change the header and finally re-send it. I keep getting a run-time error (80004005) that says the Method 'Navigate2' from the Web browser object failed. I can't figure out why this is. A curious thing is that when I add a message box before the Navigate2 method is called I don't get an error anymore. Could anyone tell me what am I doing wrong, or if another method of doing this exists.
Here is the code in my current event handler:
<br />
Private Sub Web2_BeforeNavigate2(ByVal pDisp As Object, ByRef URL As Variant, ByRef Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, cancel As Boolean)<br />
Dim strMyHeaderField As String<br />
strMyHeaderField = "User-agent: XNBROWSER" & vbCrLf<br />
If InStr(Headers, "XNBROWSER") = 0 Then<br />
cancel = True<br />
Web2.Stop<br />
'MsgBox("X")<br />
Web2.Navigate2 URL, Flags, TargetFrameName, PostData, strMyHeaderField<br />
End If<br />
End Sub<br />
Thank you.
|
|
|
|
|
Just a guess, but try wrapping your code in a If statement that checks pDisp:
Private Sub Web2_BeforeNavigate2(ByVal pDisp As Object, ByRef URL As Variant, ByRef Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, cancel As Boolean)
Dim strMyHeaderField As String
If pDisp Is Web2.Object Then
strMyHeaderField = "User-agent: XNBROWSER" & vbCrLf
If InStr(Headers, "XNBROWSER") = 0 Then
cancel = True
Web2.Stop
'MsgBox("X")
Web2.Navigate2 URL, Flags, TargetFrameName, PostData, strMyHeaderField
End If
End If
End Sub
|
|
|
|
|
It doesn't help. Still the same error. I suspect it may be something regarding the state of the Web browser object, which maybe it is changed after a short time ( time it takes me to click on the button of the message box). I don't know.
|
|
|
|
|
I'm creating aWindows Application Form with several textboxes.
How can I save all the textboxes to a file, so that I can re-use the informtion.
In the VB book they only talk about one textbox.
|
|
|
|
|
Just simple write all the textboxes to a file (remember using a delimiter. So that u can parse back the string read from the file)
<< >>
|
|
|
|
|
It works fine on small databanks, by on large ones, I get an error. And this is the funny part about this. Windows displays the Error Report Dialog, says Faulting Application (Event ID 1000)., by the program will still keep running, and if I do not press anything on the Error dailog. My program will run to it all finish. If it is faulting, why does it keep on running? The following information is from my EventLog:
Faulting application egdatabanktool.exe, version 1.0.2126.24660, faulting module unknown, version 0.0.0.0, fault address 0x1f48cbc1.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
0000: 41 70 70 6c 69 63 61 74 Applicat
0008: 69 6f 6e 20 46 61 69 6c ion Fail
0010: 75 72 65 20 20 65 67 64 ure egd
0018: 61 74 61 62 61 6e 6b 74 atabankt
0020: 6f 6f 6c 2e 65 78 65 20 ool.exe
0028: 31 2e 30 2e 32 31 32 36 1.0.2126
0030: 2e 32 34 36 36 30 20 69 .24660 i
0038: 6e 20 75 6e 6b 6e 6f 77 n unknow
0040: 6e 20 30 2e 30 2e 30 2e n 0.0.0.
0048: 30 20 61 74 20 6f 66 66 0 at off
0050: 73 65 74 20 31 66 34 38 set 1f48
0058: 63 62 63 31 0d 0a cbc1..
EXE NAME="EGDatabankTool.exe" FILTER="GRABMI_FILTER_PRIVACY"
MATCHING_FILE NAME="EGDatabankTool.exe" SIZE="49152" CHECKSUM="0x1344EF70" BIN_FILE_VERSION="1.0.2125.26583" BIN_PRODUCT_VERSION="1.0.2125.26583" PRODUCT_VERSION="1.0.2125.26583" FILE_DESCRIPTION=" " COMPANY_NAME=" " PRODUCT_NAME=" " FILE_VERSION="1.0.2125.26583" ORIGINAL_FILENAME="EGDatabankTool.exe" INTERNAL_NAME="EGDatabankTool.exe" LEGAL_COPYRIGHT=" " VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="1.0.2125.26583" UPTO_BIN_PRODUCT_VERSION="1.0.2125.26583" LINK_DATE="10/26/2005 18:46:14" UPTO_LINK_DATE="10/26/2005 18:46:14" VER_LANGUAGE="Language Neutral [0x0]"
MATCHING_FILE NAME="essdataadapter.dll" SIZE="90112" CHECKSUM="0x7AB848C2" BIN_FILE_VERSION="1.0.2125.18678" BIN_PRODUCT_VERSION="1.0.2125.18678" PRODUCT_VERSION="1.0.2125.18678" FILE_DESCRIPTION=" " COMPANY_NAME=" " PRODUCT_NAME=" " FILE_VERSION="1.0.2125.18678" ORIGINAL_FILENAME="ESSDataAdapter.dll" INTERNAL_NAME="ESSDataAdapter.dll" LEGAL_COPYRIGHT=" " VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="1.0.2125.18678" UPTO_BIN_PRODUCT_VERSION="1.0.2125.18678" LINK_DATE="10/26/2005 18:45:09" UPTO_LINK_DATE="10/26/2005 18:45:09" VER_LANGUAGE="Language Neutral [0x0]"
MATCHING_FILE NAME="Interop.ADOX.dll" SIZE="23040" CHECKSUM="0xD48F427C" BIN_FILE_VERSION="2.7.0.0" BIN_PRODUCT_VERSION="2.7.0.0" PRODUCT_VERSION="2.7.0.0" FILE_DESCRIPTION=" " COMPANY_NAME=" " PRODUCT_NAME="Assembly imported from type library ADOX" FILE_VERSION="2.7.0.0" ORIGINAL_FILENAME="Interop.ADOX.dll" INTERNAL_NAME="Interop.ADOX" LEGAL_COPYRIGHT=" " VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="2.7.0.0" UPTO_BIN_PRODUCT_VERSION="2.7.0.0" LINK_DATE="10/07/2005 17:06:59" UPTO_LINK_DATE="10/07/2005 17:06:59" VER_LANGUAGE="Language Neutral [0x7f]"
MATCHING_FILE NAME="Interop.JRO.dll" SIZE="9216" CHECKSUM="0x4B86CABD" BIN_FILE_VERSION="2.6.0.0" BIN_PRODUCT_VERSION="2.6.0.0" PRODUCT_VERSION="2.6.0.0" FILE_DESCRIPTION=" " COMPANY_NAME=" " PRODUCT_NAME="Assembly imported from type library JRO" FILE_VERSION="2.6.0.0" ORIGINAL_FILENAME="Interop.JRO.dll" INTERNAL_NAME="Interop.JRO" LEGAL_COPYRIGHT=" " VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="2.6.0.0" UPTO_BIN_PRODUCT_VERSION="2.6.0.0" LINK_DATE="10/17/2005 13:27:50" UPTO_LINK_DATE="10/17/2005 13:27:50" VER_LANGUAGE="Language Neutral [0x7f]"
EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY"
MATCHING_FILE NAME="kernel32.dll" SIZE="930816" CHECKSUM="0xF60887C3" BIN_FILE_VERSION="5.1.2600.1560" BIN_PRODUCT_VERSION="5.1.2600.1560" PRODUCT_VERSION="5.1.2600.1560" FILE_DESCRIPTION="Windows NT BASE API Client DLL" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Windows® Operating System" FILE_VERSION="5.1.2600.1560 (xpsp2_gdr.040517-1325)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0xEC3A9" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.1560" UPTO_BIN_PRODUCT_VERSION="5.1.2600.1560" LINK_DATE="06/17/2004 17:58:35" UPTO_LINK_DATE="06/17/2004 17:58:35" VER_LANGUAGE="English (United States) [0x409]"
One thing more, is that the fault address (0x1f48cbc1) will always be the same, and if the run this program on the different computer it will be different address but show the same one each time the error happens on it. By the way my computer is: XP Pro (SP1), Dell 2.79 GHz, Ram 1 GB, DotNet 1.1 (Not SP1), ADO 2.7
If you have any ideas, please let me know.
J Hatfield
|
|
|
|
|
I want to be able to detect if a PC is connected to a network.
I found the following which I thought should work.
System.Windows.Forms.SystemInformation.Network
However it always returns true even with the Lan cable removed from my laptop. There is no WiFi. I even tried a re-boot with Lan cable removed.
As a test I tried
System.Windows.Forms.SystemInformation.Username
and this did work correctly so I ssume the class is working.
Anyone know why or is there an alternative solution.
thanks
mike
|
|
|
|
|
Try using the Active DS Type Library, it has a few useful applications.
|
|
|
|
|
Thanks for replying and sorry for the delay.
Unfortunatley the network in question does not use Active directory.
mike
|
|
|
|
|
hello,
Iam a computer science student who needs help for her graduation project.
I am planning on making a project on 3d figures. I want to use VB6 for coding,and OpenGL for 3d rendering, and 3dmax for designing a figure.. export it as .3ds and then importing it in openGL.
Can I do that?? I am really confused , and don't know where to start. please help me.
|
|
|
|
|
how to directly print the vb.net form. i need some sample code for it.
himanshu
|
|
|
|
|
Himanshu:
I have the same need to print a form. In Microsoft Access 2000 and higher, you can print a form exactly as it shows on the screen. I need to do the same in Visual Basic.net. Did you find out how?
Rich Locus
|
|
|
|
|
I build one application in vb6, sql server on my desktop, and now i have created same application for pocket pc build in vb.net compact framework, sql ce database.
Both applications are work fine on their respective platforms, but one major problem facing is "How to synchronize Pocket PC sql ce database with desktop Sql server"
i am using sql server 2000 personal edition, windows XP, active sync 8.0 on my desktop.
so please suggest me how to sync both database
One Condition:-- Both database having add, edit, delete facilities on same time
waiting for u'r kind reply
Amey J. Chavan.(MUM)
|
|
|
|
|
How can I programing with VB.net to change text book from scaning to file?be text
|
|
|
|
|
Hii All!
I am reading/writing a file using streams. I am also displaying the filenames and Filesizes using the Fileinfo object. I need the Filetypes to be displayd like for 'txt' it wuld be 'TEXT Document' and so on.
how can I find it....
thanx
_mubashir
|
|
|
|
|
AFAIK you've to go through the registry.
Under CLASSES_ROOT you'll find the key (=extension) with a default value. That's the name you're looking for
|
|
|
|