[2008] Open A .exe File And See The Code For It?

Jan 22, 2009

I'm making a tiny program that calculates a total for a user for some type of styling service. A user clicks the radio button for either hairstyle, perm makeup, makeover, or manicure. then clicks a discount radio button, either none, 10% or 20%. then it calculates the total (price of service - discount %). then it displays the total in the current service text box & keeps a running total and displays that in a second total box.

My problem is i try to run the program i made and it basically crashes. In the code, when in VB, there's an error message when you go over PriceDecimal, DiscountDecimal, and GrandTotalDecimal saying the variable is used before it is assigned a value.also is there any way to open a .exe file and see the code for it?

Public Class ImageForm
' Declare module-level constants
Const MAKEOVER_PRICE_Decimal As Decimal = 125D
Const HAIRSTYLING_PRICE_Decimal As Decimal = 60D

[code]....

View 2 Replies


ADVERTISEMENT

VS 2008 File Saved By VB Code Will Not Open?

Apr 6, 2012

I have created an Excel AddIn that has a custom ribbon with some custom buttons...I'm using Excel 2010. One of the buttons is to save the the workbook by utilizing the users input as the file name. This workbook is to be saved as a template in a specified folder. The code also checks to see if the file already exists, and prompts the user to overwrite if it does already exist.The code I have seems to be working just fine. The problem is...when I try to open the newly saved workbook, it won't open.Here is the entire code for the button click event:

Dim Warning As DialogResult
m userFileName As String
Warning = MsgBox("Warning Message", vbOKCancel + vbCritical, "Warning Title")

[code]....

View 5 Replies

VS 2008 - Code To Open A Text File And Append Data To It, In VB Express Edition?

Mar 1, 2010

What is the code to open a text file and append data to it, in visual basic express edition?Normally one would write:open "data.txt" for append as #1 but visual basic express does not accept it.

View 14 Replies

File I/O And Registry :: Open / Read Binary File / Care To Check Code?

Jun 14, 2009

I've gone through about 16 hours and two packs of cigarettes trying to figure this out. First a little background. I was using 6.0 up until 2004 when I went to prison. I'm out now, and trying to relearn the trade, using VS 2005. I'm currently porting some 6.0 code from another project, SpyCast Webcam Studio, into VB 8.0. It's disheartening, to say the least. None of the old built-in subs/functions work anymore, so I have to scour the forums to relearn each and every function.The section I'm doing now takes a snapshot from the webcam (Video API --> PictureBox --> Save as Jpeg), then upens the file to upload it to the server via HTTP POST. I've been using this code in SpyCast for years with no trouble, but I spent many hours trying to piece together the right code to open the binary file to read its contents. I pieced together two methods I found around the forums, one using FileStream() though the code I found wasn't for binary files, even though it said it was, so that code doesn't really work. Method two uses Microsoft.VisualBasic.FileOpen() and works better.

Here's the kicker. By the time I run through the rest of the rigamarole of uploading the file, by the time I read it on the webserver, it's *slightly* corrupted. It's a valid Jpeg, no errors, but the picture looks like when I use to watch the Playboy Channel when I was a kid scrambled with weird colors and whatnot. [code] Each "chunk" is basically one "line" of the file. It looks like a single LineInput() return is the text between two carriage returns. Am I correct? I tested this with a flat text file, and it looks true. However, That one input line returns the text or data with the carriage returns *stripped*! ***?!? =( Fine, I have no problem adding my own vbCrLf to each LineInput(), if I were opening text. but this's binary. A character could be Chr(10) or Chr(13), both of which are removed from the original file contents.So I could very well need to use something other than LineInput(), but I haven't found any other examples on the web using this method.

View 1 Replies

Using Code To Open Another .exe File?

Mar 9, 2009

I would like to find out how would it be possible to make a executable be lunched at the click of a button from a vb.net form.what I have so far is a form with a few button on.for example:

button 1 is called 'RegEdit'
button 2 is called 'system information'

[code].....

this complied will lunch regedit as instructed but what I would like to do is to put the console app .exe file into a root file of the application.I would like to be able to have, once this project is completed, a main folder with the name of the app and then a sub dir called 'resources'. the 'resources' folder would have the various command line .exe with instructions to open various system programs.

