|
Thanks for the speedy response. Now works a treat.
May have some other questions for the forum as my conversion goes on. Could be good as I imagine loads of other people may ask the same questions.
Thanks again.
|
|
|
|
|
Just a quick question,
What would the syntax be if the handle is KEY UP or MOUSE or DOUBLECLICK?
Would it be the same?
|
|
|
|
|
Same thing. You have to cast the sending object to a type that you expect. It doesn't matter which event the sender fired, just what type the sender is.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Sorry to hassle you but what would it be for keyup, doubleclick or mouseup. Tried a couple of things but no luck. Works perfect for checkbox, button etc. Must be a Friday thing.
|
|
|
|
|
The question doesn't make any sense. What controls are you expecting these events on? The code to convert sender to a known object (control) is exactly the same.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
In VB6, it was relatively easy to create a form that would allow the user to access a context-specific help system with hitting the F1 key. All the programmer need do was place a number in the HelpContextID property of the form. Is there anything equivalent in VB.NET?
Rich Feldman
|
|
|
|
|
You might be looking for the Help Provider.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
I am trying to graph the entire column in the datatable using ZedGraph.
I have found some code on the web and I have tried to modify it to fit my code and the datatable that I have created. Unfortunately it does not work , nor run. It gives me an error when I try to run my code. Can someone please help me resolve this error. this error is located when I try to display the XDataMember and YDataMember.
the error which I get is this:
Quote:
An unhandled exception of type 'System.NullReferenceException' occurred in microsoft.visualbasic.dll
Additional information: Object variable or With block variable not set.
Here is the code that I have:
----------------------------------------------------
Private Sub CreateGraph_DataSource(ByVal ZG1 As ZedGraphControl)
Dim MyPane As GraphPane = New GraphPane
MyPane.Title.Text = "DataSourcePointList Test"
MyPane.XAxis.Title.Text = "Date"
MyPane.YAxis.Title.Text = "Freight Charges ($US)"
'Create a new DataSourcePointList to handle the database connection
Dim dspl As DataSourcePointList = New DataSourcePointList
' Specify the table as the data source
'dspl.DataSource = theKid5.DG135.DataSource.dt135
'The X data will come from the "X" column
dspl.XDataMember = theKid5.DG135.DataSource.r135.Item.dt135.Columns("X")
' The Y data will come from the "Y" column
dspl.YDataMember = theKid5.DG135.DataSource.r135.Item.dt135.Columns("Y")
' Make a curve
Dim MyCurve As LineItem
MyPane.AddCurve("X", dspl, Color.Blue)
'MyCurve.Line.IsVisible = False
' Show the point values. These are derived from the "ShipName" database column,
' which is set as the "Tag" property.
ZG1.IsShowPointValues = True
'Auto set the scale ranges
ZG1.AxisChange()
End Sub
-------------------------------------------
Any help on this would be greatly appreciated. Thanks
--Srig
|
|
|
|
|
hi everyone,
iam creating a set up using the publish wizard.
iam using ini files in my project,as well as some html files also
my application checking the version number from a xml file in a web site.
when it is displaying login form after installing then it is giving unable to find xx.xml file.(xx.xml file is file from which iam checking the version number from a website)
it is also having some htm file also,once i include that xx.xml file and publish then it will displaying message abc.htm file unable to find
if any one can help
warm regards
ravi
|
|
|
|
|
I have a Windows Service written in VB.NET 2005 that consists of an EXE, a private DLL and a shared DLL. I install the EXE and private DLL to the Application Folder and the shared DLL to the GAC. I am installing on a Windows Server 2003 system.
The installation worked fine (or appeared to) when the shared DLL was already in the GAC (because another application installed it there). The first time I tried to do the install on a system where the shared DLL was not in the GAC it failed with an error that indicated that a component was missing.
It appears that when the install has finished copying files and runs InstallUtil to install the EXE file as a Windows Service it fails because it can not find the shared DLL. If I copy the shared DLL to the GAC or the Application Folder prior to the install the error does not occur. If I install the shared DLL to the Application Folder instead of the GAC the error does not occur (except now other applications can not share the DLL). If I install the shared DLL to both the GAC and the Application Folder the error does not occur.
I have adopted the last workaround as a temporary fix but I would like to install a single copy of the shared DLL into the GAC.
Has anyone seen this issue before and/or know of a solution?
BTW The problem does not occur if the exe is not a Windows Service presumably because the installation is not attempting to load any application code during the install.
Terry Porter
|
|
|
|
|
Maybe I read this wrong, but it seems like you think the installutil program is going to install the shared dll in the GAC? I am not sure why you would think this would happen. It would always assume it is there or in the application folder. Maybe I am missing something.
Ben
|
|
|
|
|
I am expecting the Windows Install to install the shared DLL in the GAC before it runs InstallUtil to install the EXE as a Windows Service.
It appears that the Windows Install is running InstallUtil after it has copied the EXE and private DLL to the Application Folder but before it copies the shared DLL to the GAC.
Terry
|
|
|
|
|
Does anyone know how to search for files using windows service in vb.net. I already have the service created, I just need to know how to search for media files. Any ideas?
jds1207
|
|
|
|
|
You are looking for them in a specific directory? If you just want to seach the whole computer that sounds a lot like a virus or spyware.
Imports System.IO
Use the Directory object to get a list of files.
Dim files As String() = Directory.GetFiles("c:\", "*.mp3")
Ben
|
|
|
|
|
Sorry I was not clear but I want to be able to search for any type of file specified. In other words I want to create a function and pass in a file name variable.
jds1207
|
|
|
|
|
Here is some code that I wrote but I am not sure if it is right.
Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
Timer1.Enabled = True
SearchFiles(".txt")
End Sub
Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your service.
Timer1.Enabled = False
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
'Check if the event log exists
If Not Diagnostics.EventLog.SourceExists("MyService") Then
'Create Log
Diagnostics.EventLog.CreateEventSource("MyService", "Myservice Log")
End If
EventLog.Source = "MyService"
'Write to the log
Diagnostics.EventLog.WriteEntry("MyService Log", "This is log on " & _
CStr(TimeOfDay), EventLogEntryType.Information)
End Sub
Private Sub SearchFiles(ByVal FileType As String)
Dim FilePath As String = "c:\"
Dim rootDi As New DirectoryInfo(FilePath)
Dim Di As DirectoryInfo
For Each Di In rootDi.GetDirectories
Directory.GetFiles(FilePath, FileType)
Next
End Sub
Am I using the code above correctly? I am trying to search for files using windows service in vb.net 2005. I want to be able to specify which file type I am searching for. Please help.
jds1207
|
|
|
|
|
HI,(all in vb 6.0)
i have an dll with a form and some public functions. i add reference of this dll in new project and try to change the command button's picture from calling project.the function gets executed smoothly but i didn't get the result(change in
command button's image).
Any help or hint is greatly appericiated.
Thanks in advance.
aamn.
amolk
|
|
|
|
|
have you tried using refresh method of the object or a doevents?
|
|
|
|
|
HI,
i tried using button.refresh but no output.
i also try to sendmessage api to change text using setwindotext and now i can change the caption of the button.
But i need to change the picture of button where i'm in trouble.
Please let me know any suggestion /links.
thanks
amolk.
amolk
|
|
|
|
|
hi there,
my project was working good but till when i change its icons ,its giving error when i press F5
Error 1 Unable to write to output file 'C:\Documents and Settings\Windows XP 2005\My Documents\Visual Studio 2005\Projects\*******\obj\Debug\*******.exe': The specified image file did not contain a resource section.
i got where is the problem....the problem occured when i change the icon of the application in "my project properties".
i tried alot to solve it but all in vain
someone know the solution?
-- modified at 11:24 Thursday 3rd May, 2007
|
|
|
|
|
Can someone tell me how to call a DB2 COBOL Stored Procedure in Visual Studio.Net? Thanks
|
|
|
|
|
Hello There
I have a two toolbars on my MDI form. both have 28 * 28 image size. now the icon which I attach with the toolbar button loose its image quality on load . Can any one help me that how can I fix this.
|
|
|
|
|
Hello!
I am using VB6.0 and Crystal Report XI.
I have designed different reports using Report Creation wizard by making connection to my Local SQL Server. It is fixed connection string now!
Please anybody help me how can i generate reports if my database in not on (Local) SQL Server?
Actually i want that all report designing remains same but connection property get changed at runtime......
...THANKS...
colgateas900197
|
|
|
|
|
This article at Business Objects[^] shows how to set the connection at runtime for vb.net.
|
|
|
|
|
while creating the dsn there is an error occuring.
Attempted to read or write memory . This is often an indication that other memory is corrupt.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CreateAccessDSN("Nilish", "d:\Database\dbase.mdb")
End Sub
Public Function CreateDSN(ByVal Driver As String, ByVal Attributes As _
String) As Boolean
CreateDSN = SQLConfigDataSource(0&, ODBC_ADD_SYS_DSN, _
Driver, Attributes)
End Function
Public Function CreateAccessDSN(ByVal DSNName As String, _
ByVal DatabaseFullPath As String) As Boolean
Dim sAttributes As String
If Dir(DatabaseFullPath) = "" Then Exit Function
sAttributes = "DSN=" & DSNName & " "
sAttributes += "DBQ=" & DatabaseFullPath & " "
CreateAccessDSN = CreateDSN("Microsoft Access Driver (*.mdb)", _
sAttributes)
End Function
|
|
|
|