|
I got em right now, i had not set right on the form properties, makes changes there and hope it would work fine now. Thank you guys for your time.
zela.
|
|
|
|
|
Hi all,
I need to plot a graph on a Windows forms using numeric values stored in an excel sheet
I came accross this code .. it creates an excel sheet and plot graphs in an excel sheet itself
Public Class testchart
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim objXL As Object
Dim objWbk As Object
Dim oSheet As Object ' Excel Worksheet
Dim oChart As Object ' Excel Chart
objXL = CreateObject("Excel.application")
objWbk = objXL.workbooks.Open("C:\testing\test.xls")
On Error GoTo ErrHandler
Dim iRow As Integer ' Index variable for the current Row
Dim iCol As Integer ' Index variable for the current Row
Const cNumCols = 10 ' Number of points in each Series
Const cNumRows = 2 ' Number of Series
oSheet = objWbk.Worksheets.Item(1)
oChart = oSheet.ChartObjects.Add(50, 40, 300, 200).Chart
oChart.SetSourceData(Source:=oSheet.Range("A1").Resize(cNumRows, cNumCols))
' Make Excel Visible:
objXL.Visible = True
objXL.UserControl = True
ExitHandler:
On Error Resume Next
objWbk = Nothing
objXL.Quit()
objXL = Nothing
Exit Sub
ErrHandler:
MsgBox(Err.Description, vbExclamation)
Resume ExitHandler
End Sub
End Class
Unable to figure out as to how the same graph can be plotted on a windows form using data from excel
Please guide,
Thanks,
Gauti.
|
|
|
|
|
It would be much easier to get the data from the Excel sheet and use something like this[^] to show the chart on your own form.
|
|
|
|
|
|
Tmoshea wrote: I have used Zedgraph for charting bar graphs as well as waveforms
Congratulations!
Why are you telling ME this?? I don't care. You might want to reply to the original poster next time. That way, THEY will get the message that someone replied to THEIR post.
|
|
|
|
|
I have used Zedgraph for charting bar graphs as well as waveforms. There is an example on this website:A flexible charting library for .NET
modified on Tuesday, July 12, 2011 11:57 AM
|
|
|
|
|
Thank you Tmoshea..
Can u plz help me with a small example of how to implement it using Zedgraph .. [plot a graph on windows form using values from a closed excel sheet] ..
Regards...
Gauti..
|
|
|
|
|
Hi,
I try to upgrade my VS2008 project into VS2010. Its get updated no problem. But when i check from my user system, Its giving the above error...Colunot load file or assembly....
Any Ideas [or] Guidences..
Thanks for Helps
|
|
|
|
|
That means the correct Crystal Reports runtime version isn't installed on your users machines.
|
|
|
|
|
|
I have to make an installer for a Windows service with a Visual Studio installation project. But the guy who made the service (not me), just gave me the compiled .dll and .exe that is required. Now, everywhere I see, I have to compile the webservice with an installer class specifying the name.
Is there another way to install windows services without this installer class? Like running the InstallUtil.exe from code with the location of the .exe as a parameter? (Tried that, doesn't work at the moment. No idea why.) Any other ideas?
|
|
|
|
|
|
Hmmm, I can use the sc command in code... I think.
Thanks!
EDIT: It worked. You can add and delete a windows service with:
Const ServiceName = "Name"
strPathService = My.Settings("path")
Shell(String.Format("sc create {0} binpath= ""{1}"" start= auto displayname= {0}", ServiceName, strPathService), AppWinStyle.NormalFocus, True)
modified on Monday, July 11, 2011 3:13 AM
|
|
|
|
|
KenBonny wrote: But the guy who made the service (not me), just gave me the compiled .dll and .exe that is required.
Did he use a code-obfuscator?
Bastard Programmer from Hell
|
|
|
|
|
Yes. (I had thought of decompiling the code and doing it myself, but all dll's that are shipped to clients, must be obfuscated.)
|
|
|
|
|
how to create a master page in vb.net
|
|
|
|
|
|
Hola lista tengo un problema y es que quiero guardar puntero al ultimo archivo leido por Dir.. me refiero a esto:
Tengo un bucle :
<br />
sArchivo = Dir(sFullPath2DirCliente)<br />
iCountPictureOnFirstLoad = 0<br />
<br />
Do While sArchivo <> vbNullString<br />
If nII < 12 Then<br />
If mbCargarImagen(sImageRootDir & sDirCliente & sArchivo, nII) Then<br />
imgSnapshot(nII).Tag = sImageRootDir & sDirCliente & sArchivo<br />
Me.LblFechaFoto(nII).Caption = FileSystem.FileDateTime(imgSnapshot(nII).Tag)<br />
iCountPictureOnFirstLoad = iCountPictureOnFirstLoad + 1 ' By Almeda<br />
Else<br />
imgSnapshot(nII).Tag = vbNullString<br />
Me.LblFechaFoto(nII).Caption = ""<br />
End If<br />
Else<br />
Exit Do<br />
End If<br />
sArchivo = Dir$<br />
nII = nII + 1<br />
Loop<br />
El problema es que dentro de la funcion mbCargarImagen existe una sentencia que crea archivos temporales, por lo tanto cuando se ejecuta el sArchivo = Dir$ ya se perdió el puntero al ultimo archivo leido y me sale el error Invalid procedure call or argument...
Alguien sabe como se soluciona esto????
GRACIAS!!!
|
|
|
|
|
I guess you did not notice that this is an English language forum. Please get your question translated and people will try to help you.
The best things in life are not things.
|
|
|
|
|
oh! I'm Sorry!!!
I resolved!with this code! Thank you!
<br />
sArchivo = Dir(sFullPath2DirCliente)<br />
iCountPictureOnFirstLoad = 0<br />
<br />
Do While sArchivo <> vbNullString<br />
' If nII <= 12 Then<br />
If nII < 12 Then<br />
If mbCargarImagen(sImageRootDir & sDirCliente & sArchivo, nII) Then<br />
imgSnapshot(nII).Tag = sImageRootDir & sDirCliente & sArchivo<br />
Me.LblFechaFoto(nII).Caption = FileSystem.FileDateTime(imgSnapshot(nII).Tag)<br />
iCountPictureOnFirstLoad = iCountPictureOnFirstLoad + 1 ' By Almeda<br />
Else<br />
imgSnapshot(nII).Tag = vbNullString<br />
Me.LblFechaFoto(nII).Caption = ""<br />
End If<br />
Else<br />
Exit Do<br />
End If<br />
i = 0<br />
sCurrentFile = Dir(sFullPath2DirCliente)<br />
Do While i <= nII<br />
If sCurrentFile = sArchivo Then Exit Do<br />
sCurrentFile = Dir$<br />
Loop<br />
sArchivo = Dir$<br />
nII = nII + 1<br />
Loop<br />
|
|
|
|
|
Im having a strange issue with Visual Studio 2010.
I've been programming in VB.Net since Visual Basic Express 2003. I've also used 2005, 2008 and now 2010, both the express edition and the proffesional edition.
My experience is that with all these versions, if you hit F5 or click the Run button, you get a debug build of your application which is written to the bin\debug folder.
To get a Release version, i just go to the Build menu and hit Build solution\solutionname. This creates a Release build of your application which is written to the bin\release folder
So far so good.
But i've recently reinstalled Visual Studio 2010 and now the above is no longer the case.
When i hit F5 or the Run button, i get a debug build, just as i expected.
But when i click the Build solution\solutionname menuitem in the Build menu, i STILL get a debug build and no release build.
Why?
I just want a debug build when i hit F5\run and a release build when click the Build solution\solutionname menuitem.
This is what i got used to over the years.
Who can help me fix this?
Virtual Space Shuttle Astronaut
|
|
|
|
|
Check which project configuration type is selected in the drop down on your toolbar.
The best things in life are not things.
|
|
|
|
|
Hmm, i've never noticed that before. It was never there but now it is.
It's set to Debug.
Virtual Space Shuttle Astronaut
|
|
|
|
|
I don't use VB but that has been in every version of Visual Studio (from VC 4), Visual C++ Express (from 2005), and Visual C# Express (from 2005) that I have used.
The best things in life are not things.
|
|
|
|
|
Well, i know i never had to deal with the configuration manager before the format, i could just hit F5\run to produce a debug build, and use the Build ... menuitem to produce a release build. There was no need to switch between the debug and release configurations. This is what i got used to over the years and this is the behavior i prefer.
I don't feel like switching between Debug and Release modes every time, i never had to do that before, so why do i have to do it now? It was never an issue.
I'd like to add that this this[^] no longer applies to me, and i quote:
When you set up Visual Studio, you are asked to choose a set of Development Settings for your primary programming language. If you choose the Visual Basic Development Settings, the tool for choosing the Debug or Release configuration does not appear in the toolbar. Instead, Visual Studio automatically chooses the Debug configuration when you choose Start from the Debug menu and the Release configurations when you use the Build menu. To change the Development Settings, see How to: Restore Hidden Debugger Commands. After you change the Development Settings, make sure that Show advanced build configurations is selected in the Options dialog box, Project and Solutions category, General page.
In particular the bold part does no longer seem to be true but it is the behaviour i want. Before the format, it does exactly what it says, but after the format this no longer seems to be true as i still see the Debug configuration in my standard toolbar and click the build ... menuitem does not produce the release build.
I just don't get it.
Virtual Space Shuttle Astronaut
|
|
|
|