Answer Questions
Dietz Data Binding between two tables.
Hello, I have the following problem in databinding between two tables and then populating them on a DataGridView. I have the two following tables: Employees(EmployeeID,Name,Tel, SubSectionID(Foreign Key - integer)) SubSections(ID,Name,Details) I want to populate the Employees table only and i do it as follows: Dim data As New DataSet() data.Locale = System.Globalization.CultureInfo.InvariantCulture Dim TraineeDataAdapter As New OleDbDataAdapter( "Select * from Employees" , conn) TraineeDataAdapter.Fill(data, "Employees" ) masterBindingSource.DataSource = data masterBindingSource.DataMember = "Trainees" This works just fine but the problem is that the S ...Show All
HowardP Stored Procedure shows resultset one pc, not on the other.
Hello everyone. I have been breaking my head over a strange problem all day now. My colleague and I have recently started to develop in Visual Studio 2005. We have a stored procedure on SQL 2000 server called 'searchpartnumbers'. When we start a new project on his system, click on 'add datasource' and select this storedprocedure as datasource it shows it's resultcollumns. We can easily drag it onto a form and in runtime it shows a resultset as expected. see image: http://mailings.infotheek.nl/good.jpg The problem is, when I do the exact same thing on my system, it does not show any collumns. In fact, after finishing the wizard it just adds an empty dataset with one tableadapter in it (which is bound to the stored procedure). ...Show All
alpefusk Synchronization
hello everyone, Hopefully my question is simple for everyone to answers, when I logoff I keep getting the synchronization, does anyone know how to stop that.... David Hi David, This is the wrong forum, Please see http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=152532&SiteID=1 Good luck though, James ...Show All
MIC DA EDY General question - InitializeComponent versus Form_Load
Can someone please tell me the pros and cons of using the InitializeComponent() method vice the Form_Load() method to set up the controls and otherwise get the form ready for user use I'm a VB6.0 "cross-over" to C# and the InitializeComponent method is confusing. I have created several apps that use both methods and this has led me to think I may be using the InitializeComponent method incorrectly. I can still remember that VB had Form_Load and Form_Activate Subs that you had to be aware when a VB app is started. Are the C# InitializeComponent() and Form_Load() methods similiar to the VB6.0 Form_Load and Form_Activate Greg Hi Rhubarb InitializeComponent is analogous to the code that ran in a VB6 form BEFORE y ...Show All
Misoullee Windows Form - Set form size
Hi , I am using VB 2005 Is there any way to set the size of the windows beyond the screen resolution. e.g 3000 x 3000 . I have tried to set it but it keeps changing back to the maximum size of the screen resolution. Thanks You got it. Hi Geert, Thanks for your reply . Can you show me how it is done as I have tried it me.width = 3000 me.height = 3000 Not working Hi, Sorry, my mistake. It is indeed not possible. You can take a look at the post of Gabriel that gives an explanation of the problem: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1058342&SiteID=1 Greetz, Geert Gee ...Show All
CSharpCoder ToolStripTextBox does not displays as multi-line.
Hello, I cannot set a ToolStripTextBox to display a multi-line text, whether programmatically or by drawing it by mouse. Whenever i try to change its Size to a bigger size, it still displays only one line, whereas a TextBox can display multiple lines. Also, there is no .Dock properties to do what I expect. At last resort I could use ToolStripControlHost but it would be be pretty useless because the only thing I want to do is to display a multi-line text, I don't need to expose any methods or properties. Do you have any ideas Thanks a lot The same, it's not working, I think it's inherent to VB, I'm mainly using this because i need proper font scaling, and ToolStrip handles ...Show All
Fabiods DataGridViewComboBoxColumn -> How to update the dropdownList ?
Hello ! I am using a DataGridViewComboBoxColumn (actually for a profile selection), and when I add or remove a Profile, it is added or removed to/from the DropdownList of the Combobox. The problem is that this DropdownList is only updated when I leave the Cell, and return to the cell. How can I update a DropdownList programmaticaly Also, how can I cast a ComboBo from a DataGridViewComboBoxColumn (in order to use the ComboBox methods, instead of accessing to the Cell via myFataGridView.Rows .Cells[j].Value ) Tanks Still looking for the answer :/ No one :( Hi, For your first inquiry, could you provide us with m ...Show All
Alex Krapivin Group policy
Wrong Section i know, but could not find the right one! Can any one help me in telling me how i use group policy to stop the right mouse button working on the start button. I have stopped it working on the desktop, but it will still work on the start tab, and then allow you to explore. Cheers When you right click the Start button, you can select Open, Explore or Find options. To lock down this option, rename the key [HKEY_CLASSES_ROOT\Directory\shell] to [HKEY_CLASSES_ROOT\Directory\shell.lockdown] and rename the key [HKEY_CLASSES_ROOT\Folder\shell] to [HKEY_CLASSES_ROOT\Folder\shell.lockdown] . There is nothing magical about the lockdown extension. Don't delete these keys, just rename them. If yo ...Show All
dagfari Error when binding DataGridViewComboBoxColumn to a datasource
Here's my issue, I have a DataGridViewComboBoxColumn that I want the options bound to a lookup list like such: Dim dgCol As DataGridViewComboBoxColumn = CType(MyGrid.Columns(" Description "), DataGridViewComboBoxColumn) dgCol.DisplayMember = "Description" dgCol.ValueMember = "DescriptionID" dgCol.ValueType = GetType(Integer) If m_ImportFileID > 0 Then dgCol.DataSource = m_DataTable.Select() Else dgCol.DataSource = m_DataTable.Select("IsActive = true") End If And it works wonderfully. Then I want to bind the datagrid containing the above column to a different datatable, which should select a value in a given comboboxcell MyGrid.AutoGenerateColumns = False MyGrid.Columns("Type").DataPropertyName = "Type" ... 'Description co ...Show All
Montana47 Need to make a Basic code editor?
Hie , I need to make a simple html editor.. but much like VS , or dreamweaver i want to display a list of tags according to what the user types.. i dont want to build my own intellisense or something.... i know.. that all i have to do is populate an invisible list via a database ...and then show it when the user types.. BUT 1. how do i KNOW the text the user is TYPING when he has'nt selected it... ....for eg ... if i type <script... how would i get to know this is what the user has typed (i hope i'm clear enough!).I also need to implement color coding. ....should i like run though the whole text 2. How would i get the x , y positions of the cursor... (i'm still new to C# and .NET).... of course i need the X , Y pos ...Show All
Pablo Alvarez Jalon Why using childForm.MDIParent = this not show childForm
I use the following command but it does not run : childForm f=new childForm; f.MDIParent = this; f..show(); If I omit the second command f.MDIParent = this; It run normally I do not understand that because in .net 1.1 they are correct. Please tell me what the problem. Thanks in advance! Hi for this we need to set parent form idMidContainer to true; then childForm f=new childForm () ; f.MDIParent = this; f.show(); I test it works well. hope it help you Hi, what do you mean by "not run", are you getting a compiler error, if so what is the exact error text you got If so did you make sure you set the IsMdiContainer property of you main for to true Mark. Thanks for your reply ...Show All
Maxim Masiutin User control property
cannot change the property from property window of a control added in usercontrol. For eg . i have added a grid to a user control, and changed a propery( for eg backcolor property ) in property window the property changes but when i run it on a form it goes to default ( color ). And also i could not get the collection property from property window. But i can change through code. ...Show All
RPKJBP Where should I put the global variables?
Hi all, First step, I created a simple "Windows Form" Form1 project. There is Form1.h, and I have many functions like click(), paint(), buttom_down()...in it. How to pass the variables between these functions Should I use global variables or they are not recommanded For example: The program tries to get the screen size and pass into image display function I will have scr_width, scr_height, img_src_width, img_src_height, img_scr_width, img_scr_height, Bitmap^ img... What is the good way to set up them And the second step will be, I separate the buttoms and display area, should I use two Forms If so, how do I pass these variables between so many functions in two Forms Thanks! ...Show All
markse 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 I had been wondering about CanFocus too and assumed that maybe this read only property by default returned false and I would need to overiide it in some way and return true. However if ...Show All
JonEagle How to create a multi-selection list view for a touch screen?
I am currently developing an application meant to run on a terminal with a touch screen. I have a list view and I would like to modify it so that every time the user touches an item it becomes selected. If the user touches the selected item again, the item is unselected. It should also support ‘multi-selection’ meaning that if the user touches items 5, 7, 9 and 10 they should all be selected and then if the user touches item 7 only 5, 9 and 10 should remain selected. How can I modify the list view to achieve that Thanks, Dom. Yes. You didn't catch the mouse messages in WndProc. Using OnMousexxx is too late, the ListView control has already done some processing intern ...Show All
