Recently I've been using TryFSharp.org in an attempt to learn F# in my spare time.
There's loads of really good examples on http://fssnip.net/ which I've been looking at for inspiration.
Lots of the UI examples have code such as:
open System
open System.Drawing
open System.Windows.Forms
...
form.Show()
// Run the application (in compiled application)
Application.Run(form)
Unfortunately when I load these into TryFSharp.org I get compilation errors on the open System.Drawing.
Is there something I'm missing that would enable these examples to work?
An example FSharp script is here:
http://fssnip.net/p
If you click on the tryfsharp.org button it'll load in the browser but it will show compilation errors.
--- EDIT ---
As pointed out below it's not expected for System.Drawing to be available within the browser. However I also have issues with the namespaces System.Windows etc.
For instance
open System.Windows
fails with "The namespace 'Windows' is not defined"
Tried in both IE10 and Google Chrome.
--- END EDIT ---
System.Drawing allows you to access GDI graphics functionality and System.Windows.Forms enables you to access windows forms functionality. Neither of these is available in a browser.
If you want to do this you will need to compile it from a standard .net compiler rather than a limited functionality compiler running inside silverlight.
System.Windows.Controls for Silverlight
When I entered this into the TryFSharp editor, it didn't recognize the Windows namespace for some reason, but when I ran the script, it executed just fine.
System.Windows.Drawing
The System.Drawing namespace provides access to GDI+ basic graphics
functionality.
GDI
GDI can be used in all Windows-based applications.
This means not Silverlight.
System.Windows.Forms
The System.Windows.Forms namespace contains classes for creating
Windows-based applications that take full advantage of the rich user
interface features available in the Microsoft Windows operating
system.
Not all functionality available from previous iterations of TryFSharp are currently available. Look here for the current way of accessing the Cavnas.
Related
Hello is there any commercial or free web browser component to work with C++ Builder 6 except IE that is included ?
A related thread you could read is How to embed a browser object, other than IE<n>, in a Delphi application
but consider that:
the last release of the Mozilla ActiveX project by Adam Lock was around Firefox 1.5, so the project is now seriously out of date;
the Chromium Embedded Framework is very interesting but I don't think it can be adapted to C++Builder 6 (
fail to install chromium embedded on C++ Builder from Delphi files).
There are issues even with "modern" C++Builder (http://code.google.com/p/delphichromiumembedded/issues/detail?id=7) but it can be done.
A good starting point, if you would like to take the hard way, is Embedding Mozilla but it's a GNU project using GNU tools.
You could build the DLL via MinGW/MSYS and then getting access to the functions exposed by the relevant DLLs...
You could also try a different approach: transforming a target executable top-level window in a child window of own application via the SetParent function (take a look at Embed an application (exe file) into another exe file (mozEmbed like)).
I am trying to decompile a file called App.exe. When I am trying to decompile this file using reflector it's getting an error that App.exe is not a .Net module.
Seeing this image you can get a idea that what I am trying to say:
Then I tried to check what language this file's written in using CFF Explorer. For App.exe it's showing this:
And for VSM.exe it's showing:
The two files are created by one company only but I cant understand why it is not decompiling.
Can't a .exe file which is not created in .NET be decompiled?
Here's article about decompiling Delphi applications: http://delphi.about.com/od/devutilities/a/decompiling.htm
It's a lot harder process than with .NET programs. What you're trying to achieve?
Best results are obtained with IDR (Interactive Delphi Reconstructor) and IDA (the Interactive Disassembler) and PE Explorer (for forms/dfm)
The application is not a .NET application, meaning it was compiled using a different compiler. So there will be no IL (Intermediate Language) elements for reflector to reflect on. This is exactly what you should expect.
You might start with Depends.exe
use protection_id.exe to determine the http://pid.gamecopyworld.com/
Compiler, and
Protector/Packer
Depending upon the compiler, there are various option, like
Ollydbg, DeDe, Interactive Delphi Reconstructor, IDA, etc
I would prefer DeDe for Delphi.
This is a continuation of my last question. In that question I showed a problem involving TWebBrowser generating threads that persisted after the Browsers destruction. While noone could provide a solution to the problem, it was suggested that the problem could be a non-fixable one (a flaw with the TWebBrowser component itself).
Because of this I have attempted to download and use the Delphi Chromium Embedded Framework. I downloaded the components and added them to Delphi, added one to a new form and attempted to run the program, at which point it throws up a CPU break point at
5264DF81 6A01 push $01
Module Load: icudt46.dll. No Debug Info. Base Address: $562C0000. Process DCEFTestRun.exe (3080)
There is no error message, but when the program is continued manually it closes. I have had no experience with DCEF before, nor any experience using 3rd party components and the DCEF site is sorely lacking in documentation.
I suppose the easiest thing i'm asking for is a simple walkthrough (very basic) of what to download/install and where to get the Chromium Components to work.
Thankyou in advance.
You are missing the Chromium Embedded Framework (CEF) core libraries. It is enough to copy the content of the ..\dcef\bin\Win32 folder (from your downloaded package) into your project's output directory (or into some of the known folders location reachable from your project's executable).
I have a 3rd party .dll that I have successfully added as a reference in both a VS 2010 C# project and an F# VS 2010 project. I can view the contents in the object browser in both cases, but the F# version won't let me "open" the library. It works fine in the C# project (with the "using" directive), and I can write a program that uses the contents of this particular .dll. I have not had any trouble with other .dlls in F#/VS 2010/.NET 4.0 on Windows 7.
Any ideas as to why this might be happening? Or how I could debug this further?
See what the csc.exe and fsc.exe command-lines have for the library in question (in VS, open the 'Output Window' after a rebuild), to see if they both have the same reference (e.g. -r:Path\Library.dll).
And to be clear, you're saying
open NagLibrary
in F# yields the error message in the title, but
using NagLibrary;
in C# works and opens the namespace?
make sure you reference the path within the script using the double "\" convention
for me this worked
#r "C:\homeware\\blp\\api\\APIv3\\DotnetAPI\\v3.4.5.4\\lib\\Bloomberglp.Blpapi.dll"
open Bloomberglp.Blpapi
Every Delphi 7 developer knows that if he compile a application on Delphi 7, the style will be as Windows 2000 applications, but there is any method to make this better as the application can have the default theme of the Windows version, as C++ and C# applications?
Try adding the TXPManifest component to the main form of your application. located in the Win32 Tab.
The TXPManifest component has no methods or properties. All it does is include the XPMan unit in your project. This in turn causes a certain resource file to be included in your project's executable file. The resource includes a manifest - a small piece of XML that contains information about the application you are writing as well as information concerning the version of the comctl32.dll to use.
Alternatively add your own manifest resource manually - which allows you to tap into the even newer Windows 7 features, if you can be bothered to fathom out the syntax. See this link for more info but ignore the bit about enabling runtime themes as this doesn't exist in D7 (I don't think).