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
L

Libor Tinka

@Libor Tinka
About
Posts
78
Topics
29
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Convert MenuStrip to MainMenu
    L Libor Tinka

    You can solve this problem in several ways. For example, you can iherit ToolStripMenuItem class and implement explicit cast (see "explicit" keyword in language reference). Another way is creating generic menu item (e.g. MyMenuItem class) that can create instances of both MenuItem and ToolStripMenuItem hiding itself in its Tag property. And yet another way is to program a converter, that will recursively create MenuItemCollection from ToolStripItemCollection or vice versa, this can be implemented as explicit convesion as suggested in the first paragraph. Hope this helps.

    C# com help question

  • .net 2005 - win form - manifest - win xp style
    L Libor Tinka

    I think this should be done programatically. VS 2005 adds these lines in Main() automatically when creating WinForms application: Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false);

    C# question csharp wpf winforms

  • Problem with FileDrop
    L Libor Tinka

    How to implement Drag&Drop capability of a WinForms application, when we want user to be able to drag and drop files and directories outside the main form through FileDrop? Dragging files from e.g. Windows Explorer to WinForms app is not a problem. But the reverse way is a big problem for me.

    C# csharp winforms help tutorial question

  • WinForms: How to override this method?
    L Libor Tinka

    Now it works, thanks. But another few hours have been spoiled on this either.

    Managed C++/CLI csharp winforms help tutorial question

  • WinForms: How to override this method?
    L Libor Tinka

    I'm trying to make simple class derived from ComboBox that processes some command keys. Here is the code: #pragma once using namespace System; using namespace System::Windows::Forms; namespace ProjectX { public ref class EnterComboBox : public ComboBox { public: EnterComboBox(void) { } protected: virtual void ComboBox::ProcessCmdKey(Message^% msg, Keys^ k) override { MessageBox::Show("cmdkey"); ComboBox::ProcessCmdKey(&msg, k); } }; } The compiler outputs error C3254: 'ProjectX::EnterComboBox' : class contains explicit override 'ProcessCmdKey' but does not derive from an interface that contains the function declaration I'm confused. There is no such interface. I've searched whole e-books, forums for the code sample (and more common overrides, like OnPaint, OnResize etc.) and there is no answer how the hell override some method from the Control's base class :mad:

    Managed C++/CLI csharp winforms help tutorial question

  • MDIParent's scroll bars
    L Libor Tinka

    I'll look more carefully, later. There is the solution . But not a managed solution.

    .NET (Core and Framework) help tutorial question

  • MDIParent's scroll bars
    L Libor Tinka

    > Why would you want to do this? I'm designing an imaging application. Both Photoshop and Paint Shop PRO does not show scroll bars in their MDI-based environment. > If you try to break the behaviour in any way you run the risk of alienating your users. So in this case and in my opinion - not showing the scroll bars is the "more" standard behaviour. The whole problem should be solved via the MDIClient, but I don't even know where to start.

    .NET (Core and Framework) help tutorial question

  • MDIParent's scroll bars
    L Libor Tinka

    How to avoid MDIParent showing scroll bars whenever the child form exceeds client area? Setting MDIParent.AutoScroll to false doesn't help.

    .NET (Core and Framework) help tutorial question

  • Creating setup
    L Libor Tinka

    We use Inno Setup in our company - it's excellent tool. You can start with ISTool which will guide you through setup script creation (wizard) and then you can advance to your own scripting. Default output is a single .exe file.

    C# help workspace

  • XP-style folder tree?
    L Libor Tinka

    I spent a several lifetimes by searching how to implement nice folder tree in C#. A tree which looks like that in Windows Explorer. There are several solutions that are complicated, platform-dependent and full of errors. What I need is to implement a tree usable on different platforms only with minimum modifications (it will show "Desktop" and "Network Places" on Win32, but can be simply modified to work well on Linux or Mac with Mono). Of course, there is FolderBrowserDialog but this is a dialog and I need a control that can be docked inside a form and throws several events (directory changed etc.) Any help would be appreciated.

    C# csharp sysadmin linux algorithms data-structures

  • Extending large project to Unix (Mono)
    L Libor Tinka

    I'm planning to extend a large .NET project (3 solutions / 20 projects) to Unix through Mono (there should be separate autorun installers for Windows, Linux and Mac OS on a CD for end user). There are many problems. The big one is the use of platform-specific features (registry, API calls) and the other that it is all made with VS 2003 IDE. I know there is not any universal answer for this, but any help or links to information resources would be appreciated - thanks a lot.

    .NET (Core and Framework) visual-studio csharp windows-admin linux json

  • Local Database vs XML
    L Libor Tinka

    I saw a few imaging programs, that use local database for storing data about images and thus provide extremely fast image search (wihtout accessing files). I want to implement this: database for faster file search in my C# app, but any SQL tutorial begins with installation of some server tools. However, end user does not have these tools. I also cannot force him to install MS SQL Server, because he may not use Windows (my app should work on other platforms). So I'm confused. Is is possible to use databases as well (in app release, that does not contain huge server tools) or it is better to use some alternative (e.g. store all the data in single XML file)? Thanks a lot, Libor Tinka

    C# database csharp sql-server visual-studio sysadmin

  • How to get Image from other Image quickly
    L Libor Tinka

    The drawing to separate buffer (doesn't matter how small the buffer is) is slow when working with large images. Drawing small area of 10 by 10 pixels from position [x,y] using graphics.DrawImage(srcImage, new Rectangle(0, 0, 10, 10), x, y, 10, 10) looks fast - try it on 7 megapixel image, it won't be.

    C# graphics winforms algorithms performance help

  • How to get Image from other Image quickly
    L Libor Tinka

    I need to divide a very large image (say 5-7 mpx) into smaller pieces (24 bpp Image objects). Algorithm is not a problem, the speed of used GDI+ method is. Using Graphics.DrawImage() is slow, even when no interpolation is done. The problem is not in the count of pieces, but in the size of huge source image. Doesn't matter how large the pieces are, because the long time is taken by the reading of pixels from source. I've thought about using unsafe pixel access, but still hope there's some method for obtaining smaller image from larger one quickly.

    C# graphics winforms algorithms performance help

  • Accessing local database created in VS 2005 [modified]
    L Libor Tinka

    I have installed and configured MS SQL 2005 Express. Both SQL Server and SQL Server Browser login set to "Local System", Shared Memory, Named Pipes and all the stuff set correctly. If I want to connect to database created in the SQL Server Management Studio, everything is OK, no User ID or Password needed, because of the trusted connection. Then I've added a database in my project and set Windows Authentication in the "Modify Connection...". After running the program, I've got exception number 4060: Cannot open database "AddressBook" requested by the login. The login failed. Login failed for user ''. This is the connection string I've used: SqlConnection myConnection = new SqlConnection( "server=.\\SQLEXPRESS;" + "Trusted_Connection=yes;" + "database=AddressBook;"); Connection test in VS is also OK, only accessing the database (.mdf) programatically using SqlConnection goes wrong. Maybe it's something easy to fix, but I tried books, Google and MSDN without any progress, so I feel desperate from this :(

    Database database sql-server visual-studio sysadmin security

  • Copy an instance
    L Libor Tinka

    I'm doing this using the Clone method of the object. I think there's no universal mechanism for copying objects, so you need to implement this method by your own. If you are working with more types, it is good to use some ICloneable interface. This is an example: public interface ICloneable { object Clone(); } public class BitmapWithArray : ICloneable { public Bitmap bitmap = null; public int[] array = null; public ushort someValue = 0; public object Clone() { BitmapWithArray obj = new BitmapWithArray(); if (this.bitmap != null) obj.bitmap = (Bitmap)this.bitmap.Clone(); if (this.array != null) obj.array = (int[])this.array.Clone(); obj.someValue = this.someValue; // this is a value type, no copies needed } }

    C# question

  • Detecting Ctrl + arrow keys
    L Libor Tinka

    I need to distinguish Ctrl and Ctrl+arrow key commands in my app. Using ProcessCmdMsg rather than OnKeyDown handler allows me to register arrow keys, but when user strikes and holds Ctrl key, there are lot of messages with key code equal to this Control key, bud I'm not able to detect both Ctrl as modifier key and arrow key at the same time.

    C#

  • Only icon shown in shell context menu
    L Libor Tinka

    Installer of my app (I'm using Inno Setup) writes some info in registry. I've handled file type associations and even AutoPlay support. The problem is that name of my program is not shown in shell context menu (only icon) and in the "Open in..." dialog. There only icon appears as well. What key should be added/changed to show this information :confused:? Thanks in advance.

    IT & Infrastructure windows-admin linux help question workspace

  • Crop an image without creating bitmap
    L Libor Tinka

    Is it possible with GDI+ to just crop an image withou creating a new one? I'm working with, say, 5 Mpix photos, so It can be superfluous, to create a cropped 4 Mpix bitmap and then drawing the first one to this. I believe there is something similar to array reallocation applied to images...

    C# graphics winforms data-structures question

  • How to make a setup project which install two applications
    L Libor Tinka

    You can use many installers, but my favourite is Inno Setup. It's free and even for commercial use. If you're not familiar with installers, you can download also IS Tool, which creates your setup project using step wizard. You'll have two items in the "Files" category there. The one is a directory (or just executable) of your app, and the second is the Framework SDK (marked as decompressed into {tmp} (temporary) directory, so its installer will be deleted after whole installation). Now add this file in the "Install Run" category, so that it will be runned after installation of your app. If you want to install it before your application, you have to create a setup component. To make the installation quiet, the SDK installer have to be runned with some parameter ("/q" I think). Hope this helps.

    C# help csharp tutorial workspace
  • Login

  • Don't have an account? Register

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