Changing EXE Name Based On Compilation Constant

Sep 21, 2011

I have a project in VB.NET 2010 (compiling to x86, .NET 2.0 runtime) that I want to compile into two separate EXEs - a "lite" version and a "full" version. Unfortunately I cannot make two separate projects as it uses the Adobe Reader COM control - and sharing a form using that control between two projects seems to confuse the IDE (something to do with COM Interop, I assume - if someone knows how to share a form hosting the adobe reader control, that would solve my problem too).

I have found this thread: C#: VS.NET: Change name of exe depending on conditional compilation symbol however I don't have any MSBuild experience so I need more explicit instructions. On the "My Project>Compile" tab there is a "Build Events..." button. I was wondering if anyone knows how to set a conditional compilation constant and use that to determine the EXE name (or change it after build). If all else fails I can rename the EXE manually I suppose, but I'd prefer it to be automated.

View 1 Replies


ADVERTISEMENT

Project-level Conditional Compilation Constant?

Aug 19, 2009

I am getting a project-level conditional compilation constant error while trying to build my vb.net project. It reads:

project-level conditional compilation constant 'VB_VER=9.0,TARGET="exe",CONFIG="Debug",_MyType="Console",PLATFORM="AnyCPU",DEBUG;^^ ^^ TRACE' not valid: Character is not valid.

I recently upgraded it to the latest version (from 2.0), and I have a feeling that this has something to do with it.

[Code]...

View 1 Replies

VS 2008 Constant For A Changing Date

Oct 26, 2009

I would like to know how to apply code for a date that will expire 5 days after whatever the current date would be and it needs to be a "constant".For example: When the user loads a form, the current date is assigned, and the expiration date always needs to be 5 days after the current date.

View 4 Replies

Constant Time Changer - Changing Clock Speed

Feb 23, 2011

im trying to make a cheat for minecraft(speed walk) but im having problems. every minuet i want the clock to go ahead by 2 minuets to speed walk. can someone correct my code? TimeOfDay.AddMinutes("2:00")

View 2 Replies

Public Constant Versus Private Constant?

Aug 13, 2011

When building a class library which contains many classes, all classes uses a lot of common constants and functions, what is the best to do:

1- Declare these constants and functions as public in a module.

2- In each class declare constants and functions used by individual class as private.

The first choice is good for easy and fast implementation, but re-using a class in a different project will require importing the module to the other project.The second choice require a lot of copy/paste for code snippet but a class can be re-used in different project easily.

View 3 Replies

Changing SQL Queries Based On Various Conditions?

Apr 16, 2012

deal with ever changing SQL queries based on various conditions? i am using Cmd.BindByName = True so it doesn't need to be in an ordered way when adding parameters. Just that this is the hectic way of doing the update SQL ..or even worse insert SQL/I favor doing parameters instead of using stored procedure bcoz i find it faster by using parameters .

SQLStr.Append("Update Table set col1 = :time ")
Cmd.Parameters.Add("time" , OracleDbType.Varchar2)
Cmd.Parameters("time").value = "xxx"

[code]....

View 3 Replies

Changing A Label Value Based On Selection In A Listbox?

Dec 11, 2009

Just wondering if someone can at least point out where I'm going wrong here. I've already got the code to populate the listbox by a button click from the user and am just trying to figure out how exactly to alter the text of a label based on what the user selects in the listbox. From what I have the Label will display the case else selection but nothing else despite my best efforts to get it to change. Here is what I've tried. I realize it is very trivial, but I am only a beginner to programming.

[Code]...

View 3 Replies

Changing Band Color In DGV Based On Column Value?

Aug 29, 2011

Attempting to set a color on a data row in my DGV if the value is True. As of now it changes all rows.

[Code]...

View 2 Replies

.net 1.1 - Start-up Window Changes Based On App.config Setting - Changing ?

Feb 24, 2009

I have this VB.Net 1.1 project that I have to make some changes to. There is a flag in the App.config file. If it is false, the page just loads a splash screen and runs the program normally. If it is true it first opens a login window. VB.Net is not something I've ever worked with before. I can't for the life of me figure out where the logic for the picking the startup object is. In the property pages, Main.vb is always set as the startup object, but that's not even the window that loads up when the flag is false, it always comes after the splash screen.

View 2 Replies

Changing TextBox Text Based On Selected Value In Listbox?

Oct 12, 2011

When a SelectedIndex in a ListBox is changed I would like a textbox below the listbox that gives a description to be populated with the value from a description field in SQL.I have the following code so far, but I get an error that says "Must declare the scalar variable "@ReportName"

[code]...

View 1 Replies

Dynamic - Changing The Value In A Different Text Boxes With 1 Function Based On Name?

