There are a few ways to start creating a new custom control in VS? Which one should I use? As in:
Right click project -> Add ->
1. User Control, or
2. Component, or
3. Custom Control, or?
I use #1 and get a partial class similar to:
namespace MyControls
{
partial class NewControl
{
/// <summary>
/// Required designe...
How can i remove the tabs from tabcontrol when i reference each tab to the childform.
I am using a tabcontrol, i want to remove a particular tab from the control. The value i have to do this in a string which i dynamically.
How to remove the tab from tabcontrol using a existing tab name which i have in a string ??
I tried something li...
I've been having a hard time trying to get the right answers for my problem. And have spent numerous days searching online and in documentation and have found nothing.
I have a Text File that contains a bunch of text. And on one of those lines inside the file will contain some Font info like this:
Tahoma,12.5,Regular
Note that the fon...
Hello everyone. I have written a Winform application in C#. How can I check the performance of my code. By that I mean, how can I check which forms references are active at a given time or event, so that I can remove them if they are not required (make them available for garbage collection). Is there a way to do it using VS 2005 or any f...
I was attempting to help someone else out and wrote this query:
var foundTab = (from tab in tabControl1.TabPages
where tab.Name == "tabName"
select tab).First();
And they reported that they received this error:
Could not find an implementation of
the query pattern for source type
System.Windows....
Hi,
Is there a light weight version of SQL Server I could use that has the characteristics of:
Free (assuming my winforms app is semi-commercial)
Can be seemlessly packaged for deployment as part of the winforms click-once application? (i.e. ease in installation for the user).
Light weight for the user (ideally something that just ru...
public void CheckUnusedTabs(string strTabToRemove)
{
TabPage tp = TaskBarRef.tabControl1.TabPages[strTabToRemove];
tp.Controls.Remove(this);
TaskBarRef.tabControl1.TabPages.Remove(tp);
}
I am trying to close a tab in the tabcontrol of windows application using the above code and i encountered the er...
hi
I insert this on KeyPress event:
e.Handled = !Char.IsNumber(e.KeyChar);
but i dont have the BackSpace key, how to fix it ?
thank's
...
Thank you for previous answers that enabled to me complete the basic tool that shows large red cross in the mouse coordinates in order to let be more visible. The red cross is an image with transparent background in the transparent form. The problem is that you cannot click through, since its topmost and the center of form is actually p...
I am using TextBoxes's AutoComplete Suggest mode property to make it AutoComplete, What I want to achieve with it is a user can type any word which can pe part of the whole string and based on that It should show me the lookup.
With TextBox AutoSuggest Source set to Custom Source and AutoSuggest mode set to Suggest Mode I can only get l...
Hi,
I was looking about some GDI tutorial but everything I have found so far works with OnPaint method, which passes Paintarguments to Graphics. I have not found how to start from scratch, I mean how to use Graphics class itself?
This is the whole code I have treid that just doesnt work for me:
using System;
using System.Collections.Gen...
I have pasted two function from my code. They are for adding a tab in tabcontrol and removing a tab in tabcontrol. Both the functions are inside the same form where tabcontrol resides.
I am able to add the tabs in the tabcontrol with ease. I am calling AddTab() from a another class. And it works perfectly.
I am trying to do the same th...
I'm creating unit tests for a Windows Forms application. One of my methods is an event-handler for a form (I don't know if this is the source of my problem):
private void ImportButton_Click(object sender, System.EventArgs e)
{
// blah blah
}
Now when I attempt to create a unit test for this method via right-clicking the source ->...
Background tasks being stuff that involves network I/O, disk I/O, or other long-running tasks that may or may not take place over a network. It will often intermix with code that updates the GUI, which needs to be running on another thread, the GUI thread.
Simple meaning that when opening a Form.cs file, the source code is as easy or e...
Ihave an xml file sample.xml
i need to display number from above xml file in a listview named _listView which
contain version column named _version,can you give me the optimized code required to do
that task
...
how to create fixed size thumbnail dynamically and resize image in listview best fit the size of the thumbnail.
private void Treeview1_AfterSelect(System.Object sender, System.Windows.Forms.TreeViewEventArgs e)
{
if (folder != null && System.IO.Directory.Exists(folder))
{
try
{...
Hi, I've a winform and i place a webbrowser control in that form. I'm giving default.aspx as webbrowswer url.
like this
Uri myuri = new Uri("http://192.168.1.1/test/default.aspx");
webBrowser1.Url = myuri;
now i'm storing some values in session (default.aspx page)
but those are now working for me. Every time it is showing null value...
Ihave an xml file sample.xml
<?xml version="1.0" standalone="yes"?>
<DataSchema xmlns="http://tempuri.org/DataSchema.xsd">
<ManagedObject>
<Label>sam</Label>
<Owner>00000000-0000-0000-0000-000000000000</Owner>
<ClassID>00000000-0000-0000-0000-000000000008</ClassID>
<DefaultApp>00000000-0000-0000-0000-00000000000...
In my C#.Net WinForm app in VS2005, I have a NumericUpDown control. In the designer, I set the Minimum property of the NumericUpDown to -65535.
In the form's .designer.cs code, I expected to see this:
this.myNumericUpDown.Minimum = -65535;
but instead I get:
this.myNumericUpDown.Minimum = new decimal(new int[] {
65535,
0...
I have two list that I load when my app starts. The first one loads a complete set of data from the database, the second one independently loads a set of associated data from file.
Each list is loaded into a BindingSource and set as the DataSource for their respective combobox. The data is loading just fine.
The issue is that I need to...