winforms

how to pass control inside a function

Hello All i have a problem i want So many Control on my Window Form (LAbel,textbox) how can i disable all Control When My form Load TO Caught One By one And do Visibilty False is Very irretating for me and After That i want to Pass The Control Inside the Function and Set Its Width And Height HOw Can i Achive it. i m using Function Insi...

Convert Drawing.Bitmap to Imaging.Metafile - Pixel Perfect

Hello, I'm trying to convert a Drawing.Bitmap to an Imaging.Metafile for the purposes of inserting the metafile into a Forms.RichTextBox. (For reference, embedding a bitmap in a metafile is the recommended practice for putting a bitmap into richtext (see Rich Text Format (RTF) Specification Version 1.9.1, p. 149.) Unfortunately it als...

WINFORM control Question (where is the slider?)

How do I go about getting a slider? I am unable to find the slider component inside of the toolbox. ...

mail-merge HTML from a database into MS Word

project: Using VB.NET to build a winforms database interface and work-automation app. I am using this editor for the users to enter their text in the database interface environment that will both load/save/show them what they are working on in the form and also mail-merge into a Word document waiting for the content. I can do the first ...

How set properties enable on false for very textbox on form with extender provider. {C#, Winforms}

Hi, I have 30 textbox and other control on winform, and I want sometimes set their properties (enable, visible) on true/false. I don’t make duplicate code. I am newbie in winforms, and I’d like know what is the good solution for this problem. I’d like use extender provider, but I’d know if it is suitable. Sory for my english. :) If some...

Inheritance of button

I designed a button How do I inherit the rest of this button? ...

Read-Only Windows Forms combo-box

Is there a way to make a windows forms combo-box read-only? To be specific: the user should be able to type, but only those values within the box should be allowed (using auto-complete or a select from the list). Or is the only way to use the validating event? Regards Mario ...

Distributing RDLC output as an email attachment

Our winforms application has long allowed a "print" option which basically uses RDLC. The customer has requested that we add a feature allowing users to send the "printed" output via email. Now, we know that an EMF file is created (in the TEMP folder) as a sort of hidden byproduct of our current printing process. Seems to us we can s...

Different AutoScaleDimensions leads to incorrect form representation

In my C# .NET 3.5 application I am using WinForms forms with docking and anchoring. I am working on a desktop with big display and on a small laptop. A few forms has a list view with anchors set to both 4 bounds and a few buttons below. My forms are shown incorrectly: if I edit a form on the desktop computer, on the notebook the lowest...

How to adjust picture in picturebox control

i have picturebox control in my form that SizeMode = StretchImage when i load 50X250 picture - The picture looks too wide and Ugly when i load 250X50 picture - the picture looks good. how to fix it ? ...

What is the difference between a click and mouseclick?

What is the difference between a click and mouseclick? ...

c#: form doesn't close

After I added the following code to my code-behind, my form doesn't get closed. Could you please help me out with this one? private void Form1_FormClosing(object sender, FormClosingEventArgs e) { MyThreadingObj.Dispose(); } ...

How can I get X, Y positions of mouse relative to form even when clicking on another control?

Currently my mousedown on the form will give me the x,y cords in a label. This label though when I click on it, I do not receive the mousedown. But when I put the code into the mousedown for the label, it gives the the cords based on the origin of the label and not the entire form. My goal is to be able to detect x,y anywhere in the for...

Visual Studio timer problem

Hello... I couldn't find any explanation for the following problem. Hope you to help me to know the solution... Let's make a new windows appliaction (using any version of VS), and add a button, timer (we modify the interval to become = 10), and a label (with initial text = "0"). write the following code in the timer: label1.Text = ...

Load Combobox items Dynamically on KeyPress

I want to create a combobox like winform control in VB.Net that makes suggestions dynamically; exactly as the address bar does in Google Chrome or IE 8/9. Basically on each keypress, get a list of items that match the entered text on a background thread(s) and show these items in the dropdown list as they are (possibly slowly) returned -...

Difficulty keychar

Why this recipe is wrong if (e.KeyChar <= (char)Keys.NumPad0 && e.KeyChar >= (char)Keys.NumPad2) { if (e.KeyChar <= (char)Keys.O && e.KeyChar >= (char)Keys.Oem2) { MessageBox.Show("Yes"); } } I want to be numbers between 0 and 2 ...

Resizing custom forms (with drop shadow effect) and controls on mouse drag event in c sharp?

Hi, In my application I have to resize forms and all its control on mouse drag effect and forms should have drop shadow effect the problem is that all my forms are custom one (with no boarder). Thanks in advance ...

Permanently running executable

Hi all, I created a winform (monitoring) application using VS 2005 (c#), and now, I have a problem when this application crashes for some reason, I have to be sure that it will be restarted automatically. How can I resolve this? (maybe by using windows services application?) Thanks ...

Windows Forms: User controls and events

I have a Windows Forms user control which consists of several controls. Among others there is also gridview control. Now I want to use the user control in a form. How can I check for example if a grid row is clicked? I want to get the data of the selected row. In other words, how can I detect events of the controls, which are embedded in...

Silverlight, WPF or Windows Forms?

I need to create a desktop application for Windows and I'm in doubt about which technology to choose. Fact is that the application must do interaction with local resources: Communication with SQL (need support for SQLite and MSSQL - local and remote, and would love to use NHibernate; maybe even with Castle's ActiveRecord) Interaction ...