View 2 Replies

IDE :: Open A PDF File On Server In A New Window Using .NET Code?

Dec 5, 2009

I have a button that opens a selected file depending on the file extension (doc, docx, or pdf)... the problem is when I have a pdf file is that the file is displayed in the browser, and when I hit the back button I come back to the original page - but the buttons won't then work...

View 1 Replies

VS 2008 Open Rar With Code?

Jan 7, 2012

what i am trying is to open a rar archive which is password protected with vb.net.i want to open a exe which is packed.i know the password winrar is installed in pc

hitesh is password name of the packed exe is utility

System.Diagnostics.Process.Start("D:utility.exe.ext-phitesh")

View 5 Replies

VS 2010 Code To Open A File - Keep Getting The Filenotfound Exception

Feb 1, 2011

This is the code I use to open a file:

Quote:

Public filecode As String
Public Sub getfile(ByVal filename As String)
Dim objReader As StreamReader

But I keep getting the filenotfound exception.

I replaced the file source with the actual location of the file and got the same error. I also checked the permissions of the application to allow sharing and remove read only properties.

View 4 Replies

Create Dynamic Html File From Code Behind And Open In A New Window

May 23, 2012

I'm letting my users write their own HTML from my webpage. When they click the preview button, my code behind needs access to controls on the page (and so I understand I can't use a web method here). It builds the HTML and saves it as a file on the server. My question is: Once the file has been made, I want to automatically open the file in a new window for the user to see their handy work. I'm using vb.net, but happy to receive c# answers.

[Code]...

View 2 Replies

VS 2008 : Open Form In Design View Rather Than Code?

Mar 27, 2009

I have just started using VB 2008 Express i couldn't find a forum for this version. Im having trouble working out how to open my form in design view rather than code.

View 4 Replies

VS 2008 Open Source Editor Control Like Code?

Nov 17, 2009

I have seen a few open source c# "Text code editor controls" that have auto indent and support contractions (+ - things you see in the code window to contract an if statement for example).

View 3 Replies

Vb8 Code To Open A Txt File - Search For A String In It & Extract String In A Excel File

Oct 11, 2010

i need a vb8 code to open a txt file,search for a string in it & extract string in a excel file.

View 2 Replies

Why The Excel File Not Opening Using This Code - Error - ExcelConnection.Open()External Table Is Not In The Expected Format

Apr 17, 2012

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source='" + fileName + "'; Extended Properties=Excel 5.0"
Dim ExcelConnection As System.Data.OleDb.OleDbConnection
ExcelConnection = New System.Data.OleDb.OleDbConnection(ConnectionString)



Error occurs on line ExcelConnection.Open()External table is not in the expected format.

View 2 Replies

VS 2008 - Open A Save File Dialog And Write To A .txt File The Contents Of Listview

Mar 22, 2009

What i am trying to do is open a save file dialog and write to a .txt firl the contents of my listview. so far:

[Code]...

i have this, but i'm not to sure how to write to the .txt file i know i need to use a for each to loop the contents of the list view

View 2 Replies

VS 2008 File Name From Open File Dialog?

Aug 17, 2009

I am using this, to read 1+ files from the openFileDialog, but I am having a problem getting just the file name, I can get the location "C:My Documentsfilename.jpg" but how do I get just the name "filename.jpg"?

I want to replace it with this line: can.Text = Regex.Replace(file, ".+\$", "")

vb.net
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click

[Code]....

View 2 Replies

IDE :: Can't Open Code And Crash When Open Wpf Form

Oct 22, 2009

I'm try on Ultimate version and Express version. Reinstall many time from web install and offline install. What should I do ?

View 10 Replies

Open A File In 2008?

Dec 24, 2008

I understand how to associate my windows form application with a file extension (in my case, *.cmf). However, when the user double clicks on the file in, say Windows Explorer, the application opens but without the file being loaded. I also understand that this scripting (for the response to double clicking the file) can be defined by the My.Application.Startup Event, but I have not been able to find (in either this forum or MSDN) a clear example of what to do with the command line arguments after they passed to the application

