Search results for query: *

  1. P

    What is the counterpart of this C pointer programme in VB.Net?

    Getting same reply from different websites. Don't know if different portals directing to the same website. Nonetheless, I already clarified you, I'm not seeking code conversion. Rather, I'd like to know how the concepts of address-of operator and de-reference operator are implemented in C# as...
  2. P

    What is the counterpart of this C pointer programme in VB.Net?

    I'd like to know how the following programme on pointer written in C can be written in VB.Net, especially how to use the keywords in the C programme like &i and *p in VB.Net. Please clarify. #include <stdio.h> void f(int *p, int *q) { p = q; *p = 2; } int i = 0, j = 1; int main() {...
  3. P

    Question Detecting mouse button down & up events on the system menu of form.

    Here's what I found. Though it's not exactly what I originally posted for but at least it narrows down to my requirement. Instead of identifying separately if the user clicked the Close button at the top right corner of the title bar of the form or the 'Close' option in the system menu, or...
  4. P

    Question Detecting mouse button down & up events on the system menu of form.

    For example, an action may be performed explicitly if the user clicks that 'Close' option of the system menu; and it will only occur if the user has released the mouse button after clicking.
  5. P

    Question Detecting mouse button down & up events on the system menu of form.

    How do I detect left mouse button down and up events on the 'Close' option of the system menu that appears when the mouse is clicked on the top left corner of a form?
  6. P

    Question Displaying MdiChild ToolStrip into MdiParent during runtime.

    Well, I tried it in both ways, appending it to the last line of the Deactivate event along with my code that I posted above and, deleting my one and keeping only yours. Still the same problem occurs. Can you please show how you are doing it?
  7. P

    Question Is disposing a local brush variable necessary?

    MSDN recommends disposing any variable of type System.Drawing.Brush before its last reference is released. Otherwise, the resources it is using will not be freed until the garbage collector calls the Brush object's Finalize method. As we know, local variables are destroyed automatically when...
  8. P

    Question Displaying MdiChild ToolStrip into MdiParent during runtime.

    I have an MDI application containing an MdiParent form and few MdiChild forms. The MdiParent has a fixed MenuStrip, a fixed ToolStrip and a fixed StatusStrip. The MdiChild forms have one or more ToolStrips and a StatusStrip along with other controls in them. The ToolStrips and the StatusStrip of...
  9. P

    Question Elements of a toolstrip witin an usercontrol get deleted when copying/pasting it.

    Got the point. And an extra thanks for that briefing. Unties a load of knots. But you see, as the toolstrip within the usercontrol can be selected explicitly, there's a possibility that the designer can delete it. I was expecting that the toolstrip cannot be handled directly by the designer but...
  10. P

    Question Elements of a toolstrip witin an usercontrol get deleted when copying/pasting it.

    I have an usercontrol that contains a toolstrip. The toolstrip is exposed through the usercontrol by a readonly property 'HostStrip' with DesignerSerializationVisibility.Content attribute. In this way we can handle the toolstrip and its contents from the usercontrol. While using the usercontrol...
  11. P

    Question How to obtain the first line of a multiline text field saved into database?

    Here's a solution I found. Assuming tblOrders as the table and Comments as the field in question, you can use the following syntax to do it: Select SUBSTRING(Comments,1,CHARINDEX(CHAR(13),Comments)) As Comments From tblOrders Please post if you found any other way. :welcoming:
  12. P

    Question How to obtain the first line of a multiline text field saved into database?

    Ok I understand. But in my case the datagridview is bound to either a view or a result set returned by a select query. So the splitting method in .Net will be a little cumbersome. I wanted something to do the same thing on the database side, get the final result set and bind the grid with it.
  13. P

    Question How to obtain the first line of a multiline text field saved into database?

    It's the latter case. If I'm not wrong then you meant to obtain the entire value from the database and then split it in .Net and show in the datagridview accordingly. Is that the way of it?
  14. P

    Question How to obtain the first line of a multiline text field saved into database?

    I have a multi-line textbox whose text is saved into database. Now I need to obtain only the first line of the text to be shown in a datagridview. How can I do it?
  15. P

    WmiSetBrightness method not supported (.Net 4.0, Winforms, Windows 7).

    I'm trying to adjust the brightness (not the gamma ramp values) of the monitor using WmiSetBrightness method but the system throws a ManagementException during runtime saying 'Not supported'. I have seen a lot of people using this concept and running successfully. So what's wrong with mine? Is...
  16. P

    Question How to use an Items Collection Editor on a custom UserControl (.Net 4, Winforms)?

    Hi there! I have been working on the issue for a while, and the two most widely held ideas I got are: 1) Exposing the ToolStrip as a property. 2) Use a ControlDesigner for the UserControl and set EnableDesignMode for the ToolStrip. But somehow none of them actually served my purpose, as...
  17. P

    Question Problem in ToolStripComboBoxItem arrow paint (VS.Net 2010, WinForms).

    Thanks! Was looking for something like this.
  18. P

    Question How to use an Items Collection Editor on a custom UserControl (.Net 4, Winforms)?

    I created a UserControl that contains a custom ToolStrip Control. While using the UserControl throughout an application, the ToolStrip control cannot be accessed directly, as logically it's embedded in the UserControl. So, to access the items of the ToolStrip I defined a readonly property in the...
  19. P

    Question Problem in creating numeric textbox (.Net 4.0).

    Sorry for the delay. The optimum solution with dynamic features. String formatting of the value is something that makes it special from other numeric text boxes. Seems you worked hard for it. Gratitude! :)
Back
Top