I have been a web developer for my entire development career. Nearly 100% microsoft focused the entire time. I have been using .Net, both C# and VB.Net, since beta. I now find myself in a position to where I have the opportunity to start doing some WinForms development in C# using the 3.5 framework. As with anything new, I am excited abo...
I wish to load and use a font to a desktop application in C#. It's that possible without installing the font on the system?
It's a kind of question like this but not from a DLL. I want to load from font file.
...
I have a Windows Forms application that has this code in the program's start up:
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.Automatic);
In the MSDN Documentation for UnhandledExceptionMode.Automatic it states that:
Automatic - Route all exceptions to
the ThreadException handler, unless
the application's confi...
Couple of year ago I when to work for company as web developer. It has my first Sirius web development job, (ASPx/C#) so it has very exciting and I learned a lot about that world, from the developer point of view.
In that group we had a concept for the pages where loaded in the page UC’s (User controls), I don’t know if it’s the same in...
I have a listview with two columns and I'm using a context menu to allow users to remove selected rows. To remove the selected rows, I've tried with the following code but it doesn't work:
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
listView1.SelectedItems.Clear();
}
I suspect this is because the listview h...
Suppose that for every Form in a WinForms application, you want to change the cursor to the WaitCursor. The obvious way to do this would be to add the code to every place where a form is instantiated/shown:
Try
Me.Cursor = Cursors.WaitCursor
Dim f As New frmMyForm
f.Show()
Catch ex As Exception
Throw
Finally
Me.Cur...
I posted this answer (more of an idea really) but haven't been able to find out for sure which message triggers a WinForms Form.Load event. From Spy++ and some reading I suggested it might be WM_SHOWWINDOW, but I'd like to be sure.
Also, other than Spy++ is there a better way to see exactly which windows message triggered a .Net event?...
I have a tool strip which contains a ToolStripDropDownButton. As an alternative access method, I would also like to be able to display this button's dropdown menu as a context menu, when the user right-clicks in the area below the tool strip.
I tried the following code, but it didn't work (it displayed the button's dropdown in the norma...
How transaction should be handled while using Unit of Work pattern in a WinForm application
Should new UOW session be created when form is initialized?
Disposed when form is exited?
call UOW.commit() in every save?
Please advice
Any articles on this topic??
...
Hi All,
I want to bind TextBox's Text property to FolderBrowser's SelectedPath property. But it's not working, I don't know why. Please help me out why it's not working?
...
I wish to declare a variable in such a way as it can be assigned only values which derive from Control and also implement the ISomething interface.
I intend to add the ISomething interface to derivatives of controls.
I would like to derive SpecialTextBox and SpecialDatePicker From TextBox and DatePicker and implement the ISomething in...
Hi,
I'm using VS 2005 in a VB.Net WinForms application. I have a custom User Control that requires a variable to render its data correctly. My question is, what's the best way to require the calling sub to populate the variable? I've thought of a couple of options:
Have a WriteOnly property and check to see if it is "Nothing" when ...
I'm looking for a control for C# that can contain other controls, takes care of layout and allows drag and drop rearranging of the layout order.
Simularly to the way the iphone/ipod allows you to rearrange apps.
Thanks.
...
In Visual Studio when you click the Auto-hide thumbtack looking icon the window will collapse into a band that has buttons for each hidden window for the docking area.
I've seen this in other apps so I assume its a control that I haven't found or figured out how to use yet.
...
I'm doing the GUI for a paint-like program, where the user will be able to select a drawing tool from a ToolStrip. Some of these tools have variations, and I'd like the user to be able to select one via a popup menu.
Anyone familiar with the Photoshop toolbar interface will know what I'm after: the user can either click the button and s...
I'm creating a cursor at runtime from a image resource. The HotSpot of the new Cursor is always set to 16x16 (32x32 image). Is it possible to change the HotSpot at runtime or will I need to create .cur files?
...
I've written a Windows Forms application to solve Shikaku puzzles. At the moment, the puzzle grid is drawn on a Panel in the app's main window using a PaintEventHandler. The method called by the PaintEventHandler redraws the entire grid every time it is called. Whilst this approach works, it is flickery and inefficient, and I would li...
A couple of months back I started a relatively simple C# app which I was compiling with Mono.
I try to resume work on this today, and despite having an executable proving it compiled fine before, it is now complaining about System.Windows.Forms
C:\Program Files\Mono-2.0.1\bin>mcs
../projects/test_1/test.cs
../projects/test_1/tes...
Hi,
I have to create a project in C# in which i have to create a XML Tree View, select a xml file from hard drive(System) it is displayed as Tree View on winform.
When a user selects a particular node/element in the tree view,its attributes and values have to be displayed in list box and text box respectively.
Till now i have done a pa...
I have a custom winforms control (inherits from Component) that has some strings displayed to the user.
How can I make these strings accessible so the user of the component can customize them, and - if he wants - easily put them into a resource for localization?
I thought of exposing them as browsable properties so they can be customi...