|
Your spelling and phrasing makes it difficult for me to understand what you're asking. Do you want to print your form, and only your form? Or are you trying to print your form, and anything that's on top of the form (like the task manager)?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Hallelujah! It's Ken Jennings!
Judah Himango
|
|
|
|
|
Sorry I talk french....
I want to print only my form event if there was another application in front (like task manager).
I can't use the class DrawControl because i use many control that i create.
Tanks
|
|
|
|
|
|
Hi All,
I am calling below code in installer class it is giving exception.System.Diagnostics.Process.Start("mailto:abc@yahoo.com")."The requested lookup key was not found in any active activation context".
But the above line of code is working fine by opening a Outlook Express New MailMessage window,when i called from a button click event in a windows form.But when i try to call it frominstaller class its giving exception.
Any body have idea please reply back.
Thanks in advance.
Sastry.
Sastry
|
|
|
|
|
Please see this recent MSDN article, in particular, scroll down 3/4ths of the way down the page and you'll see the exact problem you're describing:
Process::Start("http://www.microsoft.com");
Alas, if you try this at home, the same thing happens. The call throws a Win32Exception which yields an even more cryptic code in its NativeErrorCode property: ERROR_SXS_KEY_NOT_FOUND. The description for this error is "The requested lookup key was not found in any active activation context." Huh?
If you poke around the documentation for Process and read all the fine print, you'll discover that Process uses something called StartInfo in order to tell it how to start the process. One of the properties in StartInfo is UseShellExecute. By default, UseShellExecute equals True, which tells the Framework to launch the process using the shell, that is, ShellExecuteEx. Okay, so try setting it to False. But then, as the fine print explains, you can only start EXEs, not file names or URLs.
The article mentions some other options, such as using rundll32, to launch your URL.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Hallelujah! It's Ken Jennings!
Judah Himango
|
|
|
|
|
Hi,
Is there anyway to add a custom button using the .NET MessageBox rather than creating my own class to do this? I wish to add an Extra Info button to a message box and hook in an event handler e.g. be able to:
MessageBox.Show("Error", "Error", MessageBoxButton.OK + MessageBoxButton.ExtraInfo);
Many thanks,
Gary
|
|
|
|
|
I don't think so. There are some other existing message boxes built into Win32 that you could wrap (for example, SHMessageBoxCheck), but if you're trying to do anything elaborate (for instance, display a checklist of files to be saved), you'd be better off implementing your own MessageBox.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Hallelujah! It's Ken Jennings!
Judah Himango
|
|
|
|
|
You might be able to do something with an article on MSDN, written by Dino Esposito (Windows and .NET GOD! IMHO), Using Windows Hooks to Enhance MessageBox in .NET[^]. I don't if any of the techniques will let you do want to you want, but it's worth a look.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I used the wizard to create an install application. I works fine except if a file exist it does not replace it.
If "C:\mydir\myfile" exist then it does not install a newer version.
Is there a property I can set to say, replace existing objects?
thanks
|
|
|
|
|
|
|
|
I need to get a new pixel color starting by a green color and another one over this blue semi-transparent at 50%.
I've readed some articles on this forum but i need just 2 lines of code not warking with whole bitmaps.
I know it is a very simple stuff, but i don't know how fuse or join two pixels getting another colored pixel.
i've tried with
myColor.R = Color.Green.R & Color.Blue.R
myColor.G = Color.Green.G & Color.Blue.G
myColor.B = Color.Green.B & Color.Blue.B
it works but it fuse full blue on green, i need to fuse semitransparent blue instead.
Please help me.
thanks
|
|
|
|
|
I want to add a button on windows Save As dialogue tool bar. I need information (name, path) about current document (which send Save As dialogue). From any documents I want to save them automatically in a fixed folder(s).
Best regards,
Mihai
MihaiChioariu
|
|
|
|
|
You can do this using the Win32 APIs OPENFILENAME structure and GetSaveFileName() functions. You need to define the OPENFILENAME structure in your C# application and use P/Invoke for the GetSaveFileName function.
The OPENFILENAME structure has a parameter called lpfnHookProc. You will add code like the following for this parameter:
public delegate int OFNHookProcDelegate(int hwndDlg, int uMsg, int wParam, int lParam);
ofn.lpfnHook = new OFNHookProcDelegate(HookProc);
The HookProc receives all messages sent to the FileSave dialog. You will need to intercept the WM_INITDIALOG message, get the window handle for the toolbar, and add your toolbar button to it. You will also need to respond to any notification messages from your toolbar button.
Customizing the FileSave dialog involves much interaction with the Win32 API via P/Invoke. You can do a search on Code Project for examples. The FileSaveDialog and FileOpenDialog classes are sealed so you cannot subclass them.
I hope this helps.
Andy
|
|
|
|
|
Hi,
Is there any tool by which i can debug my Exe.I had made that Exe from C#.net 2005.
Can any one can guide me on that?
thanks.,
regards.,
montu3377
|
|
|
|
|
|
|
Hi
I want to reboot some remote Windows machines using C#. I have find one article using VS 2005 and framework v2.0. Does anyone knows how i can make it with VS 2003 and v.1.1?
I know that I can write a Batch file using shutdown and call it from my application. But the user on the machine where my application runs have no administrative rights on the machine i want to reboot..
Hope someone can help
Greetings from Germany
|
|
|
|
|
Hi
i want to place a xml file contains webservice path and can i change the path in that file and run application without recompiling?
|
|
|
|
|
Hi WDI,
We can use the webconfig file itself to do this. In this case we can change the URL of the webservice without recompiling this. For this we need to set "URLBehaviour" property of the webservice to "Dynamic".
1) Go to the solution explorer.
2) Click on the Webreference.
3) Chnage the URLBehaviour property to "Dynamic".
Hope this will help you.
Thanks
SGS
|
|
|
|
|
Hello C#-Community!
I´ve a problem with a ImageStream from a Resource file.
My programming partner (not available anymore) used some nice icons (I hope they are icons!), but he embedded them in a resource-file.
It´s no problem to get these Images via:
<br />
private System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TestRessource));<br />
private System.Windows.Forms.ImageList imlIcons;<br />
<br />
<br />
this.imlIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imlIcons.ImageStream")));<br />
<br />
imlIcons.Images[0].Save("test.ico", ImageFormat.Icon);<br />
<br />
But the Save-Method did not return the expected result. The resulting .ico-file is only a Hex-File.
To understand what he is doing with the stream - here is a code snippet from the resource file:
<data name="imlIcons.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value> Private</value>
</data>
<data name="imlIcons.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</data>
<data name="imlIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuNTAw
MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT
....
.....
....
</value>
</data>
Can anybody help me to save each image in a seperate .ico-files, so that I can use these icons in other applications?
Or how can I find out in which format these images are? And then how I can convert them into icons?
Please, I need help...
Norman-Timo
|
|
|
|
|
Does really no one knows something about my problem?
*PushThreadForward*
Ciao
Norman-Timo
|
|
|
|
|
I would like to create an application that does not appear in the Windows Task manager and system Try or any other means that might detect its existance
|
|
|
|
|
I think that´s not possible!
Because in the Task-Manager are all processes shown, equal which application is behind it.
You´re only solution can be that you hide your application behind a strange name or another name.
(Are you programming a virus?)
Why should this application not be listed in Task-Manager?
Perhaps you can run your application with a different user so that your "normal" user can´t stop your application, but to do this in stealth mode, I think that´s not possible...
Ciao
Norman-Timo
|
|
|
|