|
string.Format is probably the easiest way to get any kind of formatting you want.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Hello all, I got a question and I unfortunatelly can't find a solution for it on the web.
I'm fairly sure it's out there, but probably I'm using the wrong criteria...
The main goal of this mini-project is, is to create 1 file with a GUI.
The user selects one of the options and the right executable will be launched.
Now there is no option to leave those executables outside of the entrypoint file and thus HAVE TO be embedded into it.
The embedding is not the problem, but the executing of the file is.
Since I don't want to save the file to the disc upon launching it and only will have a stream for it, it must execute it somehow from here.
I may be doing a comlete wrong approach, I'm open to anything that does what I want it to do:
1. Embed the file(s) to the main entrypoint file (this 1 big happy .exe file)
2. Execute a file without writing it to the HDD first and then execute it (the user may not be able to get the embedded .exe that easy).
I thank you for your time and hopefully you know a solution
Yours sincerely,
OsoreWatashi
|
|
|
|
|
OsoreWatashi wrote: Since I don't want to save the file to the disc upon launching it and only will have a stream for it, it must execute it somehow from here.
You can't. It has to be saved to disk. The Windows Loader will not start a new .EXE from a stream it does not know how to manipulate.
|
|
|
|
|
What a shame. They should add that. Windows could really use another attack vector.
|
|
|
|
|
Hi,
I´m looking for control like Corel Draw tool text editor or similar.
Do you know something like this ?
I´m using a Rich Text Box, but the font render is very diferent to font render of pdf library (iText),
( the RTB render text using GDI and iText render text using GDI+ )
I need write text, with any format ( font size, styles...), and then generate PDF document.
( what you see in screen must be identical in PDF )
somebody help me please
thanks!
|
|
|
|
|
Please let me know when you find one, i am also looking for one!
thanks
|
|
|
|
|
|
Sure. You just have to create a serializable class that hold all of your data that you want to pass. You can use the XMLSerializer to serialize the object to an XML format, which is just text anyway, and deserialize it back to an object on the other end.
|
|
|
|
|
|
how can sent a file from pc to a mobile device via bluetooth ?????
|
|
|
|
|
I was curious as I have no idea how this is done but a quick Google[^] turned up a number of interesting articles here
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
but i can't find any interesting article.......F1 Please ....
|
|
|
|
|
Has anyone been able to get Cards.dll to work on a 64 bit machine? If so, an example would be great!
TIA,
Roger
|
|
|
|
|
Hey guys,
So recently I made this simple TCP server. What I want it to do now is, when the employee enters the id, it will go to the server, check it see if it exists -- if not, it simply returns an error message in the console and doesn't load the form. Here is what I have now.
using System;
using System.Text;
using System.Net;
using System.Net.Sockets;
public class serv
{
public static void Main()
{
int c = 1234;
try
{
IPAddress ipAd = IPAddress.Parse("69.10.61.145");
TcpListener myList = new TcpListener(ipAd, 7575);
myList.Start();
Console.WriteLine("Login Server is running.");
Console.WriteLine("Connection :" + myList.LocalEndpoint);
Console.WriteLine("Waiting for logins...");
Console.WriteLine("================================");
Socket s = myList.AcceptSocket();
Console.WriteLine("Connection accepted from: " + s.RemoteEndPoint);
byte[] b = new byte[100];
int k = s.Receive(b);
Console.WriteLine("Login Attempt Recieved from: " + s.RemoteEndPoint);
for (int i = 0; i < k; i++)
Console.Write(Convert.ToChar(b[i]));
ASCIIEncoding asen = new ASCIIEncoding();
s.Send(asen.GetBytes("Login is invalid." + s.RemoteEndPoint));
Console.WriteLine("\nAccess Denied.");
Console.ReadLine();
return;
}
catch (Exception e)
{
Console.WriteLine("Error..... " + e.StackTrace);
Console.ReadLine();
}
}
}
I have the client done, I'm willing to manually add the employee id's in there, I just need help with bytes to int's etc.
[X] 100% HTML
[ ] 100% PHP
[X] 2% C#
|
|
|
|
|
Hi guys,
Is a Constructor only accessible by the members of a function in a particular class? Suppose, I have a class where I've two functions. If I declare a constructor in one of the functions, wont it be accessible by the other one? Somebody please explain it to me. I am greatly confused!
Your help will be truly appreciated,
Rajdeep.NET
|
|
|
|
|
You can declare constructor in a Class, not in Function.
|
|
|
|
|
stancrm wrote: You can declare constructor in a Class, not in Function.
Hi Stancrm,
so, if I declare a constructor in a class, will it be accessible by all the functions present in the that class? Is it also accessible by other classes?
|
|
|
|
|
Hi,
I am not sure what is the question is ... constructors can be declared to create a new object of that class ... they can by public (accessible to outer classes) or private (only to the same class) now its not commonly used to declare a private constructor ... most common case is when you are creating a singleton object (read about singleton design pattern)... but can we use constructors in the same class ? Yes we can ... no roles can forbid doing so ...
Sincerely Samer Abu Rabie
Imagination is more important than knowledge !
|
|
|
|
|
Just what use do you suppose a constructor would be if you couldn't access it from outside the class?
Go read a book on C# and/or programming.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
In a Factory pattern, you would hide constructors by making them protected or private, then provide a public CreateSomeObject() method that actually invokes the appropriate constructor.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
There are plenty of reasons for keeping a constructor private within a class, you just need to know why.
Examples -
0. Singleton or cached class where you want to control the instatiation through a static method. The method is public, the constructor private.
1. You have several public constructors and wish to use one combined super constructor that talkes EVERY parameter, however you don't want to make the super constructor available - again you keep it private.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Look, you've been posting basic questions all over this forum. Here's an idea - rather than running against a problem, posting it here on CP and then potentially waiting hours for somebody to reply; why not actually go out and buy a book that covers the basics? Then everytime you run up against something you don't know the answer to, you've got two choices; 1. read the book; 2. whack yourself around the head with the book until the urge to post a basic question is gone.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Has been suggested many times already, to no avail. Also good replies don't sink in. I stopped reading his posts. And his replies to other posts.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Please send me a post instructions about thread in C#. Thanks.
|
|
|
|
|
I can recommend you reading about threading in .NET ... hundreds of articles are exist in the Internet, start searching here at the codeproject.
Sincerely Samer Abu Rabie
Imagination is more important than knowledge !
|
|
|
|