Hello,
I know how to draw straight lines in C#, but I would like to draw a horizontal line, with two colors. Light blue on the top, and dark blue on the bottom. Also, how would I sort of... Append to that line? For example, every few seconds, that line will become bigger... like a ProgressBar. (btw, I'm not creating a ProgressBar, just ...
Guys,
Is there a way to tap windows file drag and drop events using WndProc() ?.
I want to tap file drag and drops from one folder to another in WndProc.
Thanks
...
Hi,
I've heard nice stuff about the NavigateToString() C# method, but i can't seem to be able to use it =(
I have a System.Windows.Forms.WebBrowser in a panel, and when i try to call NavigateToString() it says:
"Error: 'System.Windows.Forms.WebBrowser' does not contain a definition for 'NavigateToString' and no extension method 'Nav...
This is for a Windows Application.
In a class I want to referee to my connectionstring called freighthelper which is located in the settings.settings file in my project. How do I do this?
I have tried with this without success.
_connection.ConnectionString = FreightHelper.Properties.Settings.Default.freighthelper;
...
I have the below code where I am expecting that when the user will press the CTRL +R , the program will be trigger
public Form1()
{
InitializeComponent();
button1.KeyPress +=new KeyPressEventHandler(button1_KeyPress);
}
private void button1_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyChar == (char)Keys.Control...
How can you add text to a RichTextBox control and change the font style as you add text?
...
I have following code in the form_Load function
System.Windows.Forms.Timer newtimer = new Timer();
newtimer.Tick += new EventHandler(refreshinfo);
newtimer.Start();
newtimer.Interval = 20000;
The "refreshinfo" function goes like this:
private void refreshinfo(object source,EventArgs e)
{
// Some code here
}
The function "ref...
For example in Windows Form, you have textboxes textbox0 to textbox29 and you need to assign them all to an array. What I currently can think of is to do this:
array[0] = textbox0;
array[1] = textbox1;
...
array[29] = textbox29;
Is it possile for me to do sth like this:
for(int i=0; i<30; i++)
{
array[i] = textbox + i;
//and so...
i have the js file how can i add that in winform C#,
i have developed the front-end and i want to run the js file on button click.
i will be thankful to u if u provide the snippet!!!!!
I want to run javascript code in windows form
thank you.
...
When you open a new C# Windows Forms Application project in Visual Studio 2008, you get a lot of autogenerated code (AssemblyInfo.cs, Resources.Designer.cs, Settings.Designer.cs, Form1.Designer.cs, Form1.resx, Program.cs).
Beside adding components from the Toolbox to Form1.cs[Design] and code to Form1.cs, what files can you change? And ...
I have a situation like this.
I have the window handle of an application. I need to activate it. I tried all these functions but is not working always.(most of the time , it doesn't work the first time and I'll have to manually click on it to activate it. Second attempt onwards it works fine)
The reason why I am doing this is because I ...
Is there a way to my C# winforms application knows when Date and time settings has changed on local computer.
...
My code to insert data is as follows it works for the first time if i tried to insert data for the second time i am getting the error
My complete code
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace ACHDAL
{
public class EntryDetail
{
int[] debits ={ 25, 26, 27, 28, 29, 35, 36, 37, 3...
Is there any way to get the Form from its Processhandle ?
Some thing like this.
Form form = (Form)Form.FromHandle(_process.MainWindowHandle);
But this is not working.
Thanks in advance
...
When I utilize AddHandler in VB to add my own method to the Click event :
AddHandler Button.Click, AddressOf myButton_Click
I see that my code executes last - after other event handlers for the Button_Click event.
Is there a way to insert my event handler in front of other events so that it executes first?
I tagged this questio...
Can I change the appearance of a Winforms ComboBox so that a Combobox with DropDownStyle = DropDownList looks more like one that is DropDownStyle = DropDown. The functional difference between them is that the former doesn't allow for user entered values, the problem is that it's default color scheme looks grayed out and doesn't match wi...
I have an .net C# winforms application, and I need to add hotkey support, but I want more than the standard RegisterHotKey function, I want be able to support hotkeys like ctrl-ctrl (like in Google Desktop).
Please provide me a direction how to implement this.
edit:
You didn't got it right.
I want the hotkey to work even if my applica...
hi,
i need to set it it dynamicaliy..
Can i make password Box to as normal text-
i mean- user could see the text what he entered.???
its for-> i need to use same control for " password sesion" and also the "item count entering" session ..??
...
How do you select the whole DataGridView row on cell select and disabling the selection of a single cell
NOTE: just like the behavior of a listview
...
Hi,
We are developping a software in c# (WinForm) that use a WebBrowser Control.
We would like to spoof referer but it seems very hard to do it well.
What we did : We just add "Referer: http://www.ourwebsite.com" in the http header when we use WebBrowser.Navigate(URL, null, null, REFERER);
Result : Using this method, on URL, we can de...