winforms

pixel selection form winform vb.net

is it possible to choose different colors of different pixels on the background property of a form in vb.net? i would like to clarify that i do not want to use an image to color the form. why do i need this? the short answer to that question is: i have a transparent form that will need to detect all the black colors behind it ...

Redraw Toolstrip based on selections

I have been asked to write c# winforms app that will give users the ability to select options from a checkbox list and have it automatically redraw/repaint a toolstrip with the selected items. I am new to winforms so I am not sure how to approach it. Should I be using the BackgroundWorker Process? Invalidate()? Just alittle confused....

How can I trigger the default button on a form without clicking it (winforms)?

I have two text boxes. one for login id and another is for password. and there is one button (submit). I need an event that takes the values of login id and password. I.e, without clicking the mouse I need to invoke this event(just by hitting 'enter' on keyboard). can anybody help me! thanx in advance. srini. ...

DB won't reinitialize to local subscribers after Schema changes

First, I will outline my issue in case someone has an alternate fix. The Problem: I have a winform app that uses MergeReplication. This is working great except I needed to make changes to the columns and Primary Key on 5 Tables. I dropped them from the Articles and then made my changes. I then re-added them to the Articles and set t...

Is it possible to programatically add some controls to a WinForm?

Hi folks, i have a pretty simple rectangluar WinForm that uses timers to check the end content of a number of files. Works fine. Now, the list of files to check is dynamic. Could be 3. could be 30. It dependant upon some value in the database, which i check regularly. That's also fine. What I wish to do is visual this, on my winform. ...

Label control behaves differently at design time vs. run time.

I am creating a custom Label control (by simply Inheriting the standard Label control and re-painting the background and text) because I need a very specific background and border. In the constructor of the control, I set the AutoSize property to false so I can have a standard default size for the new label. Public Sub New() /*Se...

CrystalReportViewer, check if a report is currently displayed?

I have a crystal report viewer in my c# app and I'm making my own implementation of some of the viewer navigation buttons (just so they show up in my toolbar, for visual effect). That bit is working fine, however I want to set the canExecute for these buttons so that they are disabled if for any reason a report is not currently displayin...

Webpage in WebBrowser Control too large, need to resize width.

I have a WebBrowser control on a form and have set the URL to a website. When I run the application the webpage is much larger than the size of the WebBrowser control and causes the WebBrowser to now contain a horizontal and vertical scrollbar. I would like the webpage width inside the WebBrowser control to be resized to the WebBrowser...

Deploy my DLLs to GAC for use with ClickOnce App

How do I do it? Is there any reason I shouldn't? I have a winform ClickOnce App that has about 13mbs in DLLs that are not mine so I would have no need/ability to update them at any regular intervals. DevExpress(3), Microsoft ReportViewer, Microsoft SQL Replication. Microsoft SQL SMO. Without them being included in my ClickOnce App ...

Load rows as needed in DataGridView

I have a WinForm DataGridView bound to a List<> of objects and I would like to set the datasource of the DataGridView to display only so many records at a time. From a few searches it looks like there is a way to do this however I have not found the exact method. Is there a way to set the total row count and then set an event that fires...

C# - How to detect the currently pressed key?

In WinForms, you can know, at any time, the current position of the cursor thanks to the Cursor class. The same thing doesn't seem to be available for the keyboard. Is it possible to know if, for example, the Shift key is pressed? Is it absolutely necessary to track down every keyboard notification (KeyDown and KeyUp events)? Thank yo...

Issue with shared WinForms resources across projects in Visual Studio

I've moved all image resources in a large multi-project solution to a new project specifically created for shared resources. Adding a new reference to other projects where the shared images are used is working as expected. The image in the selected button below continues to appear in designer but with issues. In VS Designer, I'm unable...

Displaying thumbnail icons 128x128 pixels or larger in a grid in ListView

Original Question (see Update below) I have a WinForms program that needs a decent scrollable icon control with large icons (128x128 or larger thumbnails, really) that can be clicked to hilight or double clicked to perform some action. Preferably there would be minimal wasted space (short filename captions might be needed below each ico...

Winforms - How to control Checkbox Colors (similar to textbox readonly)

On a checkbox I can set .Enabled = False to gray-out the checkbox rectangle and associated label. But the appearance is not visually appealing, i.e. both the label and checkmark become "faint"; (I know i can use my own label but that's only half the solution). If i set .AutoCheck = False, the colors remain normal, however user gets no c...

GUI not responding while fetching data

My application often fetch data from a webpage using WebRequest, but it isn't possible to click buttons etc while it's fetching. I've understood that I have to use threads/a backgroundworker, but I can't get it to work properly; it doesn't make the GUI more respondable. The code I want to apply some kind of threading on, so that it sto...

How can I connect to MySQL from windows forms?

How can I connect to mysql data base from windows forms? ...

Different startup forms for different developers using SVN in VB.NET?

My scenario is such that I have a VB.NET project in SVN and I am using the Application Framework to start the application. This poses a great problem when different developers are working on different forms and they want to have different startup forms. Right now if we change the project settings, its changed for everyone else too. How...

mysql stored proc

hi all how can i execute a stored proc in mysql db? i have to pass parameters and to catch the result out off stored proc. ...

Date time picker

I am developing a C# application where user can select any date time format and display in date time picker.How to change the format of date time picker in code? ...

winform: how to rearrange the menu?

based on .designer.cs, i infer that the menu's arrangement is based on the order you add them on menuStrip's AddRange method: this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.windowsMenu, this.helpMenu}); is there a way i can change the order of menu? i put dynamically generated men...