I'm using a RichTextBox to display an RTF file, which includes a single hyperlink. The link text is not a URL (the target is a valid URL). The RTF was created with Word. Both Word and Wordpad properly recognize the links (Wordpad does not launch the links, but shows the appropriate hand cursor).
When I load the RTF into a RichTextBox th...
I want to have a NotifyIcon in the system tray that when clicked, opens a context menu on the NotifyIcon with several options that open different forms.
I have read I need to use a ContextMenu and after Google'ing and trying out various code I can't seem to get it working :/
Any help on the matter is greatly appreicated.
...
Hi
I am looking for some way to consistently test a .Net windows app i am working on, I need to be able to test the GUI and not so much the business logic. Any suggestions welcome.
...
Hi, I am using Clipboard object to play with data copied to clipboard. Lets say I have few application from which I can copy data to clipboard like excel,notepad,etc.
I want to know is there any function or is there any way to find out from where the data is captured in clipboard example is it coming from excel or notepad or from some u...
Is there a way to set the columns to be on the left of side of a listview instead of on the top? Thanks.
...
I have a XML file with my data in it. I want to populate the drop down options in a combobox with 2 of the fields in that xml file - FirstName and LastName.
In the xml document I am using GUID for the unique ID format, so the combobox dropdown would need the FirstName + LastName for each unique GUID variable.
What I have so far is the ...
Hello,
I've to insert a new Row(user) into the Database using SqlDataAdapter.
I also have to edit any desired row (whose PID is given).
Problem is that both of them are not working.
I've Created an Array of selectQuries[] with quries of the form
for INSERT: "SELECT X,Y,Z FROM TAB1 WHERE 0=1".
for Editing: "SELECT X,Y,Z FROM TAB1 WHER...
I have a strange one.
Create a new form. Then add the following function :
protected override void OnLoad ( EventArgs e )
{
if ( _goWrong )
{
this.MinimumSize = new System.Drawing.Size ( 420, 161 );
this.Font = new Font ( "Tahoma", this.Font.Size, this.Font.Style );
}
TextBox box = new TextBox ();
this.Controls.Add ...
Hi,
I have a winforms project and I need to open another form on the click of a button on the main form (Form1).
What is the c# to do this?
Thanks
...
I am writing front end app that connects to a DB and downloads any package it needs for a specified project. The user should be able to close the app which will not start any more DLs and wait for the current to finish and an option to forcefully close which will disconnect the current download and quit.
The files i am downloading may b...
In my C# application, I have two ListBox controls.
One ListBox, named lstCategory, is populated with items retrieved from a database.
The other ListBox is named lstSelCategory.
I want to move the selected items from lstCategory into lstSelCategory, and then sort the items in lstSelCategory. How might I go about doing this efficiently? ...
MediaElement doesnt work for me in my WPF application.
mediaElement1.LoadedBehavior = MediaState.Manual;
mediaElement1.Source = new Uri(@"C:\Music\MySong.mp3", UriKind.RelativeOrAbsolute);
mediaElement1.Play();
When I do this in my Window1.xaml.cs file. Nothing happens. Atleast I cant hear anything. I have tried all kind of different ...
Hello,
Normally you use Form.Visible to check if Window is visible at all. But sometimes on the screen window is below other windows so it's really invisible.
So how to check in c# Windows Forms if window is really visible or not?
I would like to accomplish this: when I click CTRL+K on my keyboard and my window is visible on my screen...
I have a UltraWinGrid that is bound to a DataSet, in which a couple of columns are themselves of a collection class type, like so :-
[Name] - string
[Description] - string
[Components] = List<Component>
[Levels] = List<Level>
Currently, these last two fields are hidden columns when bound to the datagrid and used to d...
Hi,
I would really need to programatically click on all nodes in the collection, but I cannot see the way how to do it. I end up with trying to call Node_Click event but I dont know how to use arguments. Thank you for your help!
foreach (TreeNode node in treeView1.Nodes)
{
//here I would need to "click" on each node
...
Hello,
I have a vb.net Winforms application. I also have a compiled help file (chm) file that I created using RoboHelp 6.0.
I want to open to a specific help topic and so to do that I am using the following code.
System.Windows.Forms.Help.ShowHelp(Me, "MyHelpFile.chm",HelpNavigator.KeywordIndex, "MyTopic")
Of course I am using var...
I'm using VS2008 and I created an app with a login screen. That screen is no longer needed, and I can't figure out how to change what form loads on startup?
Thanks
...
I was handling yet another KeyDown event in a user control when I wondered if it existed a library for typing fluent code for handling event like
editor.When(Keys.F).IsDown().With(Keys.Control).Do((sender, e) => ShowFindWindow());
Does that exist?
...
Despite me working with C# (Forms) for years, I'm having a brain fail moment, and can't for the life of me figure out how to catch a user typing CTRL-C into a textbox.
My application is basically a terminal application, and I want CTRL-C to send a (byte)3 to a serial port, rather than be the shortcut for Copy to Clipboard.
I've set the...
I can't quite think of how to phrase the question to be precise, but hopefully my meaning will be clear. Do Control.SuspendLayout and Control.ResumeLayout keep count?
To put it another way, If I call SuspendLayout twice, and ResumeLayout once, is layout still suspended?
...