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
H

Hubert

@Hubert
About
Posts
52
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Obfuscation - could you recommend something better than Dotfuscator
    H Hubert

    Hi My company has licensed Dotfuscator pro, so we have to obfuscate our releases using it. However, after a couple of weeks of using it, I can say it's a piece of ...(you know what). There is no reliable control about obfuscating and removing processes, tool hangs up itself or crashes VS. There is even no validation of assembly after obfuscation, which can result in some strange errors in releases. I have seen that there are many obfuscators on the market right now, but have no time to evaluate all of them. So, please - could anyone recommend something? Regards H. ps: What I really need is obfuscation, linkng and removing unneeded stuff in .NET 2.0 winforms apps and services, with nHibernate layer thanx H.

    Windows Forms csharp visual-studio winforms question

  • Application framework for small or mid sized apps
    H Hubert

    I really hate writing stored procedures ;) Small or mid projects are almost always not well specified which means, that there's huge risk of changes. With ORM approach you can just add new properties to your objects then add new fields to tables and you're ready to go (yeah, most of them arent't so easy, but let's assume they are). With SPs you have to change tables, SProcs and loading code. There's one more catch-up - deployment. That's why I prefer ORMs in small apps. However I've got one question - how do you write SPs which returns lists of objects with pagination and order passed from UI?

    Design and Architecture database announcement css beta-testing question

  • Remove Quote from Writeline output
    H Hubert

    Have you tried windows version of sed or awk? They will strip quotes instead of you ;) Attached code shouldn't return quoted string, so i think quotes are added during saving to file. H.

    Design and Architecture adobe database sysadmin help question

  • Application framework for small or mid sized apps
    H Hubert

    TopCoderJax wrote:

    Have seen CSLA go very badly

    I am not sure what you mean, but I think DataPortal concept is a little bit too "enterpise" for the rest of the framework.

    drinkwater wrote:

    Forget about all this ORM stuff - you will regret it in the end.

    What I really appreciate in ORMs is dynamic SQL. The Microsoft Application Blocks documentation says (http://msdn2.microsoft.com/en-us/library/ms978510.aspx#daag_datapaging[^]): The options for data paging are: * Using the Fill method of the SqlDataAdapter to fill a DataSet with a range of results from a query * Using ADO through COM interoperability and use a server-side cursor * Using stored procedures to implement data paging manually Best choice for me is the fourth one - dynamic SQL which is build during app's runtime with all the filters taken from UI, with all the order clauses needed, with paging etc.. Lower performace is the price I can pay for it in smaller apps (in bigger too, being honest ;) ) Maybe I should find some runtime SQL query generator and build it into CSLA or any other nice framework?

    Design and Architecture database announcement css beta-testing question

  • Application framework for small or mid sized apps
    H Hubert

    Hi I am looking for some 'ready to use' application framework for writing small or mid sized apps (both win and webforms). I have tried Lhotka's CSLA, but it has some disadvantages like lack of data paging or awful cooperation with nHibernate which I decided to use as the data layer. My last found is the Developer Express OXP+eXpress App Framework. It seems to be complete - starts with data mapping, has included reporting solution, data controls and all of this stuff. I haven't tried to build anything on this, but it looks very promising, however it is beta version with no known official release date. My needs are simple - ability to work wih MS SQL, less than 100 classes in project. Since we integrate our apps with existing solutions, databases are exist (or exist in part), so data mapping has to be flexible enough to use existing data (and all of goods like database schemes etc.) So - what do you use? What can you suggest?

    Design and Architecture database announcement css beta-testing question

  • IsolatedStorage - How to store application config for more than one user?
    H Hubert

    I'd like to store global application settings (for machine, not for the user). My first tought was to use IsolatedStorage with following parameters: IsolatedStorageFile.GetStore (IsolatedStorageScope.Machine | IsolatedStorageScope.Domain | IsolatedStorageScope.Application, null, null); But 1. I can't get proper application identity to work. So how can I assure, that it will be shared between different application versions? 2. I have changed Application to Assembly for test purposes, but configuration wasn't shared between users :wtf: How do you store sensitive infos for the application? Is the registry the only place to share this data? H.

    .NET (Core and Framework) question windows-admin tutorial workspace

  • Reducing time to start application
    H Hubert

    Sorry for long time no answer, I am still in time-tracing business :) Loading icon from external file (plain .ico) takes near no time. Loading it from the dll's resources takes 4 seconds. The same situation is with any other bitmap. I am sure it is my mistake but question is WHAT'S WRONG?

    Phil Wilson wrote:

    If you run a profiler on the code you'd see some of this going on by looking at the objects that get created behind your back.

    Do you mean MS CLR Profiler? I have downloaded and tried CLR Profiler from Microsoft, however it doesn't work with my project. I run the CLR Profiler, loaded and started my app and bang - the profiler shuts down without any message. Have you noticed such kind of behaviors? Hubert

    .NET (Core and Framework) csharp dotnet winforms graphics hardware

  • Reducing time to start application
    H Hubert

    Jakob Lund Krarup wrote:

    there is one or two single lines taking up all the time.

    Yes! I have probably found it. I decided to comment following line from the InitializeComponent method:this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
    Application needs just 1 second to show SplashForm now, so it is 4 times better than in the early begining of the optimalization. :) But I don't have idea how to set icon and image in the picturebox faster than loading from resources. I don't want to have them in separate files in the app directory - I think it is not profesional. Best regards Hubert

    .NET (Core and Framework) csharp dotnet winforms graphics hardware

  • Reducing time to start application
    H Hubert

    Hi Jakob Here is the code of NiceDialog InitializeComponent:

            private void InitializeComponent()
            {
                System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NiceDialogForm));
                this.pictureBox1 = new System.Windows.Forms.PictureBox();
                this.panel1 = new System.Windows.Forms.Panel();
                this.panel2 = new System.Windows.Forms.Panel();
                ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
                this.SuspendLayout();
                // 
                // pictureBox1
                // 
                this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
                this.pictureBox1.Location = new System.Drawing.Point(12, 12);
                this.pictureBox1.Name = "pictureBox1";
                this.pictureBox1.Size = new System.Drawing.Size(131, 264);
                this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
                this.pictureBox1.TabIndex = 0;
                this.pictureBox1.TabStop = false;
                // 
                // panel1
                // 
                this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
                this.panel1.Location = new System.Drawing.Point(155, 12);
                this.panel1.Name = "panel1";
                this.panel1.Size = new System.Drawing.Size(228, 264);
                this.panel1.TabIndex = 2;
                // 
                // panel2
                // 
                this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
                this.panel2.Location = new System.Drawing.Point(143, 12);
                this.panel2.Name = "panel2";
                this.panel2.Size = new System.Drawing.Size(12, 264);
                this.panel2.TabIndex = 3;
                // 
                // NiceDialogForm
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.BackColor = System.Drawing.Color.Gainsboro;
                this.ClientSize = new System.Drawing.Size(395, 288);
                this.ControlBox = false;
                this.Controls.Add(this.panel1);
                this.Controls.Add(this.panel2);
                this.Controls.Add(this.pictureBox1);
                this.DoubleBuffered = true;
                this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
                this.MaximizeBox
    
    .NET (Core and Framework) csharp dotnet winforms graphics hardware

  • Reducing time to start application
    H Hubert

    Hi Jacob I have tried 3 time measuring methods - user measured time, console output and JetBrains dotTrace. dotTrace is most detailed, but it has huge influence on measured time. Your method is probably best since, it has permanent storage of results - thank you for the idea :-) I have included it in my project and measured times are very similar to those posted before. But I have found something pretty interesting. There is SplashForm creation in the Program.cs. The SplashForm is derived from NiceDialog class (which is some pre-customized form). Here is part of the log file created with Trace listeners:

    2006-09-18 11:44:49; Start of creating splash form
    2006-09-18 11:44:52; NiceDialog InitializeComponent start
    2006-09-18 11:44:52; NiceDialog InitializeComponent end
    2006-09-18 11:44:53; SplashForm InitializeComponent start
    2006-09-18 11:44:53; SplashForm InitializeComponent ends

    Following code is executed here: Program.cs Trace.WriteLine(string.Format("{0}; Start of creating splash form", DateTime.Now)); SplashForm splash = new SplashForm(); splash.Show(); NiceDialog.cs public NiceDialogForm() { Log("NiceDialog InitializeComponent start"); InitializeComponent(); Log("NiceDialog InitializeComponent end"); } protected static void Log(string message) { Trace.WriteLine(string.Format("{0}; {1}",DateTime.Now, message)); } SplashForm.cs public SplashForm() { Log("SplashForm InitializeComponent start"); InitializeComponent(); Log("SplashForm InitializeComponent ends"); this.lblVersion.Text = "version: "+Application.ProductVersion; } Well - it is strange to me. SplashForm constructor is called but its first method is called 3 seconds later. And it's not the time to load next library - they are all declared in main exe file. There is picture box with some resource based bitmap on the NiceDialog form. I have heard that resources may make program execution slower, so I decided to reset pictureBox Image propery - so it doesn't show anything right now. Here is part of log file with this operations:

    2006-09-18 12:25:45; Start of creating splash form
    2006-09-18 12:25:45; NiceDialog InitializeComponent start
    2006-09-18 12:25:49; NiceDialog InitializeComponent end
    2006-09-18 12:25:49; SplashForm InitializeComponent start

    .NET (Core and Framework) csharp dotnet winforms graphics hardware

  • Reducing time to start application
    H Hubert

    Hi I wrote some winforms app which seems to work but has very ugly problem - it needs near 30 seconds to start. Application starts in 3 steps - - splash window is initialized and shown - main app window is initialized and shown - splash is hidden. There is no any data connection touch or any other similar operation at the start. Measured times to start the app are: 1. splash is shown in 6 (:wtf:) seconds at first and is reduced to 4 seconds in next run 2. Main app window needs about 16 seconds to show. I am mostly shocked by time to show the splash which is just plain, frameless window with some bitmap loaded from resources. I have tried different tricks with the assemblies - signed them, added to the GAC and even precompiled, but it doesn't change situation in any significant way. Time has been measured on my development machine which is Ahlon 2.2 GHz with 1.5BG of RAM so I don't think it is the hardware/os/environment problem. Could anybody tell me what's wrong? Any ideas are welcome - I'm getting mad on this :) Thanx H. :confused:

    .NET (Core and Framework) csharp dotnet winforms graphics hardware

  • passing multiple filenames from explorer to .net app
    H Hubert

    Hi I'd like to write .net application which can upload photos selected in the explorer to my blog. I wrote some simple app which takes file name as parameter. Next I've built setup and added file action (association) with JPG and Send action to my application. Everything seems to be ok, but it isn't. It works, but only if I select ONE file (or just click on the photo) and choose Send. I'd like to have the ability to select multiple files. I have been sarching for clues for a half day and still have no idea how to do that. Any suggestions? Thanks h.

    C# csharp tutorial question workspace

  • uml to C#
    H Hubert

    Yes, it's great solution. Pricy and heavy, but it's a standard. But I meant something lightweight, handy and easy to use but thanx for your answer h.

    C# csharp tutorial

  • converting .cpp source to .cs source
    H Hubert

    I think you are right - such tool will be grat, but not easy to build. I've played a little with porting some Linux KDE Games written in C++ to C# and they works with minor changes. There were 3 most important points: changing method names (good code editor will do the magic) and playing with structures and pointers. h.

    C# c++ help question

  • Press Esc to cancel editing in TextBox and return to column's value
    H Hubert

    try CancelCurrentEdit on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsbindingmanagerbaseclasscancelcurrentedittopic.asp[^]

    C# database wpf wcf help tutorial

  • uml to C#
    H Hubert

    I'm looking for some nice tool to make uml modeling and then convert it into C# project with roundtrip ability. I've tried ArgoUML which looks pretty good, but I've no idea how to genetrate XMI file from my project to import it. C# Generation works well, but I'm not sure if this may be roundtripped. Regards h.

    C# csharp tutorial

  • Show image in the database ???
    H Hubert

    You will need datasource and some control able to display data from your datasource. You can build your datasource using regular SqlDataAdapter (just drop your table on the form) and then generate dataset. Add OnLoad or button event and fill your dataset. Displaying data is a little bit more complicated since there is no standard control able to do that. There are several solutions: 1. Easiest one - download VB resource kit from Microsoft site. You can find a ComponentOne Studio.NET controls (quite old but full version and free) there. There is some clever control named C1PictureBox which you can bind directly to field containing your image data 2. You can write your own control. You can do that overloading PictureBox control and using byte array, image class and binding events (optional). I think, someone wrote great article about it - it was example of using Northwind pictures in windows forms - try to search for it.

    C# question database

  • WebDav Anyone?
    H Hubert

    Steve West wrote: IIS handles webdav requests, but only allows you webdav on a physical windows file system Not exactly - have you played with MS Exchange OWA or MS Sharepoint (full or Team Services)? Exchange has its own filesystem, sharepoint has virtual fs mapped to MS SQL server. I think you may want to read about mod_dav_fs and mod_dav_svn as code examples. These modules are dav storage/mapping/locking plugins for appache, so they do what you want, but on different platform. Regards h.

    Article Writing csharp windows-admin business question

  • Connecting WinCE to MSDE and ADO.NET
    H Hubert

    Hi Is there any possibility to connect WinCE (Simpad) to regular MS SQL Server without SLQ Server CE and webservices? My "mobile" devices are wall mount, so there's no need to local store data on them. I wanted to use regular SQL CLient as always do in windows forms but there is "PlatformNotSupportedException" thrown when playing with simulator - I've not tested it on physical device. Any ideas?

    Mobile csharp database sql-server winforms sysadmin

  • databound list with customisable filter
    H Hubert

    Hi I am looking for component or some solution how to write databound list which allows: 1. enter SQL query as source 2. paging (datasource may contain more than 100000 records...) 3. master-detail view 4. customising filter (on almost every field) 5. filtering master rows based on some detail elements 6. storing filter settings (serializable) to file or db 7. filtering on database not in dataset Do I really need to write it on my own? ooops... I forget to say - WinForms of course

    C# database csharp winforms tutorial 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