|
|
The link you provided has nothing to do w/ my question. I really don't care how to change the text on the start button. And besides, nothing is impossible! This link[^] shows how to add buttons/groups to the taskbar. I am already able to get a handle to the window in which i believe the "All Programs" button is added. I am just not sure which messages to send to get a button created.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
You might tell us for which operating system you want this?
|
|
|
|
|
Hi Luc, the OS is Windows XP. Playing around with Spy++ i am able to get a handle to the window (i think it's "Desktop More Programs Pane") which the button might be added. I tried to get a handle to the window that gets expanded, but i haven't had much luck. If you'd like more information please let me know!
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Users who use the "Classic Start Menu" (as I do) don't have an "All Programs" button.
But accomplishing what you want is as simple as adding a directory to
C:\Documents and Settings\userxxxx\Start Menu
Then add the appropriate shortcuts.
|
|
|
|
|
I'm not so sure about that.
Seems to me the "All Programs" list is an aggregation of several lists, the
current user's "Start Menu" being just one of them.
|
|
|
|
|
I tested this using the "Classic Start Menu". I dragged a shortcut to the directory you provided and all it did was add it to the top of the start menu. This isn't the desired result. What i'm looking for is to create my own root "Menu Item" (exactly like "Programs" in the classic menu except i want to name it something like 'my company') and when that menu item is hovered over, it will list all the programs (that i build programatically) for that employee to use.
I've seen the start menu modified before. ex: Like when you buy a dell computer and use their system restore disks ; I've seen buttons on the start menu that say "Dell support", etc. Moreover, I've seen HP computers that have their own "HP Help" button right under the Windows help button.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Other than being above the separator (and a different icon), it is exactly like the Programs submenu.
And it's the "proper" way to do it.
teejayem wrote: start menu modified before. ex:
That's part of why I wipe the hard drives of new computers; to get rid of such non-standard crap.
|
|
|
|
|
I don't bother modifying the Windows generated lists, I simply create my own lists,
but I don't show them in the Start menu.
When your task bar is not locked, you can create new toolbars, using the task bars
context menu. Create and choose an arbitrary folder, give it a simple name and load it
with the shortcuts you want. It will show up next to the notification area.
AFAIK this works on all versions of XP and Vista, and I expect it to work on older and
future versions too.
|
|
|
|
|
Hi Luc, Thanks for the reply. This certainly is a possibility (pending that i am not able to modify the start menu). The project that this is for is for the call center for my company. So i need to be able to guarantee a few things:
1. I need to be able to monitor the process's that are executed (before, i had my own "start menu" replica, and when someone clicked to start a program i would use System.Diagnostics.Process to execute the application and get the processID, MainWindowHandle).
2. I need to ensure that the toolbar on the taskbar can be visible (w/o rightclicking on the taskbar and click "new toolbar") programmatically.
3. I need to be able to dynamically create the list of folders/files depending on the user access (that information is stored in a database)
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Hi,
2. you could do that once, manually. And I guess there is a way to do it
programmatically, but I don't know right now.
3. no problem, the new toolbar in the end is just a folder somewhere, you can
create/delete shortcuts in there programmatically.
|
|
|
|
|
Windows uses 'special folders' that go in the start menu. These are stored in the registry under HKEY_CLASSES_ROOT\CLSID - you should be able to create your own. The items in the start menu are stored in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartMenu and StartPanel.
I've never tried altering these myself but it might be a start?
Dave
|
|
|
|
|
I need to show the shipping information for each customer. Project summary : Customers are to login in with their customer ID and password. After logged in, I display a gridview with the invoice date, shipped by and tracking number.
The main query is as followed
<asp:accessdatasource id="adfedex" runat="server" datafile="~/App_Data/Tracking.mdb" xmlns:asp="#unknown"><br />
SelectCommand="SELECT SalesID AS [Sales ID], TrackingNumber AS [Fedex Tracking], InvoiceCreateDate AS [Invoice Date] FROM TrackingData WHERE ShipVia LIKE 'f%' ORDER BY InvoiceCreateDate DESC";<br />
</asp:accessdatasource>;
How do I show for the current logged on user only? Keep in mind the username is the same as the customerid.
Thanks for any help
|
|
|
|
|
u already there with
Denise_SQL_DBA wrote: WHERE ShipVia LIKE
add:
AND customerid[from DB] = customerid[user input]
Have Fun
Never forget it
|
|
|
|
|
I don't understand why setWindowsHookEx returns 0.
SetWindowsHookEx(WH_KEYBOARD_LL,
KeyboardHookProcedure,
Marshal.GetHINSTANCE(
Assembly.GetExecutingAssembly().GetModules()[0]),
0);
|
|
|
|
|
maybe this [^] can help
Have Fun
Never forget it
|
|
|
|
|
i want to change .net calender .i need persian month calender .i want to change normal calender to my favorite calender .how can i do ?
|
|
|
|
|
here were to start
Code Project[^]
MSDN [^]
Have Fun
Never forget it
|
|
|
|
|
Hey guys, I have an efficiency question.
Does an if statement with a single condition take up more cpu time than an assignment statement?
Ex, which is more efficient:
if (objA != objB)
objA = objB;
or just
objA = objB;
|
|
|
|
|
What!!!!
if (objA != objB)
{objA = objB;}
this is an if with an assignment
objA = objB;
this is just an assignment
both have different purpose
if u add an "if" more micro second pass
that it
Have Fun
Never forget it
|
|
|
|
|
Fudge Mutator wrote: Does an if statement with a single condition take up more cpu time than an assignment statement?
Almost certainly.
Unless your assignment is very complex (like a deep, deep copy of a large object), the time to do the comparison will outweigh just doing the assignment each time, regardless.
Let's say you want to make two strings equal, if and only if they are not the same. So you compare them first like this:
static void CheckAndMakeEqual(ref string myString1, ref string myString2)
{
if (myString1 != myString2)
myString1 = myString2;
}
...you might think you are saving time by avoiding the assignment if the strings are already equal.
But the code below will be much faster even if you know the strings are equal the vast, vast majority of the time:
static void JustMakeEqual(ref string myString1, ref string myString2)
{
myString1 = myString2;
}
...more than four times faster, in this case:
After 100,000,000 iterations,<br />
CheckAndMakeEqual() ran in 0.4808 seconds;<br />
JustMakeEqual() ran in 0.1180 seconds.
Here is the timing code, if you want to try this out for yourself. Notice that the strings are always equal (i.e. the assignment never happens) and still just doing the assignment each time is much faster.
Code Here:
using System;
using System.Diagnostics;
class Program
{
static void CheckAndMakeEqual(ref string myString1, ref string myString2)
{
if (myString1 != myString2)
myString1 = myString2;
}
static void JustMakeEqual(ref string myString1, ref string myString2)
{
myString1 = myString2;
}
static void Main(string[] args)
{
const int RepeatCount = 100000000;
string myString1 = "This";
string myString2 = "This";
Console.WriteLine("Testing CheckAndMakeEqual() {0} times. Timer started...", RepeatCount);
Stopwatch timer = Stopwatch.StartNew();
for (int i = 0; i < RepeatCount; i++)
{
CheckAndMakeEqual(ref myString1, ref myString2);
}
timer.Stop();
Console.WriteLine("Timer stopped. Execution Time: {0} seconds.", timer.Elapsed.ToString());
Console.WriteLine("\nTesting JustMakeEqual() {0} times. Timer started...", RepeatCount);
timer = Stopwatch.StartNew();
for (int i = 0; i < RepeatCount; i++)
{
JustMakeEqual(ref myString1, ref myString2);
}
timer.Stop();
Console.WriteLine("Timer stopped. Execution Time: {0} seconds.", timer.Elapsed.ToString());
}
}
Enjoy,
Robert C. Cartaino
modified on Tuesday, July 22, 2008 2:55 PM
|
|
|
|
|
Okay, thanks that's what I thought. I was just asking because my company has the "
if (myString1 != myString2)
myString1 = myString2;
"
kinda thing all over their code and I couldn't understand why, but the people who wrote it have been here for 10 years longer than me and I thought they were probably right =P
Thanks again
|
|
|
|
|
Fudge Mutator wrote: have been here for 10 years
Then they're likely used to C or some other language.
|
|
|
|
|
This is all very irrelevant, if you can avoid the check in the first place, then do so, otherwise you have no option but to use it.
|
|
|
|
|
Generally I wouldn't bother with the if .
But if the class has a custom != operator and/or a copy constructor you might need it.
Only testing with your particular class will tell.
|
|
|
|