- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 7
- Posts with Downvotes
- 4
- Downvoting Members
- 7
What happens is when the dialog comes up, if I press cancel it opens "c:\\text.txt" How do i make it so that if i press cancel the program reads nothing (it reads "c:\\text.txt" right now) SaveFileDialog [code] private void button38_Click(object sender, EventArgs e) { string l_text; string l_filename = "c:\\text.txt"; … |
|
When i drag and drop a file into my form it should give: textBox1.text = the file name (i dont have it, i need it can you help me get it) textBox2.text = file location (already know how to acquire it from a drag/drop) I want the actual file name, … |
|
[img]http://i15.photobucket.com/albums/a389/bullzeye10/SM.png?t=1291510924[/img] that is my program. its pretty self explanatory but what i want it to do is that if someone right clicks a file, (see following image) it shows an option to add it as a shortcut to my program. So if a person would right click -> add as … |
|
[code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; using System.Xml; namespace Shortcuts { public partial class Form1 : Form { public Form1() { InitializeComponent(); } public string FileLocationToRun; private void button1_Click(object sender, EventArgs e) { OpenFileDialog fdlg = new … |
|
How do i add a row to a data source (datagridview)? dataGridView1.Rows.Add(textBox2.Text, textBox1.Text); that gives me an error saying: Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound. my datasource: [code] XmlDataDocument xmlDatadoc = new XmlDataDocument(); xmlDatadoc.DataSet.ReadXml("Filepath"); DataSet ds = new DataSet("Books DataSet"); ds … |
|
I have embedded a font SUCCESSFULLY into my program. It works on my computer and on the majority of other computers (all of different versions of Windows OS) HOWEVER For some reason, on some computers, the unicode characters (which normally show up just fine) show up as blanks... Instead of … |
|
[code] { private PrivateFontCollection MyFonts = new PrivateFontCollection(); private Font messageTextFont; [/code] [code] public Form1() { InitializeComponent(); // get the message text font byte[] fontResource = XboxLiveBioCreator.Properties.Resources.ConvectionRegular1; GCHandle fontHandle = GCHandle.Alloc(fontResource, GCHandleType.Pinned); MyFonts.AddMemoryFont(fontHandle.AddrOfPinnedObject(), fontResource.Length); fontHandle.Free(); messageTextFont = new Font(MyFonts.Families[0], 9F, FontStyle.Regular); button1.Font = messageTextFont; //other code here } [/code] My … |
|
I embedded a font to my winform application and the font showed up on my computer as well as many others. But for some wierd reason it shows up as blank buttons (I used the font on buttons) on some peoples computers. It is not the OS they use as … |
|
I have created a string in (e.g. Button1_click) Call that string "textboxtext" now for some basic text to assign to the string I did the following [code] public void button1_Click(object sender, EventArgs e) { string textboxtext; textboxtext = textBox1.Text; textboxtext += textBox2.Text; textboxtext += textBox3.Text; //Some other code later on … |
|
How can I create a a invisible form background? I dont want to use opacity. |
|
Can someone "shortcut" this code for me? I want this code to run from textBox1.textchanged to textBox170.textchanged (so this code should affect textbox1.textchanged/textbox2.textchanged/textbox3.textchanged....[e.t.c]....textbox170.textchanged): [code] string l_text; l_text = textBox1.Text; l_text += textBox2.Text; l_text += textBox3.Text; l_text += textBox4.Text; l_text += textBox5.Text; l_text += textBox6.Text; l_text += textBox7.Text; l_text += textBox8.Text; … |
|
I use Visual Studio and when I go on Properties->Settings, I cannot seem to find the setting thingy for background image. I do not like .XML files for user settings so I use settings instead. I want to change the background image of a menustrip and then when the application … |
|
The function that my timer carries out: 1) changes the text of buttonX4 from "Copy To Clipboard" to "Your Bio Has Been Copied" 2) after 2 seconds (timer steps in) it changes from "Your Bio Has Been Copied" to "Copy To Clipboard" Problem: After it completes step 2 when i … |
|
What i want to do is that when i click buttonX4 i want the text to change from "Copy To Clipboard" to "Your Bio Has Been Copied" Then i want it to wait for 2 seconds then i want it to change back to "Copy To Clipboard". I did this … |
|
[code] private void button39_Click(object sender, EventArgs e) { string l_text; string l_filename = "c:\\test.txt"; string s = System.IO.File.ReadAllText("c:\\test.txt"); OpenFileDialog fdlg = new OpenFileDialog(); fdlg.Title = "My Xbox Live Bio Creation"; fdlg.InitialDirectory = @"c:\"; fdlg.Filter = "All Files.* (*.*)|*.*|Text Files.txt (*.txt)|*.txt"; fdlg.FilterIndex = 2; fdlg.RestoreDirectory = true; if (fdlg.ShowDialog() == DialogResult.OK) … |
|
[code] private void button35_Click_1(object sender, EventArgs e) { Clipboard.SetDataObject(textBox1.Text, true); } [/code] This lets me copy only the text in textbox1 How do i make it so that it copies the text in textbox1 and textbox2 and textbox3 e.t.c ? |
|
I have almost finished my project and i am stuck on one part of the code, an error comes up saying "embedded statement cannot be a declaration or labled statement" I dont know what that means (the error part of the code is coloured red in the code section underneathe) … |
|
[code]using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { List<Button> buttons = null; List<string> values = null; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { buttons = new List<Button>(); buttons.Add(button1); buttons.Add(button2); buttons.Add(button3); buttons.Add(button4); buttons.Add(button5); values = new List<string>(); values.Add("A"); … |
|
I would PM but you dont accept them for some reason. Would you be able to help me with the code you gave me [code] buttons.Add(button2); buttons.Add(button3); //e.t.c [/code]I'm trying to get the code to work with Devcomponet buttons, but every code I can think of doesnt work. |
|
[B](Post was originaly posted in an XBOX forum - No help.)[/B] [code]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Xbox_Live_Bio_Template { public partial class Form1 : Form { string a = "╋"; string b = "━"; string c = "┃"; string … |