|
sorry, i didnt mean to hurt you mr. senthil kumar. But i am trying from past 2 weeks on that context. Suggestions from this forum always helps me. Thanks to everyone.
Aakash
|
|
|
|
|
|
Hi Friends...
I wanna create a toolbar on my windows taskbar and add its name to system context menu of taskbar Like QuickLaunch,Address and Windows Media Player toolbar. My toolbar
may consists a Textbox and a button just like 'Google Deskbar' Application.
Can anybody help me ?
|
|
|
|
|
i wanna do the same thing,
if you got some thing, can you mail it to me,thx
gavin@m165.com
|
|
|
|
|
In working on a small C#.net program that starts another program via rundll32. This program performs an operation and then opens a IE page showing some results. I would like to be able to close this IE process after the WaitForExit() call.
Process proc = new Process();<br />
ProcessStartInfo processInfo = new ProcessStartInfo("rundll32.exe");<br />
processInfo.Arguments = Config.DLL_ARGUMENTS;<br />
proc.StartInfo = processInfo;<br />
proc.Start();<br />
proc.WaitForExit();<br />
I know how to get a list of processes running, but how do I know which was the IE started by my other proc. call??
Thanks for any help!
|
|
|
|
|
You'll have to get the list of processes, launch your .DLL thing and wait for it to terminate. Then enumerate the processes again, comparing the list to the one you have stored. You'll be able to find the IE instance that was launched then.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In addition to, or instead of this, you could have the page that's created and displayed have a particular title. The new IE window with the "[title] - Microsoft Internet Explorer" title will be the one you're looking for.
Matt Gerrans
|
|
|
|
|
He can't change the title, since it's a seperate .DLL he's running using rundll32 that's launching the IE window, not his application.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do you know its not a separate .DLL that he or someone he works with wrote? Anyway, the same idea applies if the title of the page is fairly consistent, whether or not he has any influence over exactly what it is. It's just a little extra insurance in case where two or more instances of IE appear in that same timeframe.
By the way, you might also have trouble in the case where an existing instance of IE picks up the page, instead of a new instance of IE being launched; this depends upon how the DLL is launching the page.
Matt Gerrans
|
|
|
|
|
Matt Gerrans wrote:
How do you know its not a separate .DLL that he or someone he works with wrote?
Who cares? Usually when they say something like that it's something they didn't write.
Matt Gerrans wrote:
By the way, you might also have trouble in the case where an existing instance of IE picks up the page, instead of a new instance of IE being launched; this depends upon how the DLL is launching the page.
Very true.
In either case, it's a bad idea to go hunting for a process then close it. Since he didn't directly launch it, he shouldn't be closing it in the first place. IMHO, it's just bad practice.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In either case, it's a bad idea to go hunting for a process then close it. Since he didn't directly launch it, he shouldn't be closing it in the first place. IMHO, it's just bad practice.
Good point; I agree.
That's kind of why I was suggesting the extra checks. However, now that you mention it, I think the better suggestion is to either not try to kill the instance of IE that's created by this other process, or work out a better interface with the creators of that other process, if possible. The idea of a browser window appearing with some stuff, then automatically disappearing seems pretty bad. Long before you are doing something this kludgy, it is time to start trying to work out a better solution.
Matt Gerrans
|
|
|
|
|
Hello
I want to change the icon of exe of my program as i want to place an icon of my choice as to appear if i place it on my desktop. If any body can help.
Regards
asmyan
|
|
|
|
|
You can add an icon of your choice to File System Editor.
Go to File System Editor in Setup and Deployment, add a shortcut of Priamry output to User's Desktop and right click on the copied shortcut and goto ICON property and select the ICON you want.
As far as I know, you can only add an ICON to an exe with extension .ico
Hope this helps.
Looney
|
|
|
|
|
Assuming you are using VS .NET 2003, Right click on the Project in Solution Explorer, click Properties, go to Common Properties->General, you'll find an entry for Application Icon.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I would to convert to int a number got by a division of two doubles....
For example 500/900 i get 0.555... that is converted using Convert.ToInt16() in 1.
I would get 0 instead, then 1 if i divide 900/900 or 970/900.
How can i do?
|
|
|
|
|
Perhaps you are looking for the Math.Round function?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Math.Round just convert a double value to the nearest one, i need to convert it to the littlest one,
example:
1,43 to 1
1,21 to 1
1,98 to 1
2,01 to 2
2,54 to 2
8,76 to 8
5,99 to 5
ok? How can i do?
|
|
|
|
|
ok Floor is the method i need.
|
|
|
|
|
You are talking about the Floor function (returning nearest LOWER integer):
<br />
double a = 1.43;
int i = (int)Math.Floor(a);
Similar function is Ceiling, it returns a nearest higher integer ( Math.Ceiling(1.43) = 2 ), just for curiosity.
|
|
|
|
|
Have you considered Math.Floor() ?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
And what i've told??
|
|
|
|
|
Check out the pasted code. When the app starts, you can hit Alt-Tab and see the colorful icon in the Task Switching window. Now check the box and hit Alt-Tab again. We are left with a different icon.
The actual application I am working on has an Icon that appears on the exe and in the top-left of the form, but when ShowInTaskBar goes false, the Alt-Tab icon goes from the icon I designed to some default icon.
Any ideas?
///////////////////////////////////////////////////////////////////
// compile with csc /target:winexe MenuTest.cs
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
public class MenuTest : System.Windows.Forms.Form
{
private System.Windows.Forms.CheckBox chkShowInTaskBar;
private System.ComponentModel.Container components = null;
public MenuTest()
{
InitializeComponent();
chkShowInTaskBar.Checked = true;
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.chkShowInTaskBar = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// chkShowInTaskBar
//
this.chkShowInTaskBar.Location = new System.Drawing.Point(56, 8);
this.chkShowInTaskBar.Name = "chkShowInTaskBar";
this.chkShowInTaskBar.Size = new System.Drawing.Size(160, 24);
this.chkShowInTaskBar.TabIndex = 0;
this.chkShowInTaskBar.Text = "Show In Taskbar";
this.chkShowInTaskBar.CheckedChanged += new System.EventHandler(this.chkShowInTaskBar_CheckedChanged);
//
// MenuTest
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(256, 45);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.chkShowInTaskBar});
this.Name = "MenuTest";
this.Text = "MenuTest";
this.ResumeLayout(false);
}
#endregion
[STAThread]
static void Main()
{
Application.Run(new MenuTest());
}
private void chkShowInTaskBar_CheckedChanged(object sender, System.EventArgs e)
{
this.ShowInTaskbar = chkShowInTaskBar.Checked;
}
}
|
|
|
|
|
i didn't understand, ur icon on alt-tab? do you have the correct icon for each size required?
IM PROUD TO BE A GMAIL;
|
|
|
|
|
If you compile that code, you'll see that there is an icon (albiet some default icon) that represents the Application when you hit alt-tab and see the task switcher come up. This icon has three colored boxes.
Now, see what happens when you go back to the application and uncheck the check box. Hit alt-tab again, and you see some new icon representing the application. This new icon looks like an empty Windows form with a blue border on the top. My question is: What happened to the other icon with the boxes? I only posted a test program to show this; my actual program has icons every place I need them, except for alt-tab when ShowInTaskBar is false.
|
|
|
|
|
hi all.
I have some problems in programming rich text box i succeeded to draw an image inside text box as emoticons by using dataformats and clipboard but the problems are:
1- the emoticons entered inside the rtb unanimated even if it is animated how can i implement that emoticons animated ?????????????
2- when the emoticons entered the richtext box if you point with your mouse pointer on it in rtb you can resize it how can i make it fixed ?????????
3- when i press my send button to send emoticons to the other user in chat the previous emoticons in my rich text box disappears and even the previous one transfered disappears in the private chat of the other user.
how can i make the emoticons don't disappears and make my rtb contains all the emoticons ?
Any help with this please .
i used the following code.
<br />
Bitmap myemot = new Bitmap(dialog.filename);<br />
ClipBoard.setDataObject(myemot);<br />
DataFormats.Format chm = DataFormats.GetFormat(DataFormats.Bitmap);<br />
rtb.text +=myusername + " \r\n";<br />
if(rtb.canpaste(chm))<br />
{<br />
rtb.paste(chm);<br />
}<br />
The Above Code makes the bitmap enter the rtb but with the previous problems any help with that please
Mess With The Best And Die Like The Rest
|
|
|
|