audreynsarah's Q&A profile
Windows Forms ToolStripButton - Form requires focus
Hi, a form always requires focus for the ToolStripButtons to work. How Can I change that so I can directly click on a ToolStripButton when the form doesn't have focus Thanks, Tom Tom Frey wrote: Hi, a form always requires focus for the ToolStripButtons to work. How Can I change that so I can directly click on a ToolStripButton when the form doesn't have focus Thanks, Tom I don't think that's directly possible with the .NET ToolStrip control. It won't be handling any messages if the parent form is not in focus. You could try catching mouse messages in the parent form, and if the mouse is ov ...Show All
Windows Forms Maximinze Problem in MDI
Hi, How can we restrict user to maximize a windows form in MDI application. Although we can disable Form control box, but when user double click on Form Caption, it get maximized. Can anybody solver this problem. Thanks Hi, Or you could just copy your form's current size and paste it in the Maximum Size property in the properties window... cheers, Paul June A. Domag ...Show All
Windows Forms Question about ClickOnce
My scenario is the next: I deploy my application to my clients with ClickOnce, but my clients can modify the code of the application (adding new attributes to the classes), and can personalize the user interface. How I can deploy a new version of my application to my clients without breaking the changes of my clients I need help. ...Show All
Visual C++ ATL LNK2005 in VC++ Express
Is there anything special I need to do to have ATL working I have it as an include and have an stdafx.h include. I have compiled, linked and run this same code as one long source program but trying to modularize I get the LNK2005 for each routine other than the _tmain. angsepn.obj : error LNK2005: _AtlIPersistStreamInit_Save@20 already defined in _tmain.obj angsepn.obj : error LNK2005: _AtlIPersistPropertyBag_Save@24 already defined in _tmain.obj angsepn.obj : error LNK2005: _AtlGetObjectSourceInterface@20 already defined in _tmain.obj These look like ATL code but I'm so new to Windows programming, I'm lost. Thanks ...Show All
Visual Basic DbNull date
In my VB6 code I had: If isdate(txtdate.text) then rs![DTE] = cdate(txtdate.text) else rs![DTE] = vbNull endif After converting to VS2005, it appears I can no longer set a db field to DbNull. I get this error ''UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"' rs.Fields("DTE").Value = System.DBNull.Value Any thoughts I went to the URL specified and it was no help to me. ...Show All
.NET Development Taskbar resize notification
Hi All I have a windows Form based application which is developed using C#. My problem is, when my form is not maximized and the taskbar is dragged up, my form does not adjust its size automatically as other applications do. But if my form is maximized and I drag the taskbar, it resizes itself accordingly. My form has several panels inside it. Is there a way by which I can find out in my form if the taskbar has been resized. I have tried using SPI_GETDRAGFULLWINDOWS and SPI_GETWORKAREA to get the working area size and repaint my form in OnPaint override. But that does not seem the right way to do it. Is there a better wa ...Show All
.NET Development FTP list result
Hi, I'm retrieving a detailed list of files into a string array via FTP. Each item in the array looks something like this "drwxr-x--- 3 vincent vincent 4096 Jul 12 12:16 public_ftp". What would be the easiest way to break this info down and put it into the relevent columns on a listview control(name, date, attibutes etc). I'm really stuck on where to start. appreciate any help Chris Here are some methods we use: public class ServerFileData { public bool isDirectory; public string fileName; public int size; public string type; public string date; p ...Show All
Windows Forms DataRepeater vs DataGrid
Hi, Can some one enlighten me about the differences between DataRepeater and DataGrid. Thanks a lot. Chnadrasekaran K Can some one enlighten me about the differences between DataRepeater and DataGrid. need some more info ...Show All
.NET Development Exception with System.Type.GetType(...) function
Hello all, I have a strange problem with the System.Type.GetType(...) function. When I do : try { string maChaine = "System.Windows.Forms.Button"; Type ty = Type.GetType(maChaine, true); } catch (Exception ex) { label1.Text = ex.Message; } An exception raises ; the message is (I translate ...) "Impossible to load the type System.Windows.Forms.Button from the assembly WindowsApplicationXXX, Version xxx, ... Why this exception Have you an idea One way might be: Assembly winForms = Assembly.Load("System.Windows.Forms); Type button = winForms.GetType("System.Windo ...Show All
Windows Forms How to Delete Records from Sorted DataGrid, , Programmatically
I have a Delete button on a form and a datagrid (forms). When I sort the datagrid and run my Delete Routine, I end up deleting with reference from the row number. So if A (which it's absolute positions in 2) is sorted and is now in row 10, when I delete it, it removes which ever was in row 10. How would I get the absolute row position of a row in a sorted datagrid It seems like the ticket but what datagrid event should I use to detect which column has been sorted, and whether it's sorted ascending/descending ...Show All
Smart Device Development NumericUpDown only work with Int16 values
Visual Studio 2005 (not a beta version) Somehow I can only use Int16 values in CF NumericUpDown. On the desktop I can use any values. If I input 100000 in the NummericUpDown1 then the Textbox1 recives the value of -31072. Any value input in NumericUpDown, that is greater than MaxInt16 will convert to an Int16 value. Am I missing something here I MSDN help I can only find that NumericUpDown should support Int32. private void button1_Click( object sender, EventArgs e) { Int32 v = Decimal .ToInt32(numericUpDown1.Value); textBox1.Text = v.ToString(); } Regards Per Andersen No ...Show All
Windows Forms Icon don't visible in Listview
Hello, i have problem In my programm i fill a listview with items and assign a icon from a imagelist. It works fine but: If i enable VisualStyles with Application.EnableVisualStyles(); then no icon is displayed. But if add items at design time than it works with both enabled and disabled VisualStyles. The code for adding Items: SqlDataReader sr = this.GetReader(DBQuery); &nb ...Show All
Visual Studio Can't edit macros in Visual Studio 2005 standard edition
I just installed visual studio standard edition and was trying to edit a macro from the samples. However when I select edit, I get the following error: "Interface not registered". What gives Is this feature not available in standard edition I got the same error from the beta version. Did you completely uninstall Beta 2 from your machine following the Beta 2 uninstallation steps http://msdn.microsoft.com/vstudio/express/support/uninstall/ Neil ...Show All
Visual Basic Generic Collections In vb.net 2005 Help
Hi, Getting to grasp with Generics.Could somebody help as follows: In vs 2003 I used to write strongly typed collections now I could simplify it all with generic. I am trying to write some base collections What is the difference between inheriting from collectionbase and list I have tried to implement the IEnumerator in my collection but the for each still doesnt work Can somebody provide a good example of collections using generics implementing Ienumerator,and explaining the diff between List and collectionBase Possibly in vb.net 2005 beta 2 Also some example of dictionary could help thanks a lot ...Show All
Windows Forms Dynamic loading of UI controls
Are there any good articles out there on packaging up UI into control library and dynamically loading them into a main shell. With the main windows being a .NET executable and the UI library a dll. Thanks Pat JCasa - It will probably be more work to do the merging yourself - as I believe you'll have to add/remove items, but it hopef ...Show All
