-
- fill the combobox with a field
by ehsano2
- 2 Replies
- Last post
by Zhi-Xin Ye - MSFT
- hi
I have a table in my database with 2 fields( f1,f2) and a form with a combobox and a textbox
I want to select f2 from table where the f1 like textbox.text and fill the combobox with the f2 that is selected.
I want when the user is typing the text in textbox the select operation happens with out any buttons.
please give me the code completely for C#
thanks
-
- More efficient code wanted
by AlexBB
- 11 Replies
- Last post
by AlexBB
- I am wondering if there is a better way to accomplish what I do. It is a loopy code executed in a high demand routine and I want as many milliseconds shaved off as I possibly can.
foreach ( System . Windows . Forms . Control crl in tb1 . Controls )
{
if ( crl . GetType ( ) . ToString ( ) == "System.Windows.Forms.GroupBox" )
{
foreach ( System . Wind
-
- parameter query
by shevo
- 2 Replies
- Last post
by shevo
- How do I use a parameter query to search for a value based on user input. E.g. If I enter A in the search box, it will display a list of records based letter starting with A in the datagrid. I am using Microsoft.Jet.OLEDB.4.0. If i use sql connection, the sql code is Select Name,Phone from Customer Where (Name LIKE @Name + '%') However, I wish to get the same result using data from Microsoft Acces
-
- HowTo Remove TabControl Margin
by BradR
- 8 Replies
- Last post
by Mick Doherty
- I'm trying to implement something similar to the Java Card layout - a tab control where the tabs are not visible. I found a useful link that shows how to prevent the actual tabs from being displayed. It works great, however, there is a 3px margin/padding that I can't seem to get rid of. Wondering if someone can point me in the right direction. here is the code i'm using
Code Snippe
-
- Where to learn about setup
by janue
- 2 Replies
- Last post
by janue
- Hi, I created a visual basic window form application, and I am giving this project to another person, but I have to come up with a setup installation file...but I have no clue about setup projects, so far what i've done is create a setup project under Steup and Deployment, and add my current window form solution into this setup project. I build the setup file right away, and after that I attempt t
-
- appBars with multiple screen
by Spizmar
- 1 Replies
- Last post
by Spizmar
- I got an appBar working.
I'm having a couple of issues, though.
A single appbar in an app works fine on the primary display. When I try to set it on another display, the set position method returns a location on the primary screen, and only modifies the WorkingArea of the primary screen. I know I am setting the coordinates correctly for the screen I am dealing with, because the form moves ex
-
- MDIChild on panel
by aduplessis
- 2 Replies
- Last post
by nobugz
- How can I position my MDIChild that it can only be shown on a panel thats filled on the parent form.
-
- DataGridView Control Optimization
by cmazur
- 10 Replies
- Last post
by cmazur
- Hey Guys,
I'm in a position where my program is using too much CPU power.
My program receives roughly 100 updates for every 30 rows of data per second.
Unfortunately, I cannot cut back on the amount of updates.
I'm using the .NET Framework 2.0 and Visual Studio 2005.
When using a DataTable, and updating the DataTable without the DataGridView, the performance is fla
-
- Communicate Between User Controls in C# Windows Application
by sanjangr
- 6 Replies
- Last post
by Oleh Svintsitskyy
- Hi, I need to send some data between two user controls i use within my windows form. the 2 user controls are initialized at runtime. I have put my 2 user controls in 2 tabs in the same form. i need to call a method in one user control from the other control when an event occur in the other control. how do i go about doing this. how can i call the other control's method from one control please hel
-
- presenting label text or showing dialog
by miscal
- 14 Replies
- Last post
by miscal
- Hi,
My application includes accessing SQL server. The code specifies label text "connecting" BEFORE the connection opening line. in some cases, the lables presented on dialogs "please wait..". Still, since the computer is 'too fast' - the dialog is not shown because the computer reaches the showdialog line and before the dialog is shown it reaches to the connection opening l
-
- passing values within methods in a form
by rookie_rockie
- 4 Replies
- Last post
by Christopher Payne
- hi, i'm kind of stuck.i have 2 methods. and i have declared a byte[] abc in menuItemSnap_Click method. my question is : in another method, how do i get abc that is declare in menuItemSnap_Click method
Code Snippet private void menuItemSnap_Click(object sender, EventArgs e) { CameraCaptureDialog camCapture = new CameraCaptureDialog(); camCapture.InitialDirectory = @"\My Doc
-
- ClickOnce deployment with side-by-side com components
by Bruce Lee
- 0 Replies
- Last post
by Bruce Lee
- I have a simple .net application and a few side-by-side com components. I want to publish my application and the com components via ClickOnce. Everything seems fine, I signed all manifests and the .application file with same certificate and manually publish it to my local IIS. But when I tried to access my application from another computer it failed. The error log is as below
PLATFORM VERSI
-
- System.Windows.Forms.PrintDialog doesn't respond to first time click.
by engloon
- 3 Replies
- Last post
by Yu Guo ¨C MSFT
- Hi. I have a new window application that allow user to print according to their needs. Friend WithEvents prnPrintbot As System.Windows.Forms. With prnPrintbot .AllowCurrentPage = True .AllowSomePages = True End With If prnPrintbot.ShowDialog(Me) = DialogResult.OK Then Dim intStartPage As Integer, intEndPage As Integer, i As Integer Select Case prnPrintbot.Printe
-
- double click datagrid view and get data?
by newbieneedshelp
- 3 Replies
- Last post
by Zhi-Xin Ye - MSFT
- I
would like when the user double clicks the datagridview that
"label2.text" equals the data in the "ID" column of that record. The
code in red is where I have various attempts at doing this with no
luck. Private Sub
WagerAccessDataGridView_CellDoubleClick(ByVal sender As Object, ByVal e
As System.Windows.Forms.DataGridViewCellEventArgs) Handles
WagerAccessDataGridVi
-
- How to Create a Download Update Form?
by Pipz
- 8 Replies
- Last post
by Friendly Dog
- Hello, I want to know how to use the System.Net.WebClient in my application. Here is the part of the code: System.Net.WebClient client = new System.Net.WebClient(); client.DownloadFile("http://updates.com/index.xml","c:\\update.xml"); That would download the file "index.xml" and save it in the local computer in drive C under a new name "update.xml".
-
- need to make the outlook 2007 TODO BAR!
by giddy
- 3 Replies
- Last post
by giddy
- hi , i need to handle tasks in my app and i need to make something like the outlook 07 TODO BAR.... or atleast thats the best thing i've seen so far. basically i need something that doesnt take space on the client area but is easily accesible ,so if anyone has better controls tell me! ok , lets assume i have to make the outlok TODO bar: http://gidsfiles.googlepages.com/outlook_todo.jpg i
-
- List in ComboxBox3 depends on 2 other ComboBoxes - having problem with declaration
by GrahamY
- 2 Replies
- Last post
by Gavin Jin - MSFT
- I have 3 comboboxes containing People, Category, Course, populated from a SQL query
What I need to do is repopulate the Course box, if either of the other two change.
People & Category provide foreign keys for the course table, so in my code to populate the cmbCourse I check the SelectedValue of both the other two comboboxes, and I call this code whenever the SelectedIndex changes.
Pr
-
- How can I use the Visual Basic.Net DLL in C#
by Mkcanada
- 3 Replies
- Last post
by Christopher Payne
- Hi,
I am writing a C# program with Visual Studio 2005,
I have to use a dll which has been written with Visual Basic.net.
How can I use it
Thanks,
MK
-
- ListView text truncated in List mode when columns collection not empty?
by Jeff Stephens
- 2 Replies
- Last post
by Zhi-Xin Ye - MSFT
- This is a very simple (and somewhat silly) problem, but I can't find a solution for the life of me..
I have a .NET 2.0 winform with a ListView control on it. The ListView has columns set up for use in Detail view. However, this causes the text to be truncated when the ListView is in List mode.
This is extremely easy to reproduce. Add a form with a ListView control on it. Set the Vie
-
- How to: indicate changed value in DataGridView?
by tonn
- 4 Replies
- Last post
by tonn
- Hi,
In a DataGridView I need to indicate cells having a value changed by the user. At the moment I use the CellValueChanged event to set the cell font to bold upon a change of value:
private void dataGridView_CellValueChanged( object sender, DataGridViewCellEventArgs e) { DataGridViewCell cell = dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex]; cell.Style.Font = new Font (d
-
- Windows Form and Excel
by erito
- 5 Replies
- Last post
by Derek Smyth
- Hi to all.
I need some help trying to get a spreadsheet in my form (c#). I must to decide between a datagridview or a Excel embebed sheet. I think I will take de Excel sheet because I need to use formulas in cells...
Can anybody explain me how I can use a Excel within a form I was looking for a WebBrowser control
http://support.microsoft.com/default.aspx scid=kb%3bEN-US%3b304662
but I
-
- Is there a function which can disable a control with making the control grey out?
by Luo Cao
- 10 Replies
- Last post
by shahzad77
- When set control.Enable to false, the control will grey out. I just want to disable the control without grey out. Is it possible
-
- Overloading a Form's constructor in VS2005
by j2associates
- 1 Replies
- Last post
by j2associates
- Hello all,
We just recently converted from 1.1 to 2.0. In 1.1 I could overload a form's constructor something like the following:
Public Sub New(ByVal myArgument As String) MyClass.New ' Do something. End Sub 'New
Where do I do this in 2.0
-
- How to select All ListView Items Without Iterating thru Items ??
by logN
- 3 Replies
- Last post
by celobateira
- How to select All ListView Items Without Iterating thru Items
-
- Active Directory software deployment with MSI
by JRuland
- 0 Replies
- Last post
by JRuland
- hi, i am wondering if Active Directory will allow MSI installers to launch executables during the installation. consider this scenario: an administrator wants to distribute a program to 32 compute nodes for large processing jobs. however, he doesn't want to log into every computer to configure the software, so he instead uses Active Directory to distribute the software. the MSI, however, is design