|
oops. sorry.
James T. seems to have CP run on his cellphone/pda anyway - so he is a good backup
but i really admire you're way to look at it: with a smile
:wq
|
|
|
|
|
Rüpel wrote:
James T. seems to have CP run on his cellphone/pda anyway
LOL!
I'm just without a job at the moment so I spend a lot of time coding (with CP in the background) or reading CP.
James
Simplicity Rules!
|
|
|
|
|
James T. Johnson wrote:
I'm just without a job at the moment so I spend a lot of time coding (with CP in the background) or reading CP.
Funny, because I *have* a job, I spend a lot of time coding with CP in the background..... ( Well, actually I do the same at home, so that's not quite true )
I'm trying to figure out how to improve my screensaver and I wonder if I can link to the dll that handles screensaver behaviour, and hijack the message loop to handle the messages I am supposed to. Does that sound viable to you ? The instructions in MSDN tell me to do this:
Creating a module-definition file
The ScreenSaverProc and ScreenSaverConfigureDialog functions must be exported in the application's module-definition file; RegisterDialogClasses should not be exported, however. The following example shows the module-definition file for the sample application.
Can I *do* this in C# ? My main reason for wanting to is simply that as it stands I do not have multi monitor support and I can't see a way to find my other monitor/draw on it.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"But there isn't a whole lot out there that pisses me off more than someone leaving my code looking like they leaned on the keyboard and prayed that it would compile.
- Jamie Hale, 17/4/2002
|
|
|
|
|
Christian Graus wrote:
Can I *do* this in C# ?
I don't think so, I'm pretty sure you'll have to use Managed C++ for this. I'm not sure if you can export a __gc method, but you can export a regular method which calls the __gc one.
This is the real power of MC++, you can make calls to both sides easily
James
Simplicity Rules!
|
|
|
|
|
I can create a 256 color icon (w/o hotspot) and use it as a color cursor.
I can create a 16 color cursor (w/hotspot) and use it as a color cursor.
But 256 color cursors are coming in black. Any thoughts?
Thanks.
|
|
|
|
|
Finally got it to work. Had to use an outside editor (Michaelangelo)
|
|
|
|
|
This should be absolutely simple, but I'm on a diet and I'm cranky...
I just did 'Add - Add New Item - Cursor File' to my project.
The cursor comes up fine, and I can edit it, BUT the stupid 'Set Hot Spot Tool' never lights up and I can't set it.
When I look at the properties of my cursor, it says 'Icon File'.
The name of the file is 'cursor1.cur'
What is going on?!
Thanks.
|
|
|
|
|
Looks like a bug to me.
James
Simplicity Rules!
|
|
|
|
|
|
Yep, it truly thinks that its editing an icon file.
James
Simplicity Rules!
|
|
|
|
|
Well, glad it's not the SlimFast...
Little investigation shows that creating a new 'Cursor' actually just creates an Icon instead. You can copy an old cursor into it and change it and then it works (ok).
It does NOT support 256 color cursors, only 16 color ones. (ugh).
|
|
|
|
|
hi, strange thing this:
i have an mdi-app and want to scroll the child-windows by use of the cursor-keys (which is kind of natural to me and a few others) . but i get no key-down-event for the cursor-keys in my mdi-child. i have played around a lot with the following results:
in non-mdi-environments (simple form) everything is ok (compare to petzold: chapter 6, SysInfoKeyboard)
switching back to mdi: even in the mdi-parent form (the outer "container") i get no Keys.Up/Down/Left/Right - messages. but only if there's no modifier pressed. means: "ctrl-up" or "alt-down" do reach the child-window , but it seems that someone blocks the simple cursor-key-pressed-events, when i enable the IsMdiContainer-property of the main form.
anyone any idea?
:wq
|
|
|
|
|
If you override IsInputKey/IsInputChar do you still see that problem?
Try overriding it in the MDI child first, then in the parent, then in both.
HTH,
James
Simplicity Rules!
|
|
|
|
|
man, what are you doing? editor for the class-library-documentation?
the following seems to work, inserted in the child-window-class
protected override bool IsInputKey(Keys data)
{
return true;
}
at least in my little test-app. i will try in the real project in a minute.
thx!
-----------
edit:
did it a bit safer in the real project
protected override bool IsInputKey(Keys data)
{
bool ret = base.IsInputKey(data);
if (data==Keys.Up || data==Keys.Down || data==Keys.Left || data==Keys.Right)
return true;
else
return ret;
}
nevertheless - it works.
:wq
|
|
|
|
|
Rüpel wrote:
man, what are you doing? editor for the class-library-documentation?
LOL, no nothing quite as nice as that; I just have a knack for remembering programming related things. Unfortunately 90% of the time I can't remember what I said 5 minutes after I say it :-P
James
Simplicity Rules!
|
|
|
|
|
Hello!
I would like to display some little information (numbers to be exactly) in the system tray. I tried successfully to display an Icon there (NotifyIcon), but this is of course static. Is it possible to display Text/numbers in the tray?
When it is not, are there possibilities to dynamically create/draw icons at runtime to display them?
Thanx for any help
Mario
|
|
|
|
|
Hello.
Solved it with:
// Create Bitmap
Bitmap TestBitmap = new Bitmap(16,16,PixelFormat.Format32bppArgb);
// Draw whatever you want
for (int i=0; i<16; i++)
TestBitmap.SetPixel(i,i,Color.Red);
// Show as Icon
IntPtr PtrIcon = TestBitmap.GetHicon();
this.MyTrayIcon.Icon = Icon.FromHandle(PtrIcon);
MyTrayIcon is a "NotifyIcon", Other PixelFormat may be better, This is just a code-snipped...
Mario
|
|
|
|
|
I'm sure many of you have experimented with the code commenting features in C#. For those of you who haven't it works like this - above a function you can place some code comments using a special identifier "///" in xml format, like this:
/// <summary>
/// Logs the user into the system
/// </summary>
/// <param name="UserName">User's name</param>
/// <param name="Password">User's password</param>
/// <returns>Boolean value indicating success (true) or failure (false)</returns>
/// <exception cref="LoginException">User name or password was incorrect</exception>
The C# compiler provides you with the option to generate an xml file containing all of these comments in a nicely structured format. VS.NET provides a utility to generate web pages from this xml file. These web pages are rather nice, and could be bundled into a .chm file for distribution. However, this tool doesn't generate pages of the same quality as msdn. The pages look pretty yukky and only certain info is included - for example exceptions are not shown, which is a problem as consumers need to know what exceptions might be thrown.
So after that whole essay - does anybody know of a tool which can generate nice documentation (up to the standard of msdn), and then package that documentation automatically into .chm files? If not, would this be a valuable article? If so, would somebody be willing to collaborate with me on this effort?
Cheers
|
|
|
|
|
Take a look at nDoc, it has an option to produce output almost exactly like MSDN
James
Simplicity Rules!
|
|
|
|
|
James!
You don't know how much easier you have made my life; nDoc is EXACTLY (a good start anyway) what I was looking for...
Thanks,
Neil A. Van Note
|
|
|
|
|
>>nDoc is EXACTLY (a good start anyway) what I was looking for...
I concur, thank you James!
Is a society built on greed better than a society built on survival?
|
|
|
|
|
How can I create an outlook bar in C#, is it very complicate ?
BTW i don't know if it's only a problem with my VS .NET version ( I Have full release) but the splitter control seems to have a bug, anybody can help me on this ?
|
|
|
|
|
Its going to be as complicated as creating it with any other toolkit :-P
What is your problem with the splitter?
James
Simplicity Rules!
|
|
|
|
|
But how can I create one Outlook Bar ?
Splitter = why this control have to be docked somewhere to work ? in VC++ you can place it anywhere on the screen no ?
Thanks J
|
|
|
|
|
Creating one is a bit different, but might not be too hard to do. Essentially each pane in the outlook bar consists of a Panel, a Button, and a List View set in Large Icon or Small Icon mode.
Instead of a list view you can also create your own control which uses flat buttons instead.
Clicking on a button tells the outer-most control that it needs to move the panels above to the top so only the button can be seen, and move the panels beneath the one selected to the bottom (changing the height of the panel so as not to obscure the other buttons). Then resize the panel that was clicked on so that it fills the rest of the area (DockStyle.Fill )
Off the top of my head anyway
If I get around to it I may actually write an Outlook Bar component someday
MFC differs a bit from .NET because it doesn't have any builtin layout engine. In .NET you get some aspects built in, which is why I think it requires docking. Usually though docking isn't a problem, you just have to figure out the combination of splitters and other controls to get it to look the way you want.
James
Simplicity Rules!
|
|
|
|