Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
AnswerRe: Do not start application from byte[] Pin
leppie18-May-06 5:24
leppie18-May-06 5:24 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk18-May-06 7:43
Dima Filipiuk18-May-06 7:43 
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka18-May-06 10:00
Rei Miyasaka18-May-06 10:00 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk18-May-06 11:01
Dima Filipiuk18-May-06 11:01 
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka18-May-06 11:31
Rei Miyasaka18-May-06 11:31 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk18-May-06 20:28
Dima Filipiuk18-May-06 20:28 
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka18-May-06 20:32
Rei Miyasaka18-May-06 20:32 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk18-May-06 22:49
Dima Filipiuk18-May-06 22:49 
My code :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
using System.Reflection;

namespace video
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
try
{
byte[] arraybyte = System.IO.File.ReadAllBytes("D:/work/C#/video/video/bin/Debug/zshchita.exe");
System.AppDomain dom = System.AppDomain.CreateDomain("newDomain");
Assembly assembly = dom.Load(arraybyte);
assembly.EntryPoint.Invoke(null, null);
}
catch (Exception e)
{
string st = e.InnerException.ToString();
}
}
}
}
st :
System.InvalidOperationException: SetCompatibleTextRenderingDefault must be called before the first IWin32Window object is created in the application.
at System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(Boolean defaultValue)
at video.Program.Main() in D:\work\C#\video\video\Program.cs:line 16

Program.cs :
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace video
{
static class Program
{
///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.EnableVisualStyles();
line 16 Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
???
Please help me!


-- modified at 4:51 Friday 19th May, 2006
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka18-May-06 23:12
Rei Miyasaka18-May-06 23:12 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk19-May-06 0:27
Dima Filipiuk19-May-06 0:27 
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka19-May-06 0:34
Rei Miyasaka19-May-06 0:34 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk19-May-06 1:03
Dima Filipiuk19-May-06 1:03 
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka19-May-06 1:13
Rei Miyasaka19-May-06 1:13 
Questiona question about mainMenuStrip ? Pin
cmpeng3418-May-06 4:37
cmpeng3418-May-06 4:37 
AnswerRe: a question about mainMenuStrip ? Pin
NaNg1524118-May-06 4:50
NaNg1524118-May-06 4:50 
AnswerRe: a question about mainMenuStrip ? Pin
Wjousts18-May-06 6:47
Wjousts18-May-06 6:47 
QuestionGetObject Pin
samoilb18-May-06 4:22
samoilb18-May-06 4:22 
AnswerRe: GetObject Pin
Colin Angus Mackay18-May-06 4:28
Colin Angus Mackay18-May-06 4:28 
GeneralRe: GetObject Pin
samoilb18-May-06 5:52
samoilb18-May-06 5:52 
AnswerRe: GetObject Pin
mav.northwind19-May-06 5:37
mav.northwind19-May-06 5:37 
QuestionHow to Register Windows Service usijng Registry Editor Pin
VenkataRamana.Gali18-May-06 4:21
VenkataRamana.Gali18-May-06 4:21 
AnswerRe: How to Register Windows Service usijng Registry Editor Pin
Ravi Bhavnani18-May-06 4:39
professionalRavi Bhavnani18-May-06 4:39 
QuestionHandwriting program help? Pin
eric_tran18-May-06 3:39
eric_tran18-May-06 3:39 
GeneralRe: Handwriting program help? Pin
Guffa18-May-06 4:05
Guffa18-May-06 4:05 
GeneralRe: Handwriting program help? Pin
eric_tran18-May-06 4:09
eric_tran18-May-06 4:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.