Answer Questions
chrisryp DataGridViewComboBoxColumn Selected Default Value and Item Collection
I have already inserted a ComboBoxColumn in my DataGridView, i want my combobox to retrieve the default data from the database for that particular row, the data can be "Pending, Approved, Disapproved". I managed to retrieve the default value for the ComboBoxColumn by defining the .DataSource, .DataPropertyName but "Pending, Approved, Disapproved" may repeat according to the amount stored in that database column. If i insert "Pending, Approved, Disapproved" into combobox using Items.Add then i can't make use of the .DataPropertyName anymore and the combobox default value will always be the same even i set the value for null value. It seems no matter how hard i try, i can only fulfill one of my design requirements. Anyone can help ...Show All
GazCoder Extender provider and type converter
Hi: I have a problem with the combination in the title of this thread. Background is: - I have a form with multiple controls. All / most of these controls manipulate properties of a certain type of classes - let's call them entities. For example, an entity class has a "price" property, I have a control on the form that maps to that property's value. - to do that, I added an extender to my form that provides a "PropertyMap" property to all of the controls on the form. - I have a base entity class and a lot of inheritors. - On the form I added an "EntityType" property with a type converter. This allows me at design time to build a list of all the entity types in my application and show them as a ...Show All
bazad Datagrid Row Style
Hi, I am using datagrid within windows form. I have applied column styles to each columns. Now I want to change the row style dynamically with certain criteria. I can't find any classes within grid. Any Idea how to change the row style for particular single row dynamically like row backcolor, font color etc. Thank You Mohan I usually use the cellformat event to change the backcolor of a row. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace CSCellFormat { public partial class Form1 : Form { public Form1() { InitializeComponent(); } ...Show All
Harshal Bhakta Embedding Flash into a Form's Panel
I'm using Visual Basic in Visual Studio 2005. Does anyone know how to embed a Flash file into a form panel The Flash file can be .exe, .http, .swf, (also I think .jpeg or .gif) Thanks Use the WebBrowser control, and embed the flash in an html file. Use webbrowser.navigate("C:\file.html") ...Show All
Golden Strands Please suggest a form and dialog box workaround.
I have two forms and they are both MDIs. Form1 calls Form2 and opens it to a new window. Form2 which is an MDI has a menu that can open another form, Form3 for example, in which Form2 is set as a parent of Form3. The problem is that when I set Form3 as a dialogbox, I can't control Form1. What I want to do is that it must only be a dialog box for Form2 and not for Form3 so that I can still control Form1's menus for multitasking. I want to set Form2 independent from Form1. Is there any workaround in this Please suggest a solution to my problem. Thank you very much. ok. thanks for the suggestion. i will try it out as soon as possible. it actually makes sense to make the other form as another thread because ...Show All
The Loiner Arrow Keys on a User Control in .Net 2.0
If I have a form and want to trap keyss, I can use the KeyDown event to trap and detect which keys are used. This includes the arrow keys. However when I want to do the same with a UserControl placed on the form, all keys are detected except the arrow keys. 1.Why do the arrow keys not generate the even on a UserControl 2 Is there a way to make arrow keys generate an a KeyDown or KeyPress event on a UserControl 3. If not, what event if any is generated by the arrow keys on a USerControl Thanks Steve Yes, I was afraid of that and should have asked. You're trying to make a wrapper around that control to give it extra behavior. It is the 3rd party control that gets the focus and ge ...Show All
Ovidiu Padurean How does the designer locate an assembly ?
I can see the topic about locating assemblies at run-time. My question is how the VS 2005 IDE and the Windows Form Designer locates an assembly a design time. I have my own assemblies of components, which I am testing and which therefore do not have strong names and are therefore not in the GAC. I was able to add my assembly's components as Toolbox Items through the Choose Toolbox Items... dialog and by browsing to the directory where the assembles are located. When I create a .Net application and use the Toolbox it appears that the IDE will always know where my assembly is at design time because the full path to the assembly is in the Choose Toolbox Items... dialog. Is this all that is needed at design time to locate an assembly for the d ...Show All
m.schlestein C# Application Deployment
Please enlighten me for the following How could I include the feature for automatic uninstall of my previous application while installing the new deployed setup How could I put the shortcut of my application to the desktop when the installation is successfully completed Can anyone help me Regards Ahmed Sahib Mr.Grant and Rizwan Thanks for your prompt replies. I will go thru it. Regards Ahmed Sahib For a Desktop Shortcut of Your application: I hope you have already added Project Output of some project to the Deployment project. Now in the Left Pane Select the Application Folder Node, In the Right pan you'll see an entry of your project for whic you are creating a setup ...Show All
Stefan Wachter newbie: binded data for date and change the datetime format
Elo... i have a column in dataset with format mm/dd/yyyy 12:00AM (hmm from wat i've read so far mayb this is US format). When i do this... DateTime date = Convert.ToDateTime(dataset.Tables["master_table"].Rows[CurrentRowIndex].ItemArray[15].ToString); xrBill_Date.Text = date.Day + "/" + date.Month + "/" + date.Year; The output is what i wanted ---> eg. 18/1/2007 but the prob is the date is repeated (eg. there are 5 bills...the date from the 1st bill is repeated from 1st bill to last bill) So..i do this... xrBill_Date.DataBindings.Add(new XRBinding("Text", dataset.Tables["master_table"], ColumnName_Master[15])); DateTime date = Convert.ToDateTime(xrBill_Date.ToString( ...Show All
SimonJohns How to create GUI with VB.net and Application code with VC++.net
VB is easy to create GUI but there are many (advance) library in C/C++ such that I would like to cooperate them with in a (.NET)project. You know that you are not limited to the same language in a solution. Create a project for UI(vb) and create a project for Logic(c++,c#). Why dont you segregate your application into 'layers' eg., UI, Business Objects and Data Objects layers In this case, the UI can be designed in any language you want to and same is the case with other layers.. Hope this makes sense... Best Sriram Hi, Generally speaking, .net provides us with a good platform to cooperate with different languages. That's to say, you can write a dll l ...Show All
jk_uk2 Problem with an OCX file in a windows service?
Hi all, I was converting a windows application to a windows service. The problem is with an ocx file. The windows application is using a server.ocx file and I created an instance of that ocx control by drag n drop from tool box in that windows application. Now when I tried to convert that application to a service I couldnot use that ocx file by drag n drop. Then, as an experiment to use that ocx file, I added a windows form in to the windows service project,added the ocx control and handled all the events of the ocx control in that form. Also I added two public functions called Initialize() and UnInitialize() and I called these functions in the OnStart and OnStop methods of the service. Then I am getting the following error in ...Show All
devlinse VS2005 MyApplication_Shutdown not getting fired.
We are developing windows application in VS2005 (VB.Net). I have placed resource clearing and audit entry in the "MyApplication_Shutdown" event. But this event is not getting fired when our application exits. When I tired with the sample application, in our system it works fine. I don't know whether I have disabled any setting so that this event does get fired. Note: I have checked application framework checkbox in application settings. Looking at the WindowsFormsApplicationBase class, the Shutdown event is fired right after Application.Run() exits. Not seeing this event means that Application.Run() doesn't exit normally. The only thing I can come up with: an unhandled exception. Do you trap the UnhandledException event ...Show All
Ariel Erlijman Hardware Information in VB.net 2005
Hi, Are there any good tutorials on retrieving hardware information using vb.net 2005, not 2003 or vbscripts. Any help or pointers would be greatly appreciated. Andrew Robinson. most likely you probably would need WMI as there is not .NET functionality/classes to do what you are asking What exactly do you need to get from hardware information There really isnt a way in .NET, except for say getting information about the drives in your computer (drive type, capacity etc...) I think you may need to use WMI Example: http://www.codeproject.com/csharp/hardware_properties_c_.asp http://windowssdk.msdn.microsoft.com/en-us/library/ms751672.aspx I think the last link will be ...Show All
Muhsin Zahid Uğur refreshing the dataset
I am using OleDb database and I want to refresh the dataset after new items added to database. I searched in the forum i got something but still i am not refreshing dataset. does anybody know I write something to do this, But it doesn't work : DataSet mydatase = new DataSet (); System.Data.OleDb. OleDbDataAdapter myadapter = new System.Data.OleDb. OleDbDataAdapter (); System.Data.OleDb. OleDbConnection conn = new System.Data.OleDb. OleDbConnection (); conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\mydatabase.mdb" ; myadapter.SelectCommand = new System.Data.OleDb. OleDbCommand ( "SELECT imageName AND imageLocation FROM images" ,conn); ...Show All
rnellis2002 MDI Children Problems
Hi, Happy New Year. I am using VB.Net 2005. My windows application has 3 forms which is form1.vb, form2.vb and MDIParent1.vb. Form1 and form2 is the MDI child of MDIParent1.vb. Form1 bind to one datasource. I create a public sub module in form1 – Public sub updateTable() Me.TableAdapter.Fill(Me.DataSet.table) . Messagebox.show(“In updateTable”) End sub When I tried to call form1.updateTable() in form2.vb, it will show the messagebox, but it did not fill by dataTable. Why Besides, I could not access public variable in form1 by directly using its full name, for example, I create ‘ages’ in form1 with ‘Public ages’, yet I will get NULL if try to access form1.ages, i ...Show All