View 3 Replies

Open An Ocr File In Vb 2008?

Jun 24, 2009

I am working on a project and within that project I need to call on an already existing ocr file within vb 2008. I have tried to call the ocr in several mode

[Code]...

View 4 Replies

VS 2008 - Open A .MSG File ?

Oct 1, 2009

I have an app that works client cases and at one point they need to open a .MSG file that's been dragged into the case.

Right now it opens in Outlook. Sloppy and slow.

I would actually like to open and parse the data out of that file myself. Maybe put it into a richtextbox?

View 9 Replies

VS 2008 How To Open A .txt File

Aug 1, 2009

I want to put the program in a folder before I send it out, And it has several .txt files in the folder such as "How to use this" and "how to use that" I have a menustrip, And I have an option "How to use." < Whatever section there on.How would I make it so when they click that it will open up a .txt file from that folder which would be like" My program By ME " would be the folder name..I was thinking streamwriter or streamreader? But I can't understand how to use it.

View 13 Replies

VS 2008 Open A .chm File In VB?

Apr 30, 2010

I'm trying to open a .chm file in my VB solution using the following

Dim binWriter = New IO.BinaryWriter(IO.File.Create("help.chm"))
binWriter.Write(My.Resources.MyHelp)
binWriter.Close()
Process.Start("help.chm")

Everything works fine but when I click twice on the command button to open the chm I get the following exception:The process cannot access the file 'C:help.chm' because it is being used by another process.

View 2 Replies

VS 2008 Open A File?

Mar 20, 2010

On my computer I've set that when you try to open a txt file it opens it with my application. When I open a txt-file, the computer opens my program, but then is RichTextBox1 empty. (Of course, because I haven't set my program yet to show the content of the textfile in RichtextBox1.)

How do I make my program know from which file it's launched? So that it can load the content of the file using a StreamReader?

View 7 Replies

VS 2008 File Open Modes?

Mar 8, 2010

Can someone point me in the right direction? I am trying to find out the 5 modes a file can be opened in.

I can only think of Input, Read and Shared. What are the other two?

View 8 Replies

VS 2008 Get The Program That Will Open A File?

Oct 7, 2009

I want to find the full path of the program that will open a given file type. e.g. '.txt' is opened by c:windowssystem32 otepad.exe

I've done a bit of searching but i keep just finding how to create an association, not read one. I've also tried looking in the registery, but it looks like all that's there is a link to the program ID or something.

View 4 Replies

VS 2008 How To Open Up A Text File

Jul 25, 2009

How would I be able to click on a label and make a text file open which would be save in the folder i sent out so something like

C:UserDesktopProgram FileRead me.txt

How would I also do the "user" part since I wont know everyone's computer user name that I send it to?

View 5 Replies

VS 2008 Open A File From Zip Archive

Aug 31, 2010

ok if there is any way to open a file from zip archive without extracting it ?

View 6 Replies

VS 2008 Open File As Bytes

Oct 2, 2009

I am not so good with buffers and arrays and I dont know how to continue from here:

[Code]...

My intention is to open an image file as bytes, Convert the bytes to a string, send bytes to server and server stores bytes in a database. Then I need to reverse the process and be able to convert the bytes to an image.

View 11 Replies

VS 2008 Open File As String?

Oct 11, 2009

I know this may sound a little wierd but I need to open file as bytes, convert bytes to string, encrypt the string, decrypt the string, convert the string to bytes and save.

I have been working on this for some time now and cant get it on working.This is my current mess for encypting the file:

[Code]...

View 8 Replies

VS 2008 XLS File Open With By Own Application?

Apr 20, 2010

I have an application which read data from Excel sheets when I drop them into one of apps forms.Is it possible to write an app. with which I will be able to use "Open file with", and the result will be the same as when I drop a file into a form?And is it also possible to add this option to the context menu strip of files with specified format?

View 12 Replies

Auto-start Code On Open Then Close After Code Is Done Running?

Feb 15, 2009

I have a program that runs some code when i click a button on a form when done running the application ends. I want to automaticaly run the code when the users clicks on the exe. I have put the code that i want to run in the startup forms load event but that doesn't start

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved