Answer Questions
tapir What Installer to Use to Distribute VB Application
I'm new to programming and have just completed an application I'd now like to distribute to folks for testing. Can someone please recommend an installer application (either free or payware) I can download to package the application for installing on someone elses computer Thanks for your time! Doug This is not a violation of some established standard. Check out http://msdn2.microsoft.com/en-us/library/142dbbz4.aspx for an explanation of why this path is chosen, and what the benefits and drawbacks of using ClickOnce vs. a windows installer package to install your application. Best regards, Johan Stenberg Just out of curiosity, why do you want the application to be located under the Program File ...Show All
Anwar Hussain Logging ?
I'm doing a net 2.0 windows application and I'm wondering if the net framework has classes for logging errors into text files. Also some tutorials on how to use them would be nice, thanks in advance. thanks a lot:, but I have some problems, the unhandled exception isnt' being logged, also I have other forms, and in the other forms the unhandled exceptions dont' get catched by logException, any tips AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf logException .... Private Sub logException(ByVal sender As Object, ByVal e As System.UnhandledExceptionEventArgs) logger.logNow("UNHANDLED - " & CType(e.ExceptionObject, Exception).Message) End Sub .... Catch ex As Excep ...Show All
goflorin Unrecognized Database Format?
Hi, I am using VB2005 Express, and I was trying to access a database using: con.ConnectionString = "Provider=Microsoft.Jet.OleDb.4.0;Data Source = C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\CAD\CAD\CADdb.mdf" con.Open() I made the database using VB's database thing (I guess ). However, when I try to run it, it says Unrecognized database format 'C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\CAD\CAD\CADdb.mdf'. Any ideas Thanks! Now I have: Dim command As New SqlCommand( "INSERT INTO MyTable(FirstName) VALUES('" & FirstName & "' )" , con) command.ExecuteNonQuery() Howe ...Show All
petedashwood The same value just onetime
Hi I use this code: For Each currentFolder As String In theFolders T ry Directory.Delete(currentFolder, True ) Catch ex As IOException theErrorCounter = theErrorCounter + 1 fejl.ListBox1.Items.Add(combotype.SelectedItem & taltekst) End Try Next The value in fejl.ListBox1.Items.Add(combotype.SelectedItem & taltekst) can bee the same several times but i only want to see the value one time, can i do that Alvin You're just adding strings to the ListBox so check to see if it already contains that string: Dim newVal as String = combotype.SelectedItem & taltekst If Not fejl.ListBox1.Items.Contains(newVal) Then fejl.ListBox1.Items.Add(newVal) Are we s ...Show All
Clinic332050 I'm bored, so does anyone have any ideas on...
I'm bored with Visual Basic, so I was wondering, what do you people program in VB I'm just bored. I don't know what to do, but I want to use all this programming power. Any ideas Thanks. It happens. Don't force your creativity though. Just take a break or GET A JOB as a developer. You'll never run out of things to code. As you just interact with the world you'll see things you want to automate or find limitations in existing applications you want to extend and overcome. Take some time off of coding and explore other areas of life - love, the arts, literature, or maybe even object-oriented design and solution architectures (related but less domain specific). The world is full of potential applic ...Show All
Lixin wang Help with Post Message
Declaration: <DllImport("user32.dll", _ CallingConvention:=CallingConvention.StdCall, _ CharSet:=CharSet.Auto, _ EntryPoint:="PostMessageA", _ SetLastError:=True)> _ Shared Function Post( _ ByVal hwnd As IntPtr, _ ByVal wMsg As Int32, _ ByVal wParam As Int32, _ ByVal lParam As Int32) As Int32 End Function Constants: Public Const WM_LBUTTONDOWN As Int32 = &H201 Public Const WM_LBUTTONUP As Int32 = &H202 Sub: Sub LeftClick(ByVal Handle As IntPtr, ByVal XCoord As Int32, ByVal YCoord As Int32) Post(Handle, WM_LBUTTONDOWN, 1, XCoord + YCoord) ' Left mouse button down Post(Handle, WM_LBUTTONUP, 0, XCoord + YCoord) ' Left mouse button up End Sub Problem: This met ...Show All
srinivas_kv80 Creating Dynamic Image Signatures for a forum?
I created this class to generate a dynamic signature to be use as a signature on forums ans is working great but my problem is that will a url like http://website/dysig.aspx id=123 Now for most forums the signatures cant be dynamic scripts like that they will have to be something like http://website/dysig123.png or some other image format like that. Does anyone have an idea how can I manipulate so my output url will be what I need ...Show All
redneon using variables across different subs
Hi all, I'm trying to include logging in my backup app at every level i can, but i'm running into a snag in how to set up the option of where the log file should be kept. Here's the structure of what i have that works: public class form1 dim logfilename as string = "some filename" dim object as io-stream(logfilename) private sub do something object.write end sub private sub do something else object.write end sub ...and so on. What i'd like to do is give the user the option to specify the log file, like this: public class form1 dim object as io-stream(logfilename) private sub (setting options) dim logfilename as user-defined-string end sub private sub do something object.write end sub pr ...Show All
Chris Breaux How Do I Print a Text File directly form a Button
After hours wated I found out that the my.computer.printer.default printer has been rendered obsolete by microsoft. How can I print a Text File ; let's say : c:\MyTextFile.txt. ' I know this code does not work; but that's the idea i want to implement Private Sub Button7_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click Mytextfile.txt.print End Sub Thanks, Fernando Pena www.Latinsoft.net Thanks for your reply. Do you have a way to implement it Thanks, FP Im not sure rendered obsolete is an good description. It was never actually in any production release version of the product. It did make an a ...Show All
pc0416 Register .NEt DLL
Hi, I have a vb6 outlook COm project which I have recently converted to .NET. In vb6 i would test the addin within outlook bu simply registering a newly built dll file. However in vb.net when attempting to register the dll i get the following message: "dll was loaded, but the dll register server entry point was not found - the file can not be registered." Thanks in advance. Use RegAsm.exe to register a .Net dll thanks but when typing this into the .net command prompt i got the following error: "The given path's format is not supported" There's a typo in the command. It should be /tlb, not /tbl regasm.exe ...Show All
Matt Lin using windows service... urgent help
hello, This is my first time in Window service... I've written my Window service... well my windows service is running already, i assume... coz my windows service can be seen already in server explorer... however... I want to use my window service in another application... I 've declared one protected event in the window service... is there any way i can raise that event in my external application well here is my code... of the window service... Public Class MyService Protected Overrides Sub OnStart( ByVal args() As String ) Timer1.Enabled = True End Sub Protected Overrides Sub OnStop() Timer1.Enabled = False End Sub Protected Event ReturnTime( ByVal TimerReturn ...Show All
Cavetroll Searching a Database
Hi, I have a table within a database which is organised by date. I wish to write a program which will allow the user to select a date using the month callender control which will then will automatically search the database for selected date and dispay in a text box the contents of the fields in the same row as the date. How could I go about doing this. Many thanks Thanks thats definatly got me started. Is there anyway that I could store the contents of each field in seperate variables rather than displaying them in bindable UI components well you can be would be ineffecient and not best practice - you dont need to show it to the user as the data would be held in the d ...Show All
Sarah_ DLL Creation
I want to create a DLL for editing HEX Data I want that if it is referenced for editing any bytes you need write this line: WriteB (File , Seek, Byte) File= Files to open with FileStream ( Imports Sytem.IO is necessary obviously) Seek= For moving the pointer in a offset Byte= Byte to write in the Offset Now if i want to edit a byte i need write this code Dim str As New FileStream(OpenFileDialog1.FileName, FileMode.Open, FileAccess.ReadWrite) str.Seek(&H18D, SeekOrigin.Begin) str.WriteByte(CByte("&H" & ComboBox3.Text)) And i want to create a Function in the DLL Imports System.IO Public Class Class1 ' Start Function Public Function Nome_funzione As CallType ......... ...Show All
Gandalf Hudlow Superconstructors?
What's the general syntax for using inheritance in VB Say I've got ClassSuper and ClassSub, ClassSub inherits ClassSuper. How do you access the super constructor How do you access values in the super class Public Class SuperClass Public Sub New () 'Does Something End Sub End Class Public Class SubClass Inherits SuperClass Public Sub New () 'Do More End Sub End Class What is your end result objective A contructor is not overridable and if you inherit from the super class you subclass when instatiated will "dosomething" from the base class and will "do More" from its own contructor....You may wish to create overrida ...Show All
MA2005 Need help with "Constant expression is required"
I'm trying to define an Enum containing integers that make up a colour scheme. My problem is to define the values of the integers. I dont know where to get the hexadecimal values for the colours and in any event would prefer to use the colour names and have the compiler insert the values. The following code is an extract of my code and the second line generates a compiler error stating "Constant expression is required" Enum Autumn As Integer PlotGridColour = Color.ForestGreen.ToArgb() PlotUpColour = &HFF00& PlotDownColour = &H60FF& End Enum To isolate the problem I tested the following statements; Private Const PlotGridColour As Integer = Color.ForestGreen.ToArgb() Dim P ...Show All