Jan 1, 2012

I have done this in Php with a function before. I just don't know how to do it in VB.I have a character sheet creator for a game I am making. What I am wanting to do is write a single function, where in you click on a button and it will pass the text box name (so that it knows which text box to edit), as well as the value inside of the text box (to make sure that the new character stat ceiling is taken into account).

Private Sub Button_Click
AddtoValue(Textbox1,stats)
End Sub[code].....

Essentially, I need to know what to put for noidea, and noidea2, like, byval or byref or what?

View 3 Replies

Changing ToolStripMenuItem Enabled Property Based On Successful Login?

Nov 8, 2011

What I've done so fa

Private Sub LogInToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles LogInToolStripMenuItem.Click
Try

[code].....

View 1 Replies

VS 2008 - Changing Mouse Position Coords Based On Form?

Oct 18, 2011

Basically I want to move my mouse to the coords that is received based on the location of a certain coloured pixel. I can get the coords of the pixel but when using them on mouse position, the mouse position is based on the entire screen rather than the form. How could I change the position coords based on the form rather than the entire screen. E.G. If a certain coloured pixel is 2,2 in a form and I put that as the mouse position, it would go outside the form but I dont want that. I want it to hover of the pixel coords

This is my
Dim bmp As Bitmap = DirectCast(PictureBox1.Image, Bitmap)
For x As Integer = 0 To bmp.Width - 1
For y As Integer = 0 To bmp.Height - 1
If bmp.GetPixel(x, y) = (Color.FromArgb(108, 90, 60)) Then
Windows.Forms.Cursor.Position =
End If
Next
Next

View 2 Replies

Take A Static Stream Reader And Switch It To Another Text File Based On The User Changing The File?

Mar 10, 2010

Is there anyway to take a static stream reader, and switch it to another text file based on the user changing the file?

View 1 Replies

Compilation And Execution

Nov 12, 2011

read the COMPLETE email before giving me instructions.I say that because it seams like who ever is responding is only reading part of the email and responding.I have followed your instrutions and I still can not get myhello.vb to compile.

Both vbc.exe and mylello.vb is in the same folder c:program files

"C:Program Filesvbc.exe myhello.vb"

You stated that I should run command prompt as administrator and tye the same command as you do. what (as administrator) is. Please walk me through the complete process. Please do not tell me to run the command prompt as administrator because I do not know what that mean.I can not speak to my administrator. Also I attempting to compile a sample VB that came with the software, so using Visual Studio is not the solution.

View 5 Replies

Vb6 - File For Compilation Of CLS To DLL?

Dec 20, 2010

I have a vb 6.0 file that compiles a CLS file in the same folder to a dll without the creation of any windows forms. Does anyone know of an example for this in VB.NET?

View 1 Replies

Asp.net - Converting New With From C# To .NET - Compilation Error

Dec 19, 2011

I have the following code in C#:

public static ArrayList GetGenders()
{
return new ArrayList()
{
new { Value = 1, Display = "ap" },
new { Value = 2, Display = "up" }

[Code]...

View 3 Replies

IDE :: Having Slow Compilation Time?

Jan 22, 2012

I'm using Visual Studio 2010 Pro on a Windows 7 PC, to build simple VB Windows Form Applications (I've just started learning VB). Lately when I try to debug my applications, it takes unusually long. For example, an application with just a blank form and nothing else will take about a minute to build, and then it will sit for another minute or two until the app window pops up. It didn't use to do this!

View 1 Replies

Speed Up Web Application Compilation?

Jan 19, 2011

I have tried looking at "related" questions for answers to this but they don't seem to actually be related...Basically I have a VB.Net application with a catalogue,administration section (which can alter the catalogue, monitor page views etc etc) and other basic pages on the customer front end.When I compile and run the app on my local machine it seems to compile fairly quickly and run very fast. However when deployed on the server it seems to take forever and a day on the very first page load (no matter what page it is, how many stylesheets / JS files there are, how many images there are, how big the page markup is and so on). After this ALL the pages load really fast. My guess is this is due to having to load the code from scratch; after that, until it is recycled, the application runs perfectly fast. Does anyone have any idea how I could speed this part of the application up? I am afraid that some customers

View 1 Replies

Access Compilation Element In Web.config?

May 18, 2010

I want to be able to determine if the web.config element

<compilation defaultLanguage="vb" debug="false" />
if the property is debug is set to true or false.
Public Shared Function isDebug() as Boolean

[code].....

View 1 Replies

Code Converted To C# Compilation Error?

Oct 12, 2010

I had a code for getting the hdd id written in vb.netNow I need to re-write the code into c#. I have converted the vb.net code to c# but it is not compiling.Below is the vb.net code

Dim hdCollection As ArrayList = New ArrayList()
Dim searcher As ManagementObjectSearcher = New ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")

[code].....

View 4 Replies

Conditional Compilation On A Single Line?

Nov 27, 2009

How can you write a #If statement on a single line?

vb.net
#Const Debug = True #If Debug Then Console.WriteLine("Debug")'I also tried:#If Debug Then : Console.WriteLine("Debug") : #End If'

But that didn't work either?

View 2 Replies

Deployment - Ignoring Bad References At Compilation

Feb 8, 2012

I've got a problem with a program that references a third party ActiveX component that I've been refused permission to distribute. The AX component is used on some user defined controls which the user can add programatically, which makes isolating them fairly easy. However, the problem is that if the program is installed on a machine without the third party component then it just crashes, where I would much prefer it to just alert the user to the missing component and then disable the functionality that requires the component.

In the past I've tried adding the reference programatically but have found that this solution doesn't work with this particular control.

View 1 Replies

Managing Resources Via Compilation Flags?

Feb 3, 2010

Now days it is done in Resources.Designer.vb we have there following lines:

Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then

[code]...

View 3 Replies

Remove The Debug .PDB File From My MSI Compilation?

Dec 25, 2009

In Debug mode my application compiles to a 4MB .msi file plus setup.exe at 368kb, and the installed app includes the .pdb file @ 2.3MB. If I change to Release mode I'd expect to avoid including the debug symbol file and considerably reduce the .msi size, but surprisingly the .msi goes up to 4.45MB and setup.exe to 420kb. Am I missing something here? I want to reduce the upload size of the application by avoiding the unnecessary debug file, but clearly I've misunderstood what's happening or maybe what I can do.

View 1 Replies

VBNET2008 Application Compilation Procedures?

Sep 12, 2011

I am using VBEt2008 to develop application. After completed development. I do not know how to compile the applications.brief me of the procedure and steps to compile the application.I tried to look for options at the Menu ToolBar and also the TookKits options and in vain.

View 5 Replies

C# - Generic Method Overloading Compilation Error In VB?

Aug 5, 2009

I have a problem with the VB.NET compiler failing to compile a class (in a separate C# assembly) which contains two overloads of a method with generic arguments. The equivalent code in C# compiles against the same assembly with no errors. Here are the two method signatures:

protected void SetValue<T>(T newValue, ref T oldValue)
protected void SetValue<T>(T? newValue, ref T? oldValue) where T : struct

Here is the code to three assemblies that demonstrate the problem. The first is the C# assembly with a Base class that implements the generic methods. The second is a C# class derived from Base and calls both overloads of SetValue correctly. The third is a VB class also derived from Base, but fails to compile with the following error message:

[Code]...

Am I doing something wrong in the VB code, or are C# & VB different when it comes to generic overload resolution? If I make the method arguments in Base non-generic then everything compiles correctly, but then I have to implement SetValue for every type that I wish to support.

View 2 Replies

Error Displaying Crystal Report After Compilation

Dec 27, 2011

I'm running 64bits Windows 7 and using MS Visual Studio 2010. I'm doing a VB program connecting to mySQL database using 32bits ODBC connection. the program have no issues loading crystal report in Visual Studio IDE environment. However, after Build and install in the same machine the following error msg appeared when trying to load the crystal report with data call from database (ABLE
to display report when NO data call):

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

[Code].....

View 8 Replies

VS 2005 Compilation Error Deletes Properties?

Apr 2, 2009

We were working with a VB.Net app that contains something like 2200 VB modules/forms/classes and got a not-uncommon error message when we went to compile it. (Didn't write down the exact message, but it's basically unable to copy an image file that's in use.)Problem, of course, is that not everybody got out of the app when we told them to. Like I said, not uncommon. (It's a shared app that runs from a server.)Now, the weird thing. After kicking the offenders out, when we recompiled the program the image, which we use on search buttons, was gone. The file was still there but all of the property settings that referenced it were gone. Looked into the Designer code & they were gone from there, too. Seems to me that a compiler should *mark* the code that won't compile, not delete it.Anyway, I only see two courses. Either we restore our app from a backup, losing all our changes, or we go thru all the forms (like I said, there are 2200 modules-not sure how many are forms, but it's a bunch) and manually replace the properties on all the search buttons. Either way it's going to cost us at least a day's work.

View 2 Replies

Obj Directory - Keep Source Code Separate To The Output From Compilation?

Sep 9, 2009

What is the best way to keep my source code separate to the output from compilation? I can change the "Build output path", but I am still getting files created in the "obj" directory whenever I compile. I want to have a directory tree that only contains source code.David Streeter

View 7 Replies







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