Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

misterbear

@misterbear
About
Posts
65
Topics
41
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • TabControl BackColor - can it be done and how? Let's settle it once and for all
    M misterbear

    Thanks, it's a good start, however I don't want only the tab labels to be custom drawn but also the entire edges around the control. The DrawItem event is only received for each tab as far as I can see... /Bjorn

    C# question csharp learning

  • TabControl BackColor - can it be done and how? Let's settle it once and for all
    M misterbear

    Did anyone override the TabControl in a good way to be able to give it a custom background color? I have a specific background color used in my entire application so of course I want the tab control to be this color as well, but it doesn't seem to be easy to accomplish. Did anyone do it in .NET? Also what is the reason it is restricted so much by windows? I mean it cannot be so hard to allow for a tab control to have a different background color after all... regards, Bjorn

    C# question csharp learning

  • start winforms application without displaying it until receive signal?
    M misterbear

    I am writing a program which will use another application for communicating with, but I want to load this other application in the background when my main application loads, and then just send a windows message to my "background" application telling it to show/hide... What I have done now is to have the "background" application started from the main application with a Process.start(filename). In the background app the code to run it looks like this: Application.Run(new BackgroundAppFrame()) (from it's "static main" method). However it doesn't seem to be possible to do this without the frame being displayed (I guess the Application.Run() first invokes the constructor and then sets it visible or something like that... And then of course Application.Run() will block so I cannot set the hidden property). Any suggestions on how to solve this? Set the size to 0 instead? Or move it out of screen? If you have a clean solution to this problem please tell me..

    C# csharp winforms help tutorial question

  • modal dialog to rest of application but want to interact with a second window simultaneously with that window
    M misterbear

    what do you guys think about creating another standalone application which I start and hide at startup of my application, and then send a message to it telling it to display and go topmost when i open my modal dialog box? And then define some custom messages to handle the interaction? All I want to drag and drop is some simple text strings so should not be a problem between different applications... please give an opinion of you think its a stupid /hard to realize/other idea.

    C# question json help

  • modal dialog to rest of application but want to interact with a second window simultaneously with that window
    M misterbear

    Sorry for the lengthy title. My problem is that I have a dialog in my application that I want to open in a modal fashion. But I want to be able to open another window from that modal dialog and interact between only these two windows, nothing else in the application (for doing some drag drop things between lists in these two windows). How can I do this? thankful for your suggestion, Bjorn

    C# question json help

  • OPENFILENAME.lpstrFile return encoding?
    M misterbear

    I was wondering if anyone knows how the string returned in the OPENFILENAME-lpstrFile is returned? is it ASCII? UNICODE?

    C / C++ / MFC question

  • CString::GetLength(), what does it in fact return?
    M misterbear

    So if I want to be sure and in the end come out with a measure of the number of bytes (since I use this in conjunction with a filename buffer for a custom multiselect file dialog) what can I do? Is there some other way of finding out the length in bytes of a string? In a compile-mode independant manner? I mean it seems clear that the object itself contains a buffer so it should also internally have a count of the bytes. Is this hidden? Because this behaviour from GetLength() seems to be a bit confusing... (or maybe I am what is confused?)

    C / C++ / MFC question

  • CString::GetLength(), what does it in fact return?
    M misterbear

    I was just wondering what is actually returned by this function. In the documentation I find in the description that it returns the number of characters in the string, but the return value description says that it returns the bytes of the string... which one is it?

    C / C++ / MFC question

  • Determining if a string is a valid filename for system
    M misterbear

    How can you determine if a string is in fact a valid filename for the system I am on? What i want to do is have a textbox where a user can edit a string, and then opening a save dialog where the text from the textbox shall be proposed as the name of the file, provided it is a valid filename. Otherwise I want to propose a standard default filename for him/her. any ideas? I tried to use the path class and call one of it's static members since the documentation seems to say that all static members of Path check this for you. This does not seem to be the case however since I do not get an exception from for example Path.IsPathRooted(path), but when calling the showdialog() for the SaveFileDialog I get the argumentexception... /Bjørn

    C# tutorial question

  • TreeView control
    M misterbear

    I have a question which I am sure someone has had before me: when implementing drag'n'drop for a treeview control I have no problem, except that when dragging over an area in the treeview control which is empty (lets say i have only three nodes, but the control is much higher than this), The drop operation is not allowed, only when dragging onto previous nodes. Why is that? Can I do something about it in an easy way? thankful for help, Bjørn

    C# help question

  • custom progressbar, problem updating it.
    M misterbear

    I've tried to create a custom progressbar to display while I'm doing some intensive work. I also want to update a string of what is currently going on, like an installer tells the user what file is currently being copied, and so on... So, I have a form that I display and then call methods like MyProgressForm.setProgressText(string) MyProgressForm.setProgress(int) but the GUI components (a label for the text and a custom-painted control for the progress) won't get updated, I guess because there is too much work going on... So my question is, how do I force these to be updated? What is the best way to solve this? thankful for some help, I can't seem to figure it out ...

    C# question help announcement

  • function pointers...
    M misterbear

    I need to store function pointers with same return type and arguments, but from different classes, in a stl map, like this: void(classA::*)(istringstream&) and void(classB::*)(istringstream&) in the same map (in another class, classC). is this possible? If so, how is it done?

    C / C++ / MFC c++ question

  • Custom control that can get keyboard focus?
    M misterbear

    What Control would be a good idea to use if I want to be able to let my control get the keyboard focus? Can I make a usercontrol get the keyboard focus and react to keyboard events?

    C# javascript question

  • KeyDown event for a button??
    M misterbear

    Hello, I'm creating a slider-like control based in UserControl. Since the UserControl can't receive keyboard events (At least not that I manage to catch), I use a button as the slider handle since that can receive focus (I want to be able to run the slider up/down with the keys that's what I need the key focus for...) First I tried listening to the KeyDown event from the button, but that doesn't get fired, only the KeyUp.. Has it something to do with that the button filters away these events and fires Click instead? So I grab the button and check what messages it receives with spy++, and it says both WM_KEYDOWN and WM_KEYUP (repeated WM_KEYDOWN when key is held down as would be expected). So I override the button and it's wndproc to listen for these events, and also override the onpaint to get rid of the 'click' effect that I don't want. BUT: the wndproc doesn't reveice any WM_KEYDOWN (0x0100) messages. So where are they going and how can I get them? Is there some kind of preprocessmessage-like function that receives and filters these events? Or is there another control I can override instead of a button, that can get keyboard focus. Also, the button still has it's click behaviour that I don't want... Can anyone help me with the right way to go??

    C# question help

  • is it possible to forcE thumbnail view in open dialog?
    M misterbear

    I'm looking for a way to force an open dialog to display the files in thumbnail view. Is there a way to do this? I guess that is something you can set for each individual folder when browsing in an explorer window (which is what the open dialog uses, isn't it?). But is there a way to set this programmatically? And for every all folders? I need it for opening images and it would be nice to get the thumbnail functionality so easy...

    C# question

  • opening a file with internet explorer from C# code?
    M misterbear

    yes I could, but the application that will eventually use the files on this list (not the same as mine) might not have the same default applications. And that app will also want to start the files listed here in IE through plug-ins. So I need to supply the same functionality here...

    C# csharp question career

  • Owner draw TreeView?
    M misterbear

    Thanks for the advice, got it working. What I did was to override the wndproc and catch the WM_PAINT message, upon which a call to CreateGraphics() let me paint what I want. What I tried originally was overriding the OnPaint method, but that didn't work, never got called I think..? (why?)

    C# question data-structures json help

  • opening a file with internet explorer from C# code?
    M misterbear

    Hello, I'm creating a dialog with a small list of files, where the user can add/remove arbitrary files via an open file dialog. What I want is for the user to be able to dblclick an item in the list, and bring up that file in internet explorer (assuming there is a plug-in installed for the given file type, otherwise I guess IE would show a warning. How can this be done? CommandLine argument? Is there such a thing as an internet explorer control available that I can embed easily? Otherwise just an IE window popping up would do the job for me equally well..

    C# csharp question career

  • Owner draw TreeView?
    M misterbear

    I use an ordinary tree view inside a dialog, but I wish to write a text saying "No data available" if the treeview (which is filled with items loaded from files) is empty. Instead of just adding a node saying "No Data Available", which doesn't look very good, I'd like to set a flag in the control (The control is a very thin wrapper for the API's treeview) and when that flag is set draw the string centered in the treeview instead. I found somewhere on google that this was only possible using Win32 messages with p/invoke. My question is, how do I do this? I get the handle of the control and send some kind of paint message? I haven't been into painting in WIN32 very much... can anyone help me?

    C# question data-structures json help

  • Problem accessing array of objects
    M misterbear

    put this statement cBiquad[] arrBiquads = null; outside of the constructor, instead of inside it. If it's inside the constructor it will only be visible to code also in constructor. public cFilter() { arrBiQuads = new cBiQuad[mnBiquads]; for ( i = 0; i < mnBiquads; i++ ) arrBiquads[i] = new cBiquad(); } Hope it works better now..

    C# help data-structures question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups