|
Computer programs aren't meant to be attractive. They should all be grey with nice sharp pointy corners.
|
|
|
|
|
Some basic information on form appearance here[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
If you want to make your forms beautiful then you need to work with a designer. Chances are that you don't have the necessary artistic flair to create something aesthetically appealing to all users - don't be upset about this; most developers don't (I know I don't), which is why a good designer is worth her weight in gold.
|
|
|
|
|
|
hi all,
How can I load html print template in web browser control in C#?
Thank you.
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
what is html print template?
|
|
|
|
|
This[^]?
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hello,
As said in the title, Visual Studio 2010 crashed when the designer finishes loading. I use the DevExpress components, and I can't remember when it started doing this.
I can't upload the project, since it is too big, and most of you probably wouldn't be able to open the designer anyways, since the DevExpress components aren't free to download.
Here's a video of it: http://www.sendspace.com/file/7zu3o6
Any suggestions are welcome.
Thanks,
Theo
|
|
|
|
|
Well, at least with Visual Studio 2008, the trick was to close all opened editors and saved the workspace and then restart Visual Studio. There is some timing issue when doing that as some operation must be done at the appropriate moment (before it is too late).
Another trick that might works, is to temporarily move some project and/or files before opening the solution so these won't get loaded and won't crash the IDE. Then you could save that workspace, and then try to reload project and files (possibly after a restart and also possibly rebuild everything before opening designer)
Philippe Mori
|
|
|
|
|
Hello,
Neither of those solutions worked for me. I even tried deleting the .suo file, but it still crashes.
Should I upload my project?
Theo
|
|
|
|
|
OK, I fixed it. The problem was that I had a timer starting in a component's constructor that somehow crashed the Visual Studio designer. Adding a if (!DesignMode) { ... } fixed it.
|
|
|
|
|
how to run a method on other executing application?
(invoke the method and send Parameters)
|
|
|
|
|
solomon85 wrote: how to run a method on other executing application?(invoke the method and send Parameters)
You'd need to be more specific than that. Let's name the first application making the call AppA, and the other executing application AppB.
You can load AppB as if it were a library. In that case, the method would be called by AppA, regardless whether AppB is running.
If you want AppB to execute a function on the request of AppA, then you'd best modify AppB to a client/server structure.
I are Troll
|
|
|
|
|
I am not sure if I have understood you, do you want to call some method from an already running application? I mean call the method on the instance that is running. If yes, then you will need to look into inter-process communication. You can set up a NamedPipe and then use it to communicate.
If you need to call some method of another exe/dll, just add it as a reference if it is a .Net exe/dll or a COM component. If it is not a .Net exe/dll, you can make use of P/Invoke.
|
|
|
|
|
You could try something like this[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi. I'm having problem with the way I Backup my database. I'm trying to use the SMO now because the first time I tried to backup my database with File.Copy() is I always have errors with the .dbo file that I'm backing up. I always have the error that the file is currently used by another process even if I already closed the connection. Now I'm still having problem with SMO. I encountered a run-time error saying: "the backup failed for the server ROJAI-PC". I don't know how to resolve the problem since I'm new to SMO. Can anyone help me?
Here is the code I used:
private void createBackupToolStripMenuItem_Click(object sender, EventArgs e)
{
Server srver = new Server();
Backup bckup = new Backup();
bckup.Devices.AddDevice(@"C:\Documents and Settings\Jairo Hibaler\Desktop\Backup\MP\HotelReservationSystem\HotelReservationSystem\bin\Debug\hotelReservationBackup.bak", DeviceType.File);
bckup.Database = "HotelReservationDB";
bckup.Action = BackupActionType.Database;
bckup.Initialize = true;
bckup.PercentCompleteNotification = 10;
bckup.PercentComplete += new PercentCompleteEventHandler(bckup_PercentComplete);
bckup.SqlBackup(srver);
}
private void bckup_PercentComplete(object sender, PercentCompleteEventArgs e)
{
MessageBox.Show(e.Percent.ToString() + "% backed up");
}
|
|
|
|
|
Hey guys, I have a win form application which was working just fine but now when I try to run it It freezes or gives me this error:
"Error 12 Problem generating manifest. The request could not be performed because of an I/O device error."
please help me out !!!
K
|
|
|
|
|
Ok, look here[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hey guys,
I wrote a network scanning tool a few years ago, which pings a list of IP addresses. I recently moved to Windows 7, and have noticed some strange behaviour in the program. My ping code is as follows:
public void pingIP(int IP)
{
AutoResetEvent waiter = new AutoResetEvent (false);
string IPaddress = IPpart1.Value.ToString() + "." + IPpart2.Value.ToString() + "." + IPpart3.Value.ToString() + "." + IP;
IPAddress IPa = IPAddress.Parse(IPaddress);
Debug.WriteLine("Pinging " + IP.ToString());
Ping ping = new Ping();
ping.PingCompleted += new PingCompletedEventHandler(PingCompletedCallback);
ping.SendAsync(IPa, waiter);
}
This then calls PingCompletedCallback when it recieves a response:
public void PingCompletedCallback(object sender, PingCompletedEventArgs e)
{
PingReply reply = e.Reply;
string IP = reply.Address.ToString();
if(IP != "0.0.0.0")
{
string[] IParray = IP.Split('.');
int iIP = Int32.Parse(IParray[3]);
if (reply.Status == IPStatus.Success)
pingResult[iIP] = reply.RoundtripTime.ToString();
else
pingResult[iIP] = "X";
Debug.WriteLine("Ping Reply From " + IP.ToString() + " Time: " + pingResult[iIP]);
if (iIP == 255)
{
pingComplete = true;
lblStatus.Text = "Ping Complete";
}
}
((AutoResetEvent)e.UserState).Set();
}
Now, under Windows XP this worked fine, PingCompletedCallback was called for every ping I sent - either with a response, or with a timeout. I could then set the value as required. However, under Win7, PingCompletedCallback only seems to be called when a successful response is received. I have also noticed I recieve a lot of replies from "0.0.0.0", as well as multiple replies from the IP the machine is running on (10.0.0.4)
I have a second screen for doing a detailed ping on a single IP, which doesnt use a callback function, and it works fine when no response is received:
public void startPing(IPAddress IP)
{
textStatus.Text += "Pinging " + IP.ToString() + "...";
this.Refresh();
Ping ping = new Ping();
PingReply reply = ping.Send(IP);
if (reply.Status == IPStatus.Success)
textStatus.Text += " Time: " + reply.RoundtripTime.ToString() + "\r\n";
else
textStatus.Text += reply.Status.ToString() + "\r\n";
}
Has nayone seen anything like this before? Im a little confused!
|
|
|
|
|
Hi
I have a friend who's a photographer and he's looking for a way to burn DVDs for his customers with the photos on. He wants to include both low resolution and high resolution photos on the disc, but he doesn't want his customers to be able to access the high res photos. They must bring the disc to him if they want any photos printed. What I suggested to him was to create an application that will allow him to save the photos in a different file format, and only he must be able to open these photos with this application.
I quickly fiddled with some code and saved an image in a different file format, but then of course one can still open these files by simply using the "Open With" dialog. I know there must be more to it than simply just saving it in a different file format. Maybe using some form of Serializer? Any help in the right direction would be appreciated.
|
|
|
|
|
Encryption
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
|
A simple trick might be to write some binary value - an indicator byte/int/long plus some indicator of the type of image that the rest of the file contains (e.g. 0xD1CEDBEE + ".JPG" for a total of 8 bytes, or 12 if you save the string as multibyte characters) - at the beginning of a new file, then stream the binary of the high-res image immediately following that byte. Save the file with a custom extension 'xxx.hires' or somesuch.
The presence of the custom header will prevent any standard software from being able to process the file as a recognized image file.
The custom app can validate the header, then create a .Net Image object from the remainder of the content in the file.
Specifying the embedded image type in the header allows for future implementations that use other file formats (which may not necessarily be images at all). If you don't like having ".JPG" in readable characters, XOR each byte of the string with some binary value, say 0x53. Just XOR them again when reading them back, to get back to the original characters.
You should probably also include a length field describing the embedded string, for flexibility, instead of assuming that it is always going to be 4 characters; I would also include a version # "just in case".
|
|
|
|
|
I'm sorry - that was a little blunt. My fault! I was going to say:
Encrypt the files - use the small file filename and some random-but-fixed data mixed together as the key and use the .NET Encryption services. Save the file with the extension ".encrypt" appended to the ".jpg" or whatever bit, and you are good to go.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Which encryption algorithm would you recommend though? There are numerous included in .NET. The one I came across that works fine is "RijndaelManaged".
|
|
|
|