Search Results

Search found 2806 results on 113 pages for 'winforms'.

Page 26/113 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • How cross-platform .Net framework really is?

    - by Ivan
    What is normally to be done to run a WinForms application on a Mac or Linux machine? a. Just copy and run (assuming they have a Framework installed). b. Rebuild. c. Cosmetic source code modifications. d. Heavy source code modifications and forms redesign. Assuming that the application is developed as 100% managed C# 3 code by means Visual C# Express or Visual Studio 2008 targeting .Net Framework 3.5, developed without using any 3-rd party components/libraries, without encapsulating nonmanaged code or any low-level hacks - only standard Microsoft-documented .Net Framework C# API used). Or the same conditions but C# 4 language, .Net Framework 4 and Visual Studio 2010.

    Read the article

  • Console.Write Not Working In Win Forms App

    - by Steven
    I created a VB.NET Windows Forms Application in Visual Studio 2008. When I run my program from the command-line, I get no output (only the next prompt). What am I doing wrong? Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Debug.Write("Foo") Debug.Flush() Console.WriteLine("foo") Console.Beep(800, 100) 'confirm this function is called' Me.Close() End Sub EDIT: Can a program have a form and a console? EDIT2: Ho's answer works. However, the output appears on the next command-line prompt. Can a Winforms application tell the command-line to wait until it's finished instead of immediately returning?

    Read the article

  • Adorners for C# Windows Forms

    - by j-t-s
    Hello, I have a canvas (Panel Control) in my WinForms app where users can drag things like textbox's, labels etc around. But I want to make it easier for them to more precisely align the objects. I've read into it and Adorners seem to be the way to go? But, apparently it's only for WPF. WPF is not an option for me, unfortunately. What I'm trying to accomplish is to have lines pop up every time the user drags an object around in the canvas... Just how they work in the Windows Forms Designer View. I'd appreciate any help at all. Thank you.

    Read the article

  • How do you use data binding in C# development ?

    - by MemoryLeak
    Recently I use data binding to speed up my development of C# winforms application. But I found that data binding is just useful when the control is Textbox or textare and text kind of controls. If things come to be radio button, image control or datagridview, it's hard for me to use data binding. For example, it's hard for me to bind a group of radio button to a database field. It's hard for me to pre-process the data in database and then bind to datagridview control(I know I can use view to do this, but it is not that convenient) So I really want to know, most of you guys when will use data binding? And how will you use it ?

    Read the article

  • How to override event on a UserControl

    - by Vadim
    Hello! I have a WinForms application (OwnerForm) with some UserControl. When textbox of UserControl is changed, I want to filter content of a OwnerForm. But how can I make it? I don't want to specify OwnerForm inside the user control. I know a solution to add manually handlers for MyUserControl.tb.TextChanged to some functions on a owner form, but I think it's bad way. I'll prefer to have overridable functions, but I can't imagine how to do it. Any suggestions? Thanks in advance,

    Read the article

  • Create Outlines around line.

    - by Eric Muller
    Hi SO community! I am drawing graphs into a WinForms Picturebox. Now I am searching for a possibility to 'duplicate' a line (an array of points), so that the two resulting lines are positioned a fixed distance away from the original one. Like in this picture, I have the red line and want to get the black ones: I thought about just moving the line a few pixels up/right/up-right, but that leads to strange overlapping lines. Is there any other approach that does what I want? Any ideas would be greatly appreciated. Thanks!

    Read the article

  • Data bind enum properties to grid and display description

    - by TrueWill
    This is a similar question to How to bind a custom Enum description to a DataGrid, but in my case I have multiple properties. public enum ExpectationResult { [Description("-")] NoExpectation, [Description("Passed")] Pass, [Description("FAILED")] Fail } public class TestResult { public string TestDescription { get; set; } public ExpectationResult RequiredExpectationResult { get; set; } public ExpectationResult NonRequiredExpectationResult { get; set; } } I'm binding a BindingList<TestResult> to a WinForms DataGridView (actually a DevExpress.XtraGrid.GridControl, but a generic solution would be more widely applicable). I want the descriptions to appear rather than the enum names. How can I accomplish this? (There are no constraints on the class/enum/attributes; I can change them at will.)

    Read the article

  • Fire just once a Thread in Asp.net WebSite Global.asax

    - by Luís Custódio
    I've a legacy application using Asp.Net WebSite (winforms...) and I need run a background thread that collect periodically some files. But this thread must run just one time! My problem start when I put a method in Application_Start: void Application_Start(object sender, EventArgs e) { SetConnection(); SetNHibernate(); SetNinject(); SetExportThread(); } So I start my application on Visual Studio and three threads start to run. I need some singleton? or something?

    Read the article

  • directx audio video error message in debugmode

    - by clamp
    I have a c#/winforms application that uses directx to play some video and audio. whenever i start my application in debugmode i get this annoying message. i can click "continue" and everything seems to work fine. but i still want to get rid of this message. it does not show up in releasemode. Managed Debugging Assistant 'LoaderLock' has detected a problem in 'C:\pathtoexe.exe'. Additional Information: DLL 'C:\WINDOWS\assembly\GAC\Microsoft.DirectX.AudioVideoPlayback\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.AudioVideoPlayback.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.

    Read the article

  • Get the corresponding row in the datatable from the selection in datagridview

    - by The King
    Hi All, I have a DataTable which is bound to datagridview (Winforms)... I use the following two lines to get the DataRow that is selected in the datagridview... int l_intSelectedRow = DataGridView1.SelectedRows[0].Index; DataRow l_drwSelectedRow = ControlGroupPostedItems.Tables["PostedItems"].Rows[l_intSelectedRow]; This works fine until the DataGridView is Sorted... When the gridview is sorted by the, I get the incorrect values (1st selection of the sorted view return 1st row of unsorted Table). How could I solve this... Is looping through the datatable the only way... Thank you.

    Read the article

  • ListViewGroup not sorting correctly

    - by Andrew
    I'm using a ListView control in a C# WinForms application. Items in the list are added to a ListViewGroup (in this case, grouping by country). The one thing that isn't working as expected is that the column sorting appears to be strange. I've hooked into the ListViewItemSorter property of the ListView and everything sorts perfectly except when the country column is sorted in descending order (that is, Z-A). Regardless of how the list sort occurs the groups show in ascending order. Can anyone give me a nudge in the right direction? EDIT: FWIW, .NET 3.5 on Vista.

    Read the article

  • Best method to cleanly shut down an application launched via another.

    - by JYelton
    I couldn't find any close answers to this, so I'm consulting the experience of SO users: Scenario: I have two small C# winforms applications where one behaves as a server or host, the other as a client. They share data via SQL Server, in terms of configuration settings. I am currently launching the client application (which only needs to run periodically) from the server application via Process.Start() and terminating it via Process.CloseMainWindow() (after finding it in the process list). While it seems clean enough, I wondered if there's a better way. Question: Which way would be best to instruct the client application to shut down: Continue using Process.CloseMainWindow()? Implement WCF between the applications? (I would need help on how to do this.) Set a variable in SQL that the client application checks for? Some other way?

    Read the article

  • How to pop Toolwindow in a defined position

    - by Enmanuel
    Hi everyone. Im trying to integrate a toolwindow in a Winforms application, it will be a tiny floating window to display element details in a listbox. What I need is pop the window in a relative position to the control that triggers the action, so here is the thing: the Location property gives me the relative position of the control from its container (the main form in this case) so this is the workaround im using: public void Show(kTextBox source) { Point absCoord = source.PointToScreen(source.Location); this.Location = this.PointToClient(absCoord); base.Show(); } Basically this is: get the absolute control position and set this position (previously converted into owner relative) to the toolwindow. I think it should work just fine but is missing for a certain degree, and it varies depending what control i use. Its kinda confusing. Been there anyone?? Thanks in advance.

    Read the article

  • C#: how to update winform from thread?

    - by JackN
    A C# thread (Read()) causes System.NotSupportedException when it tries to update a winform based on received content. The full error message is Read() System.NotSupportedException: An error message cannot be displayed because an optional resource assembly containing it cannot be found at Microsoft.AGL.Common.MISC.HandelAr() at System.Windows.Forms.ProgressBar._SetInfo() at System.Windows.Forms.ProgressBar.set_Value() at ...ProcessStatus() at ...Read() The Build/Target Environment is: Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE. Is the problem writing to the ProgressBar from a Thread? If so, what is the correct C#/winforms method to update a ProgressBar from a Thread? In this application the Read() Thread is continuous: it is started when the application starts and runs forever. void ProcessStatus(byte[] status) { Status.Speed = status[5]; var Speed = Status.Speed/GEAR_RATIO; Status.Speed = (int) Speed; progressBarSpeed.Value = Status.Speed; ...

    Read the article

  • VB.NET 2.0 - StackOverflowException when using Thread Safe calls to Windows Forms Controls

    - by LamdaComplex
    I have a Windows Forms app that, unfortunately, must make calls to controls from a second thread. I've been using the thread-safe pattern described on the http://msdn.microsoft.com/en-us/library/ms171728.aspx. Which has worked great in the past. The specific problem I am having now: I have a WebBrowser control and I'm attempting to invoke the WebBrowser.Navigate() method using this Thread-Safe pattern and as a result I am getting StackOverflow exceptions. Here is the Thread-Safe Navigate method I've written. Private Delegate Sub NavigateControlCallback(ByRef wb As WebBrowser, ByVal url As String) Private Sub AsyncNavigate(ByRef wb As WebBrowser, ByVal URL As String) Try If wb.InvokeRequired Then Dim callback As New NavigateControlCallback(AddressOf AsyncNavigate) callback(wb, url) Else wb.Navigate(url) End If Catch ex As Exception End Try End Sub Is there a Thread-Safe way to interact with WinForms components without the side effect of these StackOverflowExceptions?

    Read the article

  • Efficient implementation of threads in the given scenario

    - by shadeMe
    I've got a winforms application that is set up in the following manner: 2 buttons, a textbox, a collection K, function X and another function, Y. Function X parses a large database and enumerates some of its data in the global collection. Button 1 calls function X. Function Y walks through the above collection and prints out the data in the textbox. Button 2 calls function Y. I'd like to call function X through a worker thread in such a way that: The form remains responsive to user input. This comes intrinsically from the use of a separate thread. There is never more than a single instance of function X running at any point in time. K can be accessed by both functions at all times. What would be the most efficient implementation of the above environment ?

    Read the article

  • ListView images just not showing up. Why (Drooping my head in shame that I have to ask)

    - by Quigrim
    I am trying to display images in a WinForms ListView that is in details view mode, but images are just not showing up. I have added a SmallImageList (and a large one for good measure, added images to them, added my items to the ListView, but when I set the ImageIndex nothing happens. Images do not show up. I have also tried using the ImageKey. I feel like an idiot that I have to ask about this, but I must be doing something wrong. Any steps I am missing? Thanx much.

    Read the article

  • Small, editable table of strings. Which Forms control do I want? (.NET)

    - by I. J. Kennedy
    I have a small array of structs, each struct has three fields, all strings. I want to display these structs in a grid, let the user edit the strings a la Excel, and then retrieve the edited strings of course. Which WinForms control is best for this? Tried a DataGridView but setting the DataSource to the array of structs doesn't seem to work. There are myriad controls with similar names but I can't figure out what does what. All the examples I've found are geared toward using a database as the data source--I just have a simple array.

    Read the article

  • RMO on Windows 7 - The Specified module could not be found

    - by AGoodDisplayName
    My machine: Windows XP (x86), VS2008, .net 3.5, sql server 2005, WinForms - App works fine. Production Machines: Windows 7 (x64), SQl Server 2005 Express - App Starts but throws exception Visual Studio Targeting x86 on setup project and RMO project. Visual Studio gives me a a couple warnings but I can still build: Unable to find dependency 'MICROSOFT.SQLSERVER.MANAGEMENT.SQLPARSER' (Signature='89845DCD8080CC91' Version='10.0.0.0') of assembly 'Microsoft.SqlServer.Smo.dll' Unable to find dependency 'MICROSOFT.SQLSERVER.MANAGEMENT.SQLPARSER' (Signature='89845DCD8080CC91' Version='10.0.0.0') of assembly 'Microsoft.SqlServer.Management.SmoMetadataProvider.dll' This is a simple RMO (Replication Management Objects) app that initiates a pull subscription in SQL Server 2005 and displays status. Works fine on my machine, but fails on the production machine. I'm using a setup project to install the app on the production machine, but I think I'm missing a dependency somewhere, but I can't figure it out. On the production machine the app starts fine, but when I try to synch the subscription i get: System.IO.FileNotFoundException: The Specified module could not be found. (Exception from HResult: 0x8007007E)

    Read the article

  • How to implement async pattern in windows forms application?

    - by Alkersan
    I'm using an MVC pattern in winforms application. I need to call remote service asynchronously. So On some event in View I invoke corresponding Presenter method. In Presenter I call BeginInvoke method of service. But to View must be updated only in Main Thread. I could actualy point CallBack to some function in View, and update it`s controls state, but this conflicts with MVP pattern - View must not be responsible for data it carries. This callback function must be in Presenter. But how then invoke View in Main Thread?

    Read the article

  • Asynch operation in WinForm app

    - by TooFat
    I have a WinForms app. that when a button is clicked retrieves a bunch of data from database formats it and displays it to the end user. The operation can take 10 - 30 seconds. I would like to display a message to the user in a Dialog just saying "Be patient the operation is running" while the operation is running and then close when the data is ready to be presented to the end user. What is the best way to do this, start a new thread, use a Delegate or something else?

    Read the article

  • Differing form size between XP and 7

    - by Andy
    I am developing a C# WinForms app on my XP dev machine with Visual C# Express 2008. I set the form to have a size of my liking with Width and Height on the designer and all looks good. I also set these dimensions to the MaximumSize property. Deploying the app to another XP machine, and the app looks like it does on my dev. However, in testing the app on a Win7 machine, the form has both horizontal and vertical scrollbars applied. I assume that this is due to the changed non-client size of the form, as determined by Win7. I can resize the window, but I would like it to be displayed correctly to begin with. So, my question is: What is the best way to correctly maintain a form size client area across OS'es? Thanks all.

    Read the article

  • in .net, what programming model would be good for prototyping, but then reusable for production (for

    - by Greg
    Hi, In .NET land what would be a good approach for quick prototyping of a concept (i.e. development just on my PC) that could then be extended out to product (users across LAN/WAN), BUT in a fashion that the model/business logic code and data access layer code can be used as is? One thought for example I had as to do: (a) WinForms with business logic and Entity Framework layer to SQL Server Express on my PC, then (b) Go then to ASP.net (using the business logic / data library) with SQL Server/IIS Any comments? Other suggestions?

    Read the article

  • How can I set different Tooltip text for each item in a listbox?

    - by Michael Lang
    I have a listbox that is databound to a Collection of objects. The listbox is configured to display an identifier property of each object. I would like to show a tooltip with information specific to the item within the listbox that is being hovered over rather than one tooltip for the listbox as a whole. I am working within WinForms and thanks to some helpful blog posts put together a pretty nice solution, which I wanted to share. I'd be interested in seeing if there's any other elegant solutions to this problem, or how this may be done in WPF.

    Read the article

  • Error after switching from .NET 3.5 to 4

    - by Queops
    Application.Run(new Main()); This line gives TypeInitializationException was unhandled after I switched from 3.5 to 4 framework. Why is this? Edit: Forgot to mention this is a Winforms C# application. Okay so I have SQLite .NET referenced. I tried this on a project created on .NET 4 by default and didn't give me any error so I assumed it wasn't about SQLite .NET http://sqlite.phxsoftware.com/ Please note v2.0.50727 this is the runtime version of the DLL which seems to be causing the problem. Thrown: "A assemblagem de modo misto foi criada com base na versão 'v2.0.50727' do tempo de execução e não é possível carregá-la no tempo de execução 4.0 sem informações de configuração adicionais." (System.IO.FileLoadException) Exception Message = "A assemblagem de modo misto foi criada com base na versão 'v2.0.50727' do tempo de execução e não é possível carregá-la no tempo de execução 4.0 sem informações de configuração adicionais.", Exception Type = "System.IO.FileLoadException" Seems he can't run the DLL on v4 with/ extra configuration.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >