Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008


all groups > dotnet windows forms > march 2004

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Adding a control programmingly
Posted by william at 3/31/2004 9:21:11 PM
Hi, everyone After adding a control into a container like form using form.controls.add(myControl), how could I reference it For example dim aControl as new butto me.controls.add(aControl then I want set backcolor of this button, how Thanks william...more >>

Printing "x" pages per sheet
Posted by benboris78 NO[at]SPAM yahoo.com at 3/31/2004 8:19:47 PM
Hi All, In c# or vb.net, when i throw the print Dialog, is there any way i can retrieve the value that the user has chosen for the pages to be printed per sheet? for e.g. in the "Layout" tab of the print dialog, there is an option which says how many pages needs to be printed per sheet. Bu...more >>

Error accessing .config file when using manifest file
Posted by Jan Hornych at 3/31/2004 7:11:09 PM
Hi, my program is written in .NET as a classic desktop application. I moved the application to a fileserver now. The server is in the same network, I can start the application like \\192.168.1.20\myDir\myApp.exe (I configured .Net Framework permissions to Full Trust for URL file://192.168.1.20/*...more >>

How to get the handle of a control after adding it programmingly
Posted by william at 3/31/2004 7:11:07 PM
Hi, Guys After adding a control into a container programmingly, for example, myForm.controls.add(myControl), how can I reference this control in my code Thank william...more >>

ListBox databind to DataTable
Posted by Greg at 3/31/2004 6:23:49 PM
I've got a DataTable I'm trying to bind to a ListBox. listBox.DataSource = dtCustomers; listBox.DisplayMember = "customer_name"; listBox.ValueMember = "customer_id"; The returns my all the rows in the DataTable but in the ListBox all the items are "System.Data.DataRowView". What am I ...more >>

Using ADO dataset
Posted by Atif - Alghanem at 3/31/2004 4:53:13 PM
hi, I need to use a dataset without binding to a text box. i need to move value from dataset to textbox manually. does anyone have any sample for this. Thanks and regards atif ...more >>

CodeDom Problem -- Would It Kill You Nitwits to Document Stuff?????
Posted by Mark Olbert at 3/31/2004 4:51:21 PM
Flame on. I am SICK and TIRED of the incredibly LOUSY documentation that Microsoft provides for creating custom components. Here's my situation: I've implemented a custom CodeDomSerializer class to handle serialization of my component's state to and from the InitializeComponent() method. ...more >>

WithEvents keyword gone!
Posted by John at 3/31/2004 4:11:07 PM
Hi, all I got a problem when I create a custom control. I created a custom Button and it works just fine. But the Windows Form Designer always remove the WithEvents keyword of my object declare. If I manually add the keyword, it works for a monent and it will automatically gone after some time. W...more >>



Exception from static method
Posted by Saurabh at 3/31/2004 2:47:23 PM
Hi All, I have an application which has certain preferences stored in a file. The general architecture of reading these preferences is, There is a preferences accessor class (Preferences) which has 2 static methods GetValue and SetValue. My application accesses the preferences through this cla...more >>

Detecting Installed Applications
Posted by Steve C. Orr [MVP, MCSD] at 3/31/2004 1:55:03 PM
From my application that I will be widely deploying, I have several applications that I need to check for programatically to see if they are installed or not. I also need to get the path to these applications. After searching through the registry, I don't see any single place that holds this i...more >>

opening the default web browser
Posted by Paul M at 3/31/2004 1:09:31 PM
how can i open the default web browser, from my vb.net windows app? thanks, ...more >>

Two-way Databinding with Custom Control
Posted by sandman at 3/31/2004 11:41:11 AM
I've created a custom control that inherits from TextBox. Everything has worked fine up to now. I bind a typed DataSet to my control and when I fill the DataSet, the appropriate record is loaded. I call BeginEdit on the row. Then I change the data in my app, and call EndEdit for the row. But when ...more >>

Windows Application
Posted by CV at 3/31/2004 11:37:57 AM
Hi, I have an application developed in vb.net. I would like to distribute the application in a CD with auto run. If the target system doesnot have the frame work installed, then the frame work should be installed automatically. I will include dotnetfx.exe in the same folder where setup.i...more >>

Real Challenge!! Capture KeyPress and Text from other Applications
Posted by DraguVaso at 3/31/2004 10:49:46 AM
Hi, For a telephony-application I need the following: When the user presses F10 in whichever application (Word, Excel, Notepad, Custom made Applications, ...) my program has to capture this, and go look in that application and select the telephone-number the user has put his cursor on. I...more >>

ListBox Item Value
Posted by Frank at 3/31/2004 8:06:31 AM
How can I get the value property from the item collection in a ListBox control. I know I can get the selected value with listBox.SelectedValue, but how can I get the value property of all the selected items? I would like to loop through the list and look and the values. I wish somet...more >>

vbc.exe error
Posted by Nate at 3/31/2004 5:11:10 AM
I'm having a problem when trying to compile a user control from the command line. I know I have the path mapped correctly but it immediately throws the error "vbc is not a valid Win32 application". This is driving me nuts N...more >>

How do I freeze DataGrid's Columns?
Posted by RV at 3/31/2004 4:31:07 AM
Hi I would like to know if anyone knows how to implement the funcionality of freezing columns of a datagrid (like in excel for eg.) Thanks ...more >>

PadRight generating error
Posted by AdrianFriend at 3/31/2004 2:11:09 AM
Hi Al Hopefully this is will be quite simple to answer !!! The following code produces the error "Object reference not set to an instance of an object Dim objStream As StreamReader = New StreamReader(strFileName Dim objStringBuilder As StringBuilder = New StringBuilde Dim strLine As Strin ...more >>

to work with oracle..
Posted by pavana at 3/31/2004 12:46:09 AM
hi frineds. Recently i baught .net enterprise developer licence. I baught this licence to work with oracle database in windowsforms.I instaleed this and still i couldn't access oracle databasde.Could you please help me out regarding this.I worked with sql server in the "stadered" version. But ...more >>

How to display the tooltips when a textbox get focus
Posted by Kenneth at 3/30/2004 11:41:05 PM
H I have created a class to inherit the textbox. Beside the mouseOn event, I want the textbox show a tooltip when the textbox is got focus by using the keyboard's TAB key. How can i do it by using VB .NET Thank you...more >>

Windows 98 problem
Posted by Paul K at 3/30/2004 6:06:07 PM
I am having a problem with two different applications developed under 1.0 The first is a simple wizard-based app that takes the user through a couple of steps. I have the only form set to start up in the center of the screen, but on Win98 (OSR1) it doesn't (newer os's are okay) The second is an...more >>

Data Binding Problem
Posted by YK at 3/30/2004 5:31:07 PM
Hi I have defined my business object OrderItem as shown in the sample code fragment below public class OrderItem public event EventHandler UnitPriceChanged private decimal m_unitPrice = 0.0m .. public decimal UnitPrice get { return m_unitPrice; set ...more >>

drawing an elipse around some text
Posted by ian at 3/30/2004 2:48:07 PM
Hello, does anyone know how I can draw a ring (it needs to be an elipse) around some text. (The text is three characters long) Thanks. ...more >>

sideways text ??
Posted by ian at 3/30/2004 2:04:54 PM
Hello folks ! can anyone tell me how to draw some text that is on it's side going up the page ? Thanks, Ian. ...more >>

Garbage Collection
Posted by Michael Hart at 3/30/2004 2:04:21 PM
I have a form that creates new objects in all sorts of fashion using vb.net. Some are created when the form opens with Private varName as new Object() just near the form class In some subs I have Sub Internal1() Dim myVar as new Object() End Sub in the declaration section ...more >>

ASCX
Posted by A-PK at 3/30/2004 10:50:00 AM
Hi, I have notice some file with extension *.ascx Could someone tell me more about it. I am currently got a fully done web project, but the files with extension *.aspx Is there any way to compile such file to *.ascx. Or perhaps someone could tell me how to create *.ascx some useful referen...more >>

how to get value from Dialog Form?
Posted by bg at 3/30/2004 10:43:02 AM
Hello, I have two froms. One is main. the other is opened from main by Dialog style. I want to pass value(e.g. grid cell value) from other form (ShowDialog) to main form. How can I do this. thanks burhan ...more >>

Single instance of App...
Posted by Dilip Krishnan at 3/30/2004 9:42:56 AM
Hi, I was wondering if there was a way to make sure only one instance of an app is running in memory in C#. To explain my point... Consider an application like Winword, it only runs once in memory and every time one opens winword a new document is opened but the same instance of Winwo...more >>

Recording WAVs
Posted by Brian K. Williams at 3/30/2004 9:06:16 AM
Does anyone know where I can find any reference or code samples on recording WAV files using C#? Thanks in advance.. Brian K. Williams ...more >>

Win Sockets Error
Posted by T Cordon at 3/30/2004 8:24:58 AM
I am getting this error while using GetHostbyName. (11004) The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for. How can I deal with this. I know the domain exists. Thanks ...more >>

Splash Screens
Posted by Andy Woodward at 3/30/2004 12:21:09 AM
Hello all I would like my Windows Forms C# application to exhibit the following behaviour 1. Display a Splash Screen, topmos 2. Display the main application MDI window behind this. Make sure it is properly visible 3. Load database data, etc. A relatively time consuming task 4. Remove Splash S...more >>

Is there an easy way to parse a path to get to just the filename and extention?
Posted by GreenHornShabaz at 3/29/2004 10:11:05 PM
i can do this using split as well as other ways, but i would think that there is an easier way to get to just the filename.ext from a rather long path. it's been a while since i pounded code but i remember at one point, there being functions for such a purpose. i looked through the .net stuff and ha...more >>

How do I mask the input of a Text Box in VB.NET
Posted by Bob at 3/29/2004 5:34:35 PM
I am using a standard VB.NET Textbox to allow the user to enter a SSN in a windows form which I submit to SQL Server. I would like to mask the input so the format is of 999-99-9999 to limit bad data entry. Is there a way to do this? ... ...more >>

~~ Creating Dynamic Controls in Windows Forms
Posted by c#wonder at 3/29/2004 4:51:29 PM
Hello, I'm buildig an application that wil allow users to create their own forms. In the form builder the aim is to allow them to pick from 3 ro 4 predefined types of windows controls ( i.e. text box, list box e.t.c. ) I believe the easist way would be to create 4 custom controls tha...more >>

OnClosing is not called when I press my window 'X'
Posted by ebascon NO[at]SPAM hotmail.com at 3/29/2004 4:33:19 PM
Hi everybody: I have a dialog class inherited from Form. It has several list views that are populated by several threads. My problem is that my overridden OnClosing(CancelEventArgs e) method is not called while the threads are populating my window. I also have one "Cancel" button. My butt...more >>

exception after using HttpWebRequest
Posted by z. f. at 3/29/2004 3:59:32 PM
my system runs Windows2000 server with sp4, dot-net framework version = 1.1 (1.1.4322), Visual Studio 2003 (7.1.3088), making a windows application in C# that uses HttpWebRequest and brings = data, after about a minuete from the end of the response, while the = window stays open, i get exception...more >>

Filtering items in a listview
Posted by Timothy Parez at 3/29/2004 12:57:09 PM
Hi, I have a listview in "detail" mode with several columns. But because the number of items displayed is rather high, I would like to provide a filter For example allowing the user to filter on the text of the second column If he would then type 'AC in a textbox the listview would show o...more >>

Combobox quirks in Mozilla
Posted by Davindra at 3/29/2004 11:43:28 AM
Hello, sorry if this is posted in the wrong area, but any help and/or direction would be appreciated. I have a combobox on a form that is bound to collection. The collection however starts off empty, and as the user manipulates data, values are added and removed from the collection. The com...more >>

Deploying XML
Posted by JezB at 3/29/2004 10:10:56 AM
I've added an XML file to my project, with data in it, but when I BUILD the project the xml file seems to be compiled into the executable or one of the DLLs. I want the XML file itself placed into the assembly so that when deployed it can be edited by the end-users - a kind of application config...more >>

DataGrids - column width
Posted by Mark at 3/29/2004 5:51:08 AM
I am populating datagrid dynamically. How can I adjust column widths?...more >>

Store Global variables in a hashtable
Posted by sunil NO[at]SPAM volcanomail.com at 3/29/2004 4:19:39 AM
Dear All, I am designing a WinForm Application and would like to keep track of all the Global variables declared in my application. The logic for this that I have in mind is to create a class that has a hashtable and all application programs store their variables in a hashtable by calling my ...more >>

Problem with winforms
Posted by Paul K at 3/29/2004 3:41:06 AM
I am having a problem with winforms in C#. When I run the release build of an app that I have finished, the app takes an excessive amount of time loading and switching between forms (mdi). I know there are several routes I can take to deal with the loading time, but I am really confused about the ...more >>

Is there an AutoScrollPositionChanged event?
Posted by Guido Kraus at 3/28/2004 10:15:20 PM
Hi, I have a panel with AutoScroll set to true. The contents of the panel is large enough to show the vertical and horizontal scroll bars. Is there a possibility to get an event whenever the user scrolls horizontally or vertically? The problem is that I want to synchronize the scrolling wit...more >>

How to Run code After Form_Load
Posted by Lynn at 3/28/2004 6:27:21 PM
I need to auto paint line at Form_Component(Ex: button, RichEdit, etc....) I write code in Form_Load, the code run before the Form showing, so it can't paint at Form_Component How to Run code after Form_Load(mean after the Form showed)...more >>

how to call a function after Form_Load
Posted by Cheng at 3/28/2004 6:15:12 PM
hi i have written a function that can paint some graphic on a windows from, But how to call that function after the windows from is loaded. (it mean that the windows from will show on the screen first, and then the function start to show graphic) thank you :P ...more >>

bug in HttpWebRequest?
Posted by z. f. at 3/28/2004 2:56:59 PM
using HttpWebRequest to make HTTP request t web server and get resulting HTML in the response, when the response includes hebrew characters (not unicode) these characters are moved away after StreamReader reader = new StreamReader ( response.GetResponseStream() ); strHTML = reader.ReadToEnd();...more >>

Problem changing tabs in tab controll from thread
Posted by Steve Bonner at 3/28/2004 12:08:22 PM
I have a simple windows form app written in c# that contains a tab controll with two tabs. When the app starts, it spawns a new thread which checks a file every couple of seconds, if the file changes, the thread changes the selected tab in the main form. In the form, the tab changes, but does ...more >>

Setting FocusedItem in ListView ( C# )
Posted by vakilzadeh NO[at]SPAM kzlabs.com at 3/27/2004 8:07:47 PM
Hi: I would like to make sure listview top item is the current item and has focus reticle, after scrolling. But the FocuedItem is readonly and using SelectedIndices or selecting item using selected property has no effect. Thanks A.V.Ebrahimi vakilzadeh(AT)kzlabs.com...more >>

Communicating with a non-modal child form
Posted by Jan Roelof de Pijper at 3/27/2004 4:22:04 PM
I am fairly new to C# and I want to do the following: I have a main form and have added a second form, frmScreen, to the project, which contains a button and a TextBox control. In my main form, I create an instance of this second form and show it, like so: Form frmMyScreen = new frmScreen( ); ...more >>

How do I detect the instance of another app running and then shut it down?
Posted by Aaron Ackerman at 3/27/2004 4:00:30 PM
I have a helper app that runs in conjunction with my Main app. I want to check to see if the main app is running once I intiate the helper app and shut the Main app down if it is open. ...more >>


DevelopmentNow Blog