Search Results

Search found 15 results on 1 pages for 'paja'.

Page 1/1 | 1 

  • Win C#: Run app as administrator without UAC prompt

    - by paja
    Hello, I need one of my .exe to always run as administrator without UAC prompt. My program will be installed with setup, which will have for one time admin rights, and I need to perform such step in this setup that my exe will be always executed as admin without UAC prompt. I've found 2 solutions so far: 1) Use custom service, which will elevate the program for me. 2) Use tash scheduler: http://www.howtogeek.com/howto/windows-vista/create-administrator-mode-shortcuts-without-uac-prompts-in-windows-vista/ Is there any other solution? Some manifest probably? Thanks.

    Read the article

  • Draw Bitmap with alpha channel

    - by Paja
    I have a Format32bppArgb backbuffer, where I draw some lines: var g = Graphics.FromImage(bitmap); g.Clear(Color.FromArgb(0)); var rnd = new Random(); for (int i = 0; i < 5000; i++) { int x1 = rnd.Next(ClientRectangle.Left, ClientRectangle.Right); int y1 = rnd.Next(ClientRectangle.Top, ClientRectangle.Bottom); int x2 = rnd.Next(ClientRectangle.Left, ClientRectangle.Right); int y2 = rnd.Next(ClientRectangle.Top, ClientRectangle.Bottom); Color color = Color.FromArgb(rnd.Next(0, 255), rnd.Next(0, 255), rnd.Next(0, 255)); g.DrawLine(new Pen(color), x1, y1, x2, y2); } Now I want to copy bitmap in Paint event. I do it like this: void Form1Paint(object sender, PaintEventArgs e) { e.Graphics.DrawImageUnscaled(bitmap, 0, 0); } Hovewer, the DrawImageUnscaled copies pixels and applies the alpha channel, thus pixels with alpha == 0 won't have any effect. But I need raw byte copy, so pixels with alpha == 0 are also copied. So the result of these operations should be that e.Graphics contains exact byte-copy of the bitmap. How to do that? Summary: When drawing a bitmap, I don't want to apply the alpha channel, I merely want to copy the pixels.

    Read the article

  • Good IDE for Mono on Windows

    - by Paja
    I would like to develop Mono application for Win/Linux/Mac in C# on Windows. Is there any really good (Visual Studio comparable) IDE for that? The best would be if I could manage Visual C# Express to compile solutions using the Mono compiler. I've found a #develop IDE, which looks very cool and has many features that Express edition of the Visual Studio hasn't (like plugins for TortoiseSVN, NUnit, etc). Hovewer the 3.* versions dropped support for Mono, so you are no longer able to compile solutions using the Mono compiler. There is also a MonoDevelop. I've tried it and it sucks. Not comparable to Visual Studio at all. No WinForms designer, + tons of other missing features. I would just like if they would drop the development of MonoDevelop and build a plugin for #develop instead. Is there any other good enough IDE, or is it possible to make the Visual C# Express or #develop compile the solutions with Mono compiler?

    Read the article

  • Refresh Windows Explorer in Win7

    - by Paja
    My program sets "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" value "Hidden". Hovewer I'm not able to refresh the explorer to take into account this change. I've tried: 1) SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, IntPtr.Zero, IntPtr.Zero);` 2) SHELLSTATE state = new SHELLSTATE(); state.fShowAllObjects = (uint)1; SHGetSetSettings(ref state, SSF.SSF_SHOWALLOBJECTS, true); 3) SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, SPI_SETNONCLIENTMETRICS, 0, SMTO_ABORTIFHUNG, 5000, ref dwResult); 4) SendMessage(HWND_BROADCAST, WM_COMMAND, 28931 /* Refresh */, 0); Nothing works. So what should I do? If I refresh Explorer myself with F5, then it works. Hovewer I would like some elegant solution, so it would refresh the display everywhere, even in OpenFile/SaveFile dialogs, which are currently open. I'm using C# .NET, Win7.

    Read the article

  • Win C#: Refresh Windows Explorer in Win7

    - by Paja
    Hello, My program sets "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" value "Hidden". Hovewer I'm not able to refresh the explorer to take into account this change. I've tried: 1) SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, IntPtr.Zero, IntPtr.Zero); 2) SHELLSTATE state = new SHELLSTATE(); state.fShowAllObjects = (uint)1; SHGetSetSettings(ref state, SSF.SSF_SHOWALLOBJECTS, true); 3) SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, SPI_SETNONCLIENTMETRICS, 0, SMTO_ABORTIFHUNG, 5000, ref dwResult); 4) SendMessage(HWND_BROADCAST, WM_COMMAND, 28931 /* Refresh */, 0); Nothing works. So what should I do? If I refresh Explorer myself with F5, then it works. Hovewer I would like some elegant solution, so it would refresh the display everywhere, even in OpenFile/SaveFile dialogs, which are currently open. I'm using C# .NET, Win7. Thank you.

    Read the article

  • Using Fluent NHibernate in commercial application

    - by Paja
    I want to use Fluent NHibernate in commercial desktop application, and I'm little concerned about the licensing. I've downloaded Fluent NHibernate precompiled binaries, and it contains this list of files: Antlr3.Runtime.dll Castle.Core.dll Castle.DynamicProxy2.dll FluentNHibernate.dll Iesi.Collections.dll log4net.dll NHibernate.dll NHibernate.ByteCode.Castle.dll I guess I will have to add all of these files to my Inno Setup script, which will install them on user's computer. But what should I do to comply to all of the licenses associated with each file? I'm sure I'm not the first who wants to use Fluent NHibernate in commercial application, so I hope I won't have to study each of the licenses. I'm not a lawyer.

    Read the article

  • .NET Framework installation requirements

    - by Paja
    What are the requirements for all .NET frameworks and their service packs? This is what I need to know for all available frameworks: .NET Framework prerequisites What other .NET Frameworks does it require? For example: .NET Framework 2.0 does not require anything, .NET Framework 2.0 SP1 requires .NET Framework 2.0 installed, but .NET Framework 3.5 SP1 does not require .NET Framework 3.5 installed (or maybe does? dunno) Reboot requirements Does the installation package require reboot after installation? Clean install requirements Does the installation package require clean install? (No pending delete/rename operations) Administrator privileges Does the installation package require administrator privileges to install? (I guess this is "yes" for all of them...) And I need to know all of this for the following packages: .NET Framework 1.1 .NET Framework 1.1 Language Pack .NET Framework 1.1 SP 1 .NET Framework 2.0 .NET Framework 2.0 Language Pack .NET Framework 2.0 SP 1 .NET Framework 2.0 SP 1 Language Pack .NET Framework 2.0 SP 2 .NET Framework 2.0 SP 2 Language Pack .NET Framework 3.5 .NET Framework 3.5 Language Pack .NET Framework 3.5 SP 1 .NET Framework 3.5 SP 1 Language Pack .NET Framework 4.0 Full .NET Framework 4.0 Client Could you please either tell me all of these requirements, or direct me to the appropriate source? Or maybe both? :-)

    Read the article

  • Apple has bigger market capitalization than Microsoft

    - by Paja
    Should I worry that my Microsoft programming skills (C#, .NET, WinAPI) will be obsolete in a few years, because everybody will be using Mac OS X, iPhone OS or some other Apple-originated OS? According to reuters, Apple has now bigger market capitalization than Microsoft. I know there is probably huge speculative bubble around Apple's shares, but just look at this graph (taken from business insider): I also know Windows have currently 90% of the OS market share, so we (Win devs) should be OK for a few years, but who knows, maybe in 10 years, it will be just 40%, and 0% on mobile phone OS market. Personally, I'm not much worried, because I think Microsoft will fight hard for their desktop OS market share, but I'm interested in your opinions.

    Read the article

  • Resizing window causes black strips

    - by Paja
    I have a form, which sets these styles in constructor: this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); And I draw some rectangles in Paint event. There are no controls on the form. Hovewer, when I resize the form, there are black strips at right and bottom of the form. Is there any way to get rid of them? I've tried everything, listening for WM_ERASEBKGND in WndProc, manually drawing the form on WM_PAINT, implementing custom double buffer, etc. Is there anything else I could try? I've found this: https://connect.microsoft.com/VisualStudio/feedback/details/522441/custom-resizing-of-system-windows-window-flickers and it looks like it is a bug in DWM, but I just hope I can do some workaround. Please note that I must use double buffering, since I want to draw pretty intense graphic presentation in the Paint event. I develop in C# .NET 2.0, Win7.

    Read the article

  • FluentMigrator tutorials

    - by Paja
    Are there any tutorials for FluentMigrator? Some "Getting Started..." tutorial would be just awesome. All I was able to find was FluentMigrator.Tests (unit tests), inside FluentMigrator source, which are not as helpful as "Getting Started..." would be.

    Read the article

  • Fluent NHibernate mapping List<Point> as value to single column

    - by Paja
    I have this class: public class MyEntity { public virtual int Id { get; set; } public virtual List<Point> Vectors { get; set; } } How can I map the Vectors in Fluent NHibernate to a single column (as value)? I was thinking of this: public class Vectors : ISerializable { public List<Point> Vectors { get; set; } /* Here goes ISerializable implementation */ } public class MyEntity { public virtual int Id { get; set; } public virtual Vectors Vectors { get; set; } } Is it possible to map the Vectors like this, hoping that Fluent NHibernate will initialize Vectors class as standard ISerializable? Or how else could I map List<Point> to a single column? I guess I will have to write the serialization/deserialization routines myself, which is not a problem, I just need to tell FNH to use those routines. I guess I should use IUserType or ICompositeUserType, but I have no idea how to implement them, and how to tell FNH to cooperate.

    Read the article

  • Which ORM to use?

    - by Paja
    I'm developing an application which will have these classes: class Shortcut { public string Name { get; } public IList<Trigger> Triggers { get; } public IList<Action> Actions { get; } } class Trigger { public string Name { get; } } class Action { public string Name { get; } } And I will have 20+ more classes, which will derive from Trigger or Action, so in the end, I will have one Shortcut class, 15 Action-derived classes and 5 Trigger-derived classes. My question is, which ORM will best suit this application? EF, NH, SubSonic, or maybe something else (Linq2SQL)? I will be periodically releasing new application versions, adding more triggers and actions (or changing current triggers/actions), so I will have to update database schema as well. I don't know if EF or NH provides any good methods to easily update the schema. Or if they do, is there any tutorial how to do that? I've already found this article about NH schema updating, quoting: Fortunately NHibernate provides us the possibility to update an existing schema, that is NHibernate creates an update script which can the be applied to the database. I've never found how to actually generate the update script, so I can't tell NH to update the schema. Maybe I've misread something, I just didn't found it. Last note: If you suggest EF, will be EF 1.0 suitable as well? I would rather use some older .NET than 4.0.

    Read the article

  • Change size of a custom page in Inno Setup

    - by Paja
    The following image shows the size of a standard custom page: I've intentionally removed the panel on top, where you usually see Caption, Description and Logo. So you can see that the actual size of the page is quite small - there are gaps on top, left and right sides. Is there any way to resize the page, so there are no gaps? I want the image to take the whole space. I create the page using CreateCustomPage function.

    Read the article

  • Change WizardForm.TasksList offset

    - by Paja
    When I change WizardForm.TasksList.Offset to 20, the result looks like this: When I change it to 120, it looks like this: The problem is, I need it 120, but I don't want any space between the checkbox and it's label. You can see that with offset 120 it looks just awful, because of that space. I want the space to appear only at the left side, not in the middle. Is there any way to accomplish that?

    Read the article

  • Jersey non blocking client

    - by Pavel Bucek
    Although Jersey already have support for making asynchronous requests, it is implemented by standard blocking way - every asynchronous request is handled by one thread and that thread is released only after request is completely processed. That is OK for lots of cases, but imagine how that will work when you need to do lots of parallel requests. Of course you can limit (and its really wise thing to do, you do want control your resources) number of threads used for asynchronous requests, but you'll get another maybe not pleasant consequence - obviously processing time will incerase. There are few projects which are trying to deal with that problem, commonly named as async http clients. I didn't want to "re-implement a wheel" and I decided I'll use AHC - Async Http Client made by Jeanfrancois Arcand. There is also interesting implementation from Apache - HttpAsyncClient, but it is still in "very early stages of development" and others haven't been in similar or better shape as AHC. How this works? Non-blocking clients allow users to make same asynchronous requests as we can do with standard approach but implementation is different - threads are better utilized, they don't spend most of time in idle state. Simply described - when you make a request (send it over the network), you are waiting for reply from other side. And there comes main advantage of non-blocking approach - it uses these threads for further work, like making other requests or processing responses etc.. Idle time is minimized and your resources (threads) will be far better used. Who should consider using this? Everyone who is making lots of asynchronous requests. I haven't done proper benchmark yet, but some simple dumb tests are showing huge improvement in cases where lots of concurrent asynchronous requests are made in short period. Last but not least - this module is still experimental, so if you don't like something or if you have ideas for improvements/any feedback, feel free to comment this blog post, send mail to [email protected] or contact me personally. All feedback is greatly appreciated! maven dependency (will be present in java.net maven 2 repo by the end of the day): link: http://download.java.net/maven/2/com/sun/jersey/experimental/jersey-non-blocking-client <dependency> <groupId>com.sun.jersey.experimental</groupId> <artifactId>jersey-non-blocking-client</artifactId> <version>1.9-SNAPSHOT</version> </dependency> code snippet: ClientConfig cc = new DefaultNonBlockingClientConfig(); cc.getProperties().put(NonBlockingClientConfig.PROPERTY_THREADPOOL_SIZE, 10); // default value, feel free to change Client c = NonBlockingClient.create(cc); AsyncWebResource awr = c.asyncResource("http://oracle.com"); Future<ClientResponse> responseFuture = awr.get(ClientResponse.class); // or awr.get(new TypeListener<ClientResponse>(ClientResponse.class) { @Override public void onComplete(Future<ClientResponse> f) throws InterruptedException { ... } }); javadoc (temporary location, won't be updated): http://anise.cz/~paja/jersey-non-blocking-client/

    Read the article

1