winforms

Lag/buffering using the Windows Meida Player ActiveX control

Hello, For a fairly short-duration project I'm producing a video application using the Windows Media ActiveX control in a Windows Form under VB.Net. I could have dug into the API if I'd had more time, but this is the quick and easy solution. Unfortunately, the application's performance is time-critical on the order of microseconds. The ...

Is it possible to use the WPF version of the Client Composite UI Application Block (CAB) for WinForms application

I am at the initial stage of designing a client application. However, being new to WPF and having already gained some experience in Win forms development, time pressures on the project means that there is a risk to going down the WPF route. If time were no pressure, then I would say forget forms and design with WPF. However, I am not luc...

How to print labels on both sides of a rangebar in WinForms MS Chart using C#

How can i add labels for each and every yvalue in series of a rangebarchart ? You all know that for plotting rangebartype series ,we need two yvalues as yvalue[0] and yvalue[1] .Here I need to add data labels to each of those yvalues( which means both at yvalue[0] and yvalue[1]).how can i implement that?can anybody suggest me?please!! ...

How to create an Explorer-like folder browser control?

Using C# and WinForms in VS2008, I want to create a file browser control that looks and acts like the left pane in Windows Explorer. To my astonishment, such a control does not ship with .NET by default. Ideally, I would like its contents to be exactly the same as in Explorer. For example, on Windows 7, it should show the Favorites and ...

Curious question - Interface Variables (ie dim x as Iinterface = object?) And also if object is a form.

Hi, vb.net windows forms question. I've got 3 forms that have exactly the same functions, so I decided to create an interface. public Interface IExample public sub Add() Public sub Edit() Public sub View() End Interface Then I created the 3 forms, and added the 'implements interface IExample' to each. public class...

Save or output WebBrowser object context to .pdf file in VB.NET

I am loading an html page into a WebBrowser object in a VB.NET Windows Forms application. The user may make changes to textboxes, dropdowns, etc. on the HTML page displayed in the browser. I want the ability to save the current context to a .pdf file on the local HD. I am able to print using WebBrowser.Print(), which shows the current...

How do you modify a control that has been re-parented to a TabPage?

I have a user control that contains a collection of controls to be reused for presenting data on the UI. I've attempted implementing a "pop-out" option that will re-parent the control from another container on the form (a Panel, for example), create a new tab page, and then add the control to the tab page. Unfortunately, when the contr...

Best practice for multiple long-methods using backgroundworker

I have a form that has many long-methods. My quest is: What is the best practice? Use anonymous method and only one backgroundworker or create an instance of BackgroundWorker to each long-method. Please help. Thanks. ...

Can my binding source tell me if a change has occurred?

I have a BindingSource that I'm using in winforms data binding and I'd like to have some sort of prompt for when the user attempts to close the form after they've made changes to the data. A sort of "Are you sure you want to exit without saving changes?" I'm aware that I can do this via the BindingSource's CurrencyManager.ItemChanged e...

MS Access 2007 autoexec macro alernatives?

I'm having an issue with program distributed via Microsoft Access runtime. It runs an autoexec macro at the beginning to run a piece of code. I've done all the security setting and trusted zone settings, but the error seems to crop up on Windows 7 installations. Ideally, I'd just like to have the code run automatically without the auto...

Unboxing ComboBox Items.

hi comunity!!! since method Add() takes Object as an argument, can I add for example datatables, then unbox them? example: cmbEmpresa.Items.Add(dt1); cmbEmpresa.Items.Add(dt2); cmbEmpresa.Items.Add(dt3); then do something like: datagrid.datasource=(DataTable)cmbEmpresa.SelectedItem; EDIT: and what about adding different type of o...

Trying to list data in ms sql using vb.net

Below is the code that I'm using in ms access to list the data according to what is selected in combobox and what is input in textbox. My problem is there no commandbuilder in ms sql like in ms access, because it fails when I try: dim mscombuilder as new sqlcommandbuilder Here is the code: ''#list school If ComboBox1.SelectedItem =...

Background processing on UI thread? (Winforms)

Is there a (or, do you have your own) preferred way to do background processing in slices on the UI thread in Windows Forms? Like OnIdle() in MFC? In native Windows programming you could roll your own message loop to do this, but Application.Run() doesn't give us access to the message loop. The Application.Idle event gives us no way to...

How to call in form load the gridview cell click

Hi, I have gridviewname_CellClick(object sender, GridViewCellEventArgs e) event. I want this event to be called in Form load. When i try gridviewname_CellClick(sender,e)- i get exception as e as not an event of GridViewCellEventArgs, how to call this on form load? Any inputs? ...

User Control and Binding

I've created a custom control which consists of two radio buttons with their appearance set to "Button". This control is meant to act like two toggle buttons with an "On" toggle button and an "Off" toggle button. I have a public boolean property "isAOn" which is used to set the state of both buttons and I want to be able to bind this pro...

Is there a "max" number of assemblies for a .net app

Quite a few apps support plugins Are there any downsides to having a large # of plugins ? Is there a sweet spot beyond which there's a performance degradation perhaps ? What's the largest # of assemblies you've seen loaded in an app ? ...

HTML Agility Pack

I want to parse the html table using html agility pack. I want to extract only some predefined column data from the table. But I am new to parsing and html agility pack and I have tried but I don't know how to use the html agility pack for my need. If anybody knows then give me example if possible EDIT : Is it possible to parse htm...

Attempted to read or write protected memory-Sql Compact and .NEt

I've tried to run the application in two situations: with SQL Server compact edition (3.5) installed and one without. When SQL Server Compact edition isn't installed, I get the following error: Exception :Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Inner Exception : ==========...

Keeping ID and Value in sync using ComboBox WinForms C#

I'm using ComboBox to keep data in. Usually i create 2 ComboBox one hidden to keep ID and one with the real data. I need id to know which id it is in database. I then use SelectedIndex and event for both checkboxes to keep them in sync. Sometimes I even use more comboboxes and keep them all in sync with each other using SelectedIndex and...

How to find padding space around the label text?

I am adding a label controls at run time. I can add or modify text in label and can change the font also.Now my problem is When i changed the font of text in label, alignment is not proper,its due to padding.Is there any way to find how much padding is ocured [ed: obscured?] based on font? ...