|
Every time I maximize an MDI child window, it resizes the icon in the parents menubar and deforms everything, is there a way to prevent the icon showing at all.
P.S. I set the Child ShowIcon command to flase, but it still brings up a small icon in the menubar, I don't want that either.
modified on Saturday, February 02, 2008 8:52:34 AM
|
|
|
|
|
Hi,
I have a printer that is connected to computer with usb port.
How can I print a file (document or image) using the printer?
i.e with clicking a button printing of the file began.
Best wishes
|
|
|
|
|
Hi,
.NET contains a number of classes that deal with printing (PrintDialog, PrintDocument, ...).
It does not matter how your printer is connected to your PC, as long as it has a valid driver
it should pop up in the list of available printers (as in the Printer combobox in Word's
print dialog).
Look for examples in the CodeProject articles; my Sokoban article knows how to print
a simple graphic.
Note: I do not claim it is simple, taking care of print previewing, page orientation,
duplexing and collating is rather hard. It is after all a complex matter.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
hi
how to attach file to mail using C# code ?
thank's
|
|
|
|
|
|
hi all.
i have written a Bwroser Help Object using visual c# 2005.
Now how i install and deploy it on my client machine.
many of my client machine has not dot net framework.
should dotnetframwork be installed to run this small dll?
sepel
|
|
|
|
|
Hello everyone,
Lately, I'm concerned about internet protocols and had this big question of how such proxy avoidance websites work?? Can I create my own?? How??
Any good articles/hints would be appreciated as I have no idea where to start from..
Thank you guys
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
how to return arrays from functions?
if the array is created inthe function itself.
|
|
|
|
|
By defining the return type as array and return it, no difference from other data type.
public string[] GetStrings()
{
string[] arrayOfString;
// define array, do stuffs
return arrayOfString;
}
|
|
|
|
|
Strictly speaking, you don't return the array itself, but the reference to it, as with any object.
public int[] GimmeSomeInts() {
int[] result;
result = new int[] { 1,2,3,92849832 };
return result;
}
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
How do i add a list of items for an embedded windows media player to play.
threw website/you're own movies. Or what is the code to link a button to set the media player to read the next video, or add a new url to the player?
If anyone can show me an article on how i can do this. Be most appreciated.
Also i've made my program so it's a fixed tool window, how can i make a button in my menu to be able to move it. It won't let me click/drag as a fixed tool window, and i don't want it to be a fixed 3d border.
Thanks in advance.
|
|
|
|
|
hi all ,
i want to create an app to change or remove password of my user in pc .
when my pc load , for some user that we created password , we have to enter the password (sometimes we forgot this password ) , in any case with using c# how can i do it ?
thanx a lot for any guide .
s_mostafa_h
|
|
|
|
|
hi
My aim is to ping a socket....i want this to be done from one side i mean the application which is sending the ping signal(byte)....should not take response from the client.......
i tried with socket.send ...it doesnt ensures that bytes are received at client side or not
then i tried with socket.sendto....same thing
so if any one knows how to do this please let me know............
regards
sindhu tiwari
its me sid
|
|
|
|
|
|
Hello friends,
I am developing an C#.NET application and I want that whenever an exe is running then on the same system that exe could not run simultaneously. when i closed that running exe then it then i will able to run it again...
Means when exe is running then that same exe never run on the same system
|
|
|
|
|
hi write this code in program.cs if the application is already open the if part will execute ....and if not else part is execute...............hope this will solve ur problem..
if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1 )
{
MessageBox.Show("The application is already launched...","Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
return;
}
else
{
// the things in program.cs
}
regards
sindhu tiwari
its me sid
|
|
|
|
|
thank's alot
i look for this too
|
|
|
|
|
|
How is that "more reliable"?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
If the user renames your executable file, you won't be able to detect it in current processes.
|
|
|
|
|
Giorgi Dalakishvili wrote: If the user renames your executable file
You could always make the executable check if its original name is the same one it is using. If it detects user renamed it, then don't run.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
hi
I created a project in c#.net using MySql as database. I created a setup and installed it into another client machine but at the time of installation i need to check whether MySql database exist in the client machine.Is this possible in C#.net? Plz Help Me
Thanks in Advance
Smithakrishnan
|
|
|
|
|
Do you want to detect if MySQL Server is installed?
The code below is straight from Microsoft[^] - I've just altered the name of the service! Adapt it to suit your needs. (You need to add a reference in your project to System.ServiceProcess)
using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceProcess;
namespace ConsoleApplication1
{
class Program
{
static void Main()
{
string myServiceName = "MySQL";
string status;
Console.WriteLine("Service: " + myServiceName);
ServiceController mySC = new ServiceController(myServiceName);
try
{
status = mySC.Status.ToString();
}
catch (Exception ex)
{
Console.WriteLine("Service not found. It is probably not installed. [exception=" + ex.Message + "]");
Console.ReadLine();
return;
}
Console.WriteLine("Service status : " + status);
if (mySC.Status.Equals(ServiceControllerStatus.Stopped) | mySC.Status.Equals(ServiceControllerStatus.StopPending))
{
try
{
Console.WriteLine("Starting the service...");
mySC.Start();
mySC.WaitForStatus(ServiceControllerStatus.Running);
Console.WriteLine("The service is now " + mySC.Status.ToString());
}
catch (Exception ex)
{
Console.WriteLine("Error in starting the service: " + ex.Message);
}
}
Console.WriteLine("Press a key to end the application...");
Console.ReadLine();
return;
}
}
}
|
|
|
|
|
After a little experimentation trying to control a service I found that
myServiceController.Start(); and
myServiceController.Stop(); both fail under Vista because UAC insists it's done with true Administrator privileges. To make them work you need to add an Application Manifest File and alter the level attribute of the requestedExecutionLevel tag to requireAdministrator . When the application is executed, you'll then get the annoying UAC Cancel/Allow dialog.
|
|
|
|
|
Just when you think you've seen everything...
public SearchCriteria() : this(2000, 1) {}
...this is a default constructor for the SearchCriteria object... but what is that stuff after it... I can't find any documentation of this feature because searching for colon operator only gives me articles about inheritance of classes and interfaces. What are the implications of this construct, and what does it do...
There is another constructor that takes two integers. Is this the same as calling that one with 2000 and 1 as default values? If it is, I'm confused as to the purpose of this notation, when you could just as easily initialize those values "normally" or call the other constructor within this one, or something. There must be a reason for this colon thingy?
|
|
|
|