Translate Legacy (OLE) Colors To (A)RGB With NET?

Apr 28, 2010

I have a list of color values encoded as signed integers (OLE I think) in a legacy INI file that I need to translate into (A)RGB values with .NET. [code]...

gives an alpha-blended version of a color that is not at all what I expect. I think that a value like -2147483633 is supposed to represent a system-defined, or named color like ButtonFace. Is there a .NET method for translating these legacy colors properly? Note that pInvoke to OlePro32.dll is not an option.

View 1 Replies


ADVERTISEMENT

Asp.net - Converting Some Legacy .NET Code To C#?

Nov 18, 2009

Public Const COLUMN_MODEL_ORDER As String = MDL_ORDER.ColumnName

DataModel.Config.DefaultView is a System.Data.DataView

how can I convert it?:

Dim ModelOrder As Integer = 1
Dim DataModel As New ProfileDataModel(New DBConnection, Me.ProfileID)
If DataModel.Config.DefaultView.Count > 0 Then

[code]....

View 5 Replies

.net - Legacy Code Visual Basic To C#?

Jul 6, 2011

I'm building an c# app that is designed to replicate and enhance the functionality of an VB6 app developed many years ago. My problem is that one module in the old app does some realy complicated things and trying to replicate this starting from specs would be a big pain for me. Even if this sounds like the best idea.

My question is : is there a way i could keep the old VB module and integrate it into the c# app, so that i wouldn't have to rewrite everything ?

View 6 Replies

C# - Adding Adorners To Legacy Textboxes?

Jul 31, 2009

Whats the best way to add an adornment layer to legacy controls, or in other words you know jetbrains refactoring tools, how do they draw the squiggly lines under incorrect text? Also on another note can one draw said adorments on controls not under the direct reference of the application, ie using a handle? If you have insights, or just theories,

View 1 Replies

Convert Legacy VB6 Function Calls To .NET

Jan 8, 2010

I am looking for a utility/tool to convert calls to legacy VB6 functions to the .NET equivalent. For example, it would convert this...

[Code]....

Does anybody know of one, or am I going to have to roll my own?

View 3 Replies

Creating A DLL That's Callable From A Legacy C Environment

Sep 21, 2010

I need to create a DLL that's callable from C, that executes database queries and returns results. The first tool I reached for was VB, and I found it easy to create a DLL, but when I view the DLL using dumpbin /exports, I don't see any functions.

So, my questions:

1) Is VB the right tool for the job? If not, (The ideal solution would be a 3rd-party DLL that will let me do database queries -- a friendly higher-level wrapper above ODBC. I've searched around and come up empty, but maybe I haven't looked in the right place).

2) If VB is the right tool for the job, how do I export a class method so that it's callable as a function in a legacy C environment?

More details:

1) The target environment is Mercury Loadrunner VUGen. It's able to import DLLs and make function calls, but the environment is (non-.NET) legacy C.

2) My development environment is MS Visual Studio 2008

View 2 Replies

Replacing Legacy BASIC Code With VBA?

Sep 7, 2009

I have an old application in BASIC. It still runs under Windows ME. It no longer works under XP, so I was looking at recoding the applciation. I started coding it in VBA, which I have used for Excel macros for years.

We are looking at getting a new computer for kids to use for schoolwork, etc. I also want the kids to learn programming and recoding my old BASIC application is a good place to start. A new computer we were considering has MS Works, but I suspect I will need MS Office (at least Excel) to get VBA. There are multiple versions of Office 2007 (Home & School, Small Business, Pro), so I looked into the Microsoft website to see if I could find out what version of Office I need to get to have VBA. What I found is that VBA seems to be going away in favor of VSTA and VSTO.

Is VBA truely going away? Or is it still going to be a part of Excel for wrting macros? If VBA is part of Excel, is it available in all versions of Office? If VBA is going away, what is recommended for recoding my old BASIC application?

The application involves display of a screen full of data with color coding and has several actions for updating those data.It does not involve any graphics or animation. In the old BASIC application all the system data and runtime data are in program variables.

The actions to be performed are selected by number from menus.In creating the application in VBA, I envisioned primary data display on a main form, which would also have buttons to invoke dialog panels to perform the various updating actions.I have the system data that are not changed when the application is run in one Excel worksheet and the runtime data on another worksheet.

View 2 Replies

When Was Isnumeric Considered Legacy Code

Jan 3, 2012

When was isnumeric considered legacy code? I guess all that i have learned from my college class last semister is legacy.

View 4 Replies

Asp.net - Legacy ActiveX Control Calls DLL Functions?

Sep 1, 2010

Hint: this one might sound complicated, because I am trying to give as much info as possible, but I suspect that I just want someone to tell me "yes, you are correct".On this legacy system, which dates from 2002, the user visits a web page and uses an RFID reader to read a tag number, which is then written to an input field on the web page.

The only s/w that comes with the reader is a custom DLL, nop .exe. The very sparse documentation insists that only MSIE be used and that all security relating to ActiveX be disabled.When I look into the source of the web page I see calls to functions in the DLL.Now, here's the fun part: I know zilch about ActiveX, I have to make a minor change to the DLL _but_ the VB6 source code has been lost, so I guess that I have to recreate the (seemingly very simple) DLL from scratch - this week.

Decompiling the DLL shows me the functions (locateReader, getTagVal, closeReader). However, by decompiling I can't really know the number or type of the parameters, nor the return values ... and if anyone knows the API they are refusing to share it, but basically it all seems to have been lost in the mists of time as companies went bust, were bought & sold, merged & demerged and the initial DLL might have been written by an external guy, but no one knows who.So, can I get the function params & type from the ASP page source?I see things like

Reader = new ActiveXObject("<dllName>.Reader");
Reader.locateReader();
tagVal = Reader.getTagVal();
Reader.closeReader();

I would say that none of the fn()s take parameters, that closeReader doesn't have to return anything; it looks like locateReader doesn't return anything either, so I guess that error handling will have to be in the DLL (loop forever with a popup demanding that a reader be attached; and getTagVal seems to return a string.

View 1 Replies

Asp.net - Reducing The ViewState Size On A Legacy System?

Jan 21, 2012

I've looked up ways to reduce the ViewState:

Viewstate Optimisations
Strategies for reducing ViewState size in asp.net

However, due to the situation I'm in, I need the quickest and most effective ways to reduce the ViewState size. The legacy system I'm working on is bloated and routinely has a ViewState that's 800Kb+ on multiple postbacks.

For example, I'm pretty sure populating drop down lists with 100+ items on multiple post backs is one of the culprits, correct?

Disabling the ViewStae entirely doesn't appear feasible. It breaks all of the controls, of which there are many, rendering the pages unusable. If this is the best approach, how should I go about handling all the broken controls?

View 4 Replies

Data From Legacy ODBC Source Into SQL Server?

Jul 8, 2009

I have an old VB6 program which copies data from a legacy system (Btrieve 6) into our SQL Server so it can be served up on the web and used to feed some of our other needs. The legacy system outputs a file and a feed program posts it into the legacy ODBC database. The program isn't anywhere near realtime and I am now finding the delay between data going into the legacy database and then into the SQL database is becoming unacceptable so I thought I'd look at VB.NET and see if I could find a better way of doing it using FileSystemWatcher so that when the legacy output file is renamed I can then start a copy of the record affected from the legacy to the new database.

[Code]...

View 1 Replies

Get A Legacy Program Application Up And Running And I Need DSOleFile.dll?

May 13, 2011

I am trying to get a legacy vb.net application up and running and I need DSOleFile.dll.

View 1 Replies

Implement Unit Testing On A Legacy Website?

Jun 24, 2009

I downloaded nUnit and TestDriven.net. I have a legacy Web Site application and I would like to implement some unit testing. I created a class in the app_code folder and added Imports NUnit.Framework etc... After writing a basic test, I get the "Can't execute tests in 'Web Site' application." error. I guess the Web Site project is not supported. Converting to a Web Application is not an option at this time. I have Visual Studio Test Edition, so I tried that route. I created a test project, wrote a couple tests in my test class etc... only to find out I cannot reference the classes in the app_code folder of the Web Site project.

View 2 Replies

Launch Legacy GUI Application Without GUI From VB (hide Graphical Interface)

Aug 20, 2010

I have a legacy application that has an interactive graphical user interface, but also periodically checks for files in a directory and reacts to the files. I want to launch the application from a VB program, but not see the GUI (i.e., just let the file interface do it's thing). I really don't want to see the application running on the desktop at all (e.g., no windows, nothing on taskbar), the only evidence would be if I checked task manager I'd see it running.

Obviously this app would be ideally a service, but that's not where we are and I can't change it so I'm trying to simply not see the GUI.

I've seen the ProcessStartInfo.CreateNoWindow and WindowStyle = hidden flags but they don't hide the GUI of the legacy app.

again launch the legacy app (actually an unmanaged C++/MFC app) from a VB managed admin app.

View 4 Replies

Using A Legacy DLL In New Visual Studio Express (C++ Prefrred) Project?

May 21, 2012

I've got an old legacy application for communicating via serial port to an embedded controller communications bus. that someone else developed.The application is written in VB6, and is structured as two projects - a DLL to handle the connection and communications logic, with an application GUI project.I was hoping to be able to write a new application GUI (in C++ ideally) to use the existing DLL as-is, but I'm having lots of problems working out how to import it.So I'm wondering, is it even going to be possible to use this old DLL into a C++ project as is? or is it possible to import into a C# project? or a VB.NET project? (would prefer not to use VB, but can if I have to)Where I am now: I have the existing compiled executable and DLL, and these run on my system.I also have the project files, and they're all readable in notepad++ but I don't have VB6, and importing the project into visual studio VB.NET 2008 express isn't at all straightforward. Especially not without a working example to dig through and play with first (DLL project may be importable, but has 50+ things indicated as needing changing in the upgrade report. It also seems to be ignoring three .cls files that look very important to my not particularly VB6-savvy eyes... The application project has a message in the upgrade report about something "missing a design time license" and the only project files that actually seem to come into the project explorer for imported project is the project file itself, and the assembly info file.)

Most examples of how to import a DLL into VS C++ assume you have a solution with the DLL project all compiling nicely alongside your project that will use it. Or at least a .DLL and .lib and .h file... I spoke with the original developer of the code (in another city, we don't work directly) and got a .lib to match my .dll, but still have no .h file.I'm usually fine to bash through something new, but without a baseline working example of the project even in VB6 that I can get my understanding from, it makes this very hard. Also a lack of similar questions anywher google can find them on the net makes me wonder if this is something i should be even attempting.I'm working on getting a non-express copy of visual studio if that will make any difference (express worked fine for everything up until now so I never needed anything more) but that will take a number of weeks, most likely.

View 1 Replies

Html - Removing "Design-time-lock" Attribute From Legacy Code

Apr 4, 2011

I'm converting a project from .net 1.1 to 3.5, and everywhere the following is used in the markup:

Design_Time_Lock: true

e.g.

<asp:linkbutton id="lbRun" style="Z-INDEX: 111; Design_Time_Lock: True" runat="server">Run</asp:linkbutton>

[Code]....

I've read up about the Design_Time_Lock attribute, and I can see when it will and won't be generated. However I don't really understand the point of it. And- more importantly- can all instances of it be safely removed throughout the code?

View 1 Replies

.net - Translate From C# To VB?

Mar 23, 2010

How do you convert the following c# code to vb.net?

[Code]...

View 3 Replies

Asp.net - How To Translate Into C#

May 5, 2012

I have found aa solution to a problem in one of my reports but its in VB.NET and I am not sure how to convert it to C#, I tried to do it online with one of the tools but it cant determine the events been used or something like that. If there is anyone savy at both languages maybe you can help me figure out its translation?

Here is the VB code:

Private Sub XrLabel1_BeforePrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs)
Handles XrLabel1.BeforePrint

CType(sender, XRLabel).Tag = GetCurrentColumnValue("ID")

[CODE]...

I tried to convert it on this site [URL]

THE ORIGINAL CODE IS FOUND HERE [URL]

View 2 Replies

Translate .net To Vb6?

Jul 8, 2009

How can i translate this code to vb6? i have already searched in google for translators, but with no success;.

Private Sub CallFunction()
If Me.bOn Then
Me.connectionString = String.Concat(New String() { "Server=", Me.strIP, ",1433;Network Library=DBMSSOCN;Database=rPTDB;UID=", Me.strUser, ";PWD=", Me.strPassword, ";" })

[code]....

View 24 Replies

Translate From C# To VB?

Oct 30, 2010

I have this little function for forcing a download of MP3 files. I have it integrated into my VB app but would like it to be converted from C# to VB so that I can use other functions in my APP_Code directory.

[code]...

View 4 Replies

Vb6 LEGACY Application And New Functionality (Form) Written In C# - Closing The .net Form From Vb6

Feb 8, 2012

Alright, I have a vb6 LEGACY application and new Functionality (Form) written in c#. I have a VB.NET COM Class as a wrapper. I can launch the .NET Form just fine. THe problem I am having is closing the .net form from vb6.

Example:

In VB6, I have something like this:

CODE:

But it does not work becuase frmViewer is Nothing for some reason. how I should close the .NET form that was launched from VB6?

View 8 Replies

How To Translate Eglish Into VB

Apr 11, 2012

Is there an English - Visual Basic dictionary thae translate my thoughts to code? I am taking courses at the local community college and having difficulty with this "foreign" language.

View 4 Replies

Translate C# To Program?

Jan 28, 2010

Translate c# to program?[cod]e...

View 1 Replies

Translate Code From Vb6.0 To .net?

Oct 12, 2010

I have found the following code which can get the harddisk no in VB6.0.I would like to translate it into vb.net code.I have tried the auto upgrade function in vb2005 and translated the following code to vb.net, but the outcome did not run probably.Can anyone give me some help to translate the following VB6.0 code into vb.net code?

[Code]...

View 2 Replies

Translate For Loop Vb To C#?

Oct 26, 2011

I am currently trying to use a vb function in c#, i have to translate the following from vb to c#:

For index = LBound(CollectionChannelPanel.EkItems) To UBound(CollectionChannelPanel.EkItems)

View 2 Replies

Translate The Following Code To VB

Mar 11, 2009

I need a hand with something i need to translate the following code to VB...

[Code]...

im having some difficutly with syntax etc.

View 5 Replies

Translate The Snippet To VB?

Feb 1, 2010

I am looking at this blog, and I am trying to translate the snippet to VB.

I'm having difficulties with this line:

NotifyCollectionChangedEventHandler handlers = this.CollectionChanged;

NOTE: CollectionChanged is an event of this ('this' is an override of ObservableCollection<T>).

View 3 Replies

Translate This C# Code In Vb?

Oct 10, 2010

public void Attach()
{
deviceHandle = capCreateCaptureWindow(string.Empty, WS_VISIBLE | WS_CHILD, 0, 0, (int)this.ActualWidth -150, (int)this.ActualHeight, new WindowInteropHelper(this).Handle, 0);
if (SendMessage(deviceHandle, WM_CAP_DRIVER_CONNECT, (IntPtr)0, (IntPtr)0).ToInt32() > 0)

[code]....

View 6 Replies

Translate To Pig Lating

Jul 17, 2011

So, I'm taking Intro to Programming and I'm working through the exercises in a chapter about String Manipulation and the For Next loop.We haven't gotten to arrays yet, so I'm trying to do this just with what's been covered.The exercise is to translate a word into pig latin.If it begins with a vowel, you add "-way" to the end of the string. If it doesn't, you add "-" and then the first character to the end until you reach a vowel and "ay" to the end of that. So "Chair" would become "air-Chay".[code]

View 4 Replies

Translate VB Codes To C++

Jun 18, 2010

I am trying to translate some VB codes to C++. And I am not quite sure what this line does.

IIf (n& 1=1, 0.0005, -0.0005)

I know what IIf(logic, true_value, false_value) does, and I guess the & operator is supposed to concat two strings. But I am not sure what the intention of using "n & 1 =1".

View 6 Replies







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