SEARCH YOUR SOLUTION HERE  

Alter cursor from insert to overstrike and back

This is one of those "I should not even be posting this as a question" kinds of questions...
But I really do not know how can i receive the overstrike cursor back to insert.
I also do not know how it got set to overstrike in the first place.
help
In Visual Studio Press the "Insert" key on ur keyboard. It might be labeled "Ins".

Posted On: Friday, November 23, 2012 Total Views: 18
View Complete with Replies




Related Messages:

alter background color using timer  (17 Views)

I have an user control that contains a button and a timer. Now my timer in disabled. On tick event handler I wana the background color of my button to alter. My user control has a public method StartTimer() that enables the timer. Now if I start my timer from my user control every thing works just fine.
The difficulty is the next one. I have a form. On that form I have added in design an instance of my user control. My form also contains a button. When I click on my button I call the StartTimer() method of my user control. Now the background color of the button from my user control does not alter.
Here's my code snippet so far:
User Control:
Public void StartTimer()
{
Timer1.Start();
Timer1.Tick +=new EventHandler(Timer1_Tick);
}
Private void Timer1_Tick(Object sender EventArgs e)
{
Button1.BackColor = Color.Red;
}
My Form:
Private void Button1_Click(Object sender, EventArgs e)
{
UserControl1.StartTimer();
}
Where is my mistake
This post has been updated by cipi20052000: 25 January 2012 - 05:16 PM
View Replies !
How do I apply changes done in my DataGridView back to the DataTable tha  (1 Views)
Let me be specific:
I have the following components in my project:
1) Form
2) Textbox
3) Button
4) DataGridView
5) A class named Db - It has all the code snippet stuff to interact with the db means it can insertupdate,DELETE etc
I type the deed name in the textbox press the button and then a query is pass the db fuction to fetch the desired data. My Db class always returns me the "SELECT" query results in a "DATATABLE".
I get the "DATATABLE" in a variable called DataTable DT variable. I then write this code just dgv.datasource.DT then all my data is shown in the DataGridView.
Now the question is that how will the changes done in my dgv will be reflected in the datatable so than I can then pass my edited datatable back to the db.
This is my db 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.Data.Sqlclient;
using MySql.Data.MySqlclient;namespace GSK.DBLayer
{
class Db
{
Declarations
MySqlConnection conn;
MySqlCommand cmd;
MySqlDataAdapter da;
MySqlCommandBuilder cb;
DataTable DT;
int pCount;
string connectionString = "SERVER=localhost; Db=gsk; UID=root;";
string connectionString = "Data Source=localhost; Initial Catalog=GSK; Integrated Security=True";
Run Queries
public void AccessDB(string sqlQuery)
{
try
{
conn = new MySqlConnection(connectionString);
cmd = new MySqlCommand(sqlQuery, conn);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
MessageBox.Display("Ur request served successfully ", "Info", MessageBoxButtons.OK, MessageBoxIcon.Info);
}
catch (MySqlException ex)
{
MessageBox.Display("Not able to serve ur request ", "Error message", MessageBoxButtons.OK, MessageBoxIcon.Error message);
}
}
Search More than one Work
public DataTable Search(string sqlQuery)
{
try
{
conn = new MySqlConnection(connectionString);
conn.Open();
da = new MySqlDataAdapter(sqlQuery, conn);
cb = new MySqlCommandBuilder(da);
DT = new DataTable();
da.Fill(DT);
conn.Close();
da.Dispose(); Memory Free...
}
catch (MySqlException ex)
{
MessageBox.Display("Not able to access data ", "Error message", MessageBoxButtons.OK, MessageBoxIcon.Error message);
}
return DT;
} ---------------------------------------------------------------------------

----------------------------------------------------------------------- Receive Max Product Count
public int GetMaxPdCount(string sqlQuery)
{
try
{
conn = new MySqlConnection(connectionString);
cmd = new MySqlCommand(sqlQuery, conn);
conn.Open();
pCount = Convert.ToInt32(cmd.ExecuteScalar());
conn.Close();
}
catch (MySqlException ex)
{
MessageBox.Display("Can't Receive Max Product Count ", "Error message", MessageBoxButtons.OK, MessageBoxIcon.Error message);
}
return pCount;
}
}
}
Hope u receive my question... I more thing is it necessary to use the adapter fill method to only fill the dataset not the datatable
Waiting for the positive response...
View Replies !
Database not Commiting changes  (5 Views)
I am attempting to edit a db value depending on what radio button the user selects. The application runs it searches the value from the db, and when I select the radio button and tell it to edit it says It's edited, but whenever I check the tables the value is the same as it was before, it isn't committing the changes like it should, any solutionsusing System;
using System.collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Data.Sqlclient;
using System.Web.UI.WebControls;namespace ColorCoding
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(Object sender, EventArgs e)
{
if (Session["Material_ID"] == null)
{
Session["LookupPass"] = "1";
Session["UpdatePass"] = "0";
if (TextBox1.Text.Length
This post has been updated by adolf625: 05 January 2012 - 10:57 AM
View Replies !
open Excel file alter it and then save it  (6 Views)
I have to do the following:
-> open Excel file
-> alter values of required cells
-> then save the file
right now I'm doing this:
Excel.Application xlAppoutput = null;
Excel.Workbook xlWorkBookoutput = null;
Excel.Worksheet xlWorkSheetoutput = null;
Excel.Range rangeoutput = null;
try
{
xlAppoutput = new Excel.ApplicationClass();
xlWorkBookoutput = xlAppoutput.Workbooks.Open(@"D: Askari9 output myFile.xls" Type.Missing, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
xlWorkSheetoutput = (Excel.Worksheet)xlWorkBookoutput.Worksheets.get_item(1);
rangeoutput = xlWorkSheetoutput.UsedRange;
(rangeoutput.Cells[12, 3] as Excel.Range).Value2 = "new value";
xlWorkBookoutput.Close(true, null, null);
xlAppoutput.Quit();
releaseObject(xlWorkSheetoutput);
releaseObject(xlWorkBookoutput);
releaseObject(xlAppoutput);
}catch(Exception ex){
System.Console.Write(ex.Stacktrace);
System.Console.Write("System could not successfully create bill for House#" + Reader.GetValue(houseNoFieldIndexInDB).ToString()+" n");
releaseObject(xlWorkSheetoutput);
releaseObject(xlWorkBookoutput);
releaseObject(xlAppoutput);
}I get an exception on 'xlAppoutput.Quit();'Can anybody pls assist me resolve this or tell me any other way of doing the same job (open excel file, alter it then save it)
View Replies !
How do I alter the color in spritefont in C# xna3  (12 Views)

newbi here. I'd highly appricate if soeone could assist me with my thesis.
we are going to do a rpg game shooting game.
then i already alter the font but i don't know why is that the colors still the same...
View Replies !
alter pictures in PictureBoxes with button click  (5 Views)
everyone I have not been writing a set of code snippet lately and have lost some of my touch. Anyway I'm designing a mind reading card trick but am stuck on how can i receive the button when pressed to display next set of photos in the 7 pictureBoxes I've. I know there is a way to do this with a loop but am at a loss right now. The beginning code with out all the logic for processing is given below and what I want assist on now.
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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(Object sender, EventArgs e)
{
}
private void button1_Click(Object sender, EventArgs e)
{

for (int timesClicked = 0; timesClicked For some simple reason that I can not view it only shows the first group of pictureBox photos when the button is clicked then the loop continues with out changing the rest of the photos like I wana it to. Fundamentally I know that one can use a for or while loop to solve this difficulty but I can not put it together. I've looked all over the net but only view some VB code and that isn't my language even though I understand the jest of it. Pls assist me. I guess that even a list might assist but am a loss. All assist is comprehended.
This post has been updated by modi123_1: 13 June 2011 - 12:54 PMReason for update:: ues code tags pls
View Replies !
Textbox changes when font size changes  (2 Views)
everyone. I generated an array of textboxes. I also code snippet the font size of the textboxes since tare generated at run-time. The trouble is that after the size of the textbox is set the setting of the font size changes the textbox size. This led me to believe that an AutoSize property of the textbox is set to true. I could not find the AutoSize property for a textbox. for(int i = 0; i
I found an example on MSDN but could not implement it. I tried making the textboxes Objects of textboxbase also.
Any solutions how can i access a textbox's AutoSize property
Pls post ur solution, so if somebody else has the same difficulties, they'll discover too.
View Replies !
check when the focused window has changed?  (12 Views)
Is it possible to check when focus has changed to a various window For instance I goto firefox and then an event is raised. I goto windows live messenger and the same event is raised. is this possible with c#
View Replies !
Advise on career alter.  (4 Views)
Everyone
First let me to say that you've a great community here.
So Here's where I want some suggest. I recently worked as a Staff Acoountant at a medium to large manufacturing company. I started this position almost one year ago and with no prior experience but I've adapted fastly and would consider my self to be very good at this job. And though I do not love it I find it tolerable and the work environment is good.
Currently I was contacted by an individual (whom I know) and offered a position as a entry level (very entry) Software programmer at Company that was Currently purchased by a larger firm in the same field. I believe It's geared towards databases in commerce. I've no degree in computer sciences but I've always wanted to do software development. I've very little to no experience in the field except for some very introductory HTML and some JAVA in Android and X-Code snippet ObjectI have C)for iphone. The best thing I ever generated was application that greeted you with a splash screen and then rendered a webpage. That I worked on for a total of Probably 8 hours. I do have a set of dee. But I digress.
The position would provide me a great opportunity I believe to enter a field I guess I'd love all while being taught and paid. So what is the difficulty
The difficulty is that the salary I'd get is substantially less then what I recently make (about a 10k). I realize if I'm good and successful the upside is huge but there are so several variables I do not know where to begin. I realize that even with all the drive I may have and even if I consider my self intelligent none of this guarantees any success. I also realize that in the software world companies are bought and dissolved rather effortlessly.
Is the potential learning experience worth itForgive the typos pls.
View Replies !
Code snippet snippet that alter itself  (4 Views)
i need to make program that can alter itself by reading from txt file some people told me that i can discover it from here http: flee.codeplex.com but i did'nt understand how can i do what i wana from there I need to do some thing like that
the txt file will have this written in it:
process.start("someproecess");
and that what the program will do
How do I do it
View Replies !
trouble:dynamically alter the length of an array  (5 Views)
I am attempting to test if a string input by a user is a palindrome.I save each individual character in the string to a character array. The difficulty is that software should dynamically alter the array length depending on the length of the string being tested. Any observations suggestions and criticism will be greatly appreciated.
private int counter;
private char[] storeChars; want to generate an Object array whose lenght is dependent on the number of chars in string
public string readData()
{
return Console.ReadLine();
}
public void readCharacters(string input)
{
int i = 0;
foreach (char f in input)
{
counter++;
storeChars=new Char[counter] gives an outofrange exception
if (f == ' ' || f == ',' || f == '.')
continue;
i++;
storeChars[i] = f;
Console.WriteLine(storeChars[i]);
}
}
public void testDrome()
{
int midPoint = (((storeChars.Length - 1) 2) == 0) (storeChars.Length - 1) 2 : 0;
int firstHalfChar, secondHalfChar;
firstHalfChar = 0;
secondHalfChar = storeChars.Length - 1;
for (int i = 0; i midPoint)
secondHalfChar--;
}
continue;
}
else
{
Console.WriteLine("The String Isn't a Palindrome");
break;
}
}

}
} end class

View Replies !
How do I alter the direction of an entity?  (5 Views)
am a rookie attempting to receive discover the ropes and become the best
I've being attempting to create a turtle graphics console application that just modifies the values an of array element from 0 to 1, when the turtle moves depending on if the pen is up or down. I'm really new at this and so far the code snippet I've seems too long, performs poorly and does not work. the thing is am kinda stuck on how can i alter the direction of the turtles motion. Any observations or criticism at all would assist. Here's the rookie code.
class Turtle4
{
const int maxFloorSize = 20;
enum turtDirection
{
TURN_RIGHT=1,
TURN_DOWN=2,
TURN_LEFT=3,
TURN_UP=4
}
enum turtCommand
{
PEN_UP=1,
PEN_DOWN=2,
MOVE_RIGHT=3,
MOVE_LEFT=4,
SET_LENGHT=5,
PRINT_FLOOR=6,
CLEAR_FLOOR=7
}
static void Main(string[] args)
{
int x=0,
y=0;
int count = 0;
int[,] floor = new int[maxFloorSize, maxFloorSize];
bool penDown = false;
int lenghtToMove = 0;
int direction = (int)turtDirection.TURN_RIGHT;
int command;
do
{
Console.Write("Enter the commands to move the turtle as given below"
+ " n" + "Type 1: for Pen Up" + " n" + "Type 2: for Pen Down" + " n"
+ "type 3: for Move Right" + " n" + "Type 4: to Move Left" + " n" +
"type 5: to enter the distance" + " n" + "Type 6: to Print" + " n" +
"type 7: to clear floor" + " n" + "Type 9: end programm" + " n n" +
"Pls enter the command as per instructions above: ");
command = Int32.Parse(Console.ReadLine());
switch (command)
{
case (int)turtCommand.PEN_UP:
penDown = false;
break;
case (int)turtCommand.PEN_DOWN:
penDown = true;
break;
case (int)turtCommand.MOVE_RIGHT:
direction = (int) turtDirection.TURN_RIGHT;
break;
case (int)turtCommand.MOVE_LEFT:
direction = (int)turtDirection.TURN_DOWN;
break;
case (int)turtCommand.SET_LENGHT:
Console.Write("Enter lenght to move (not exceeding 19): ");
lenghtToMove = Int32.Parse(Console.ReadLine());
moveTurtle(floor, ref y, ref x, lenghtToMove, penDown, direction);
break;
case (int)turtCommand.PRINT_FLOOR:
printFloor(floor);
break;
case (int)turtCommand.CLEAR_FLOOR:
clearFloor(floor);
break;

}
} while (command = 9);

} end method Main
static void printFloor(int[,] a)
{
for (int y = 0; y = y-1; y--)
{
for (; x >= x - tMoveLenght; x--)
{
tFloor[y, x] = 1;
xPos = x;
}
yPos = y;
}
break;
case (int)turtDirection.TURN_UP:
for (; y >=y- tMoveLenght; y--)
{
for (; x>=x- 1; x--)
{
tFloor[y, x] = 1;
xPos = x;
}
yPos = y;
}
break;
default:
break;
}
}
if (tPenDown == false)
{
switch (tDirection)
{
case (int)turtDirection.TURN_RIGHT:
for (; y = y - 1; y--)
{
for (; x >= x - tMoveLenght; x--)
{
xPos = x;
}
yPos = y;
}
break;
case (int)turtDirection.TURN_UP:
for (; y >= y - tMoveLenght; y--)
{
for (; x >= x - 1; x--)
{
xPos = x;
}
yPos = y;
}
break;
default:
break;
}
}
} end method moveTurtle
static int getDirection(ref int tCount,int tCommand, int tDirection)
{
tCount += tCommand;
switch (tCount)
{
case 3:
return tDirection = (int)turtDirection.TURN_RIGHT;
case 6:
return tDirection = (int)turtDirection.TURN_DOWN;
case 9:
return tDirection = (int)turtDirection.TURN_LEFT;
case 12:
tCount = 0;
return tDirection = (int)turtDirection.TURN_UP;
case 4:
return tDirection = (int)turtDirection.TURN_LEFT;
case 8:
return tDirection = (int)turtDirection.TURN_DOWN;
case 16:
tCount = 0;
return tDirection = (int)turtDirection.TURN_UP;
case 10:
return tDirection = (int)turtDirection.TURN_LEFT;
case 11:
return tDirection = (int)turtDirection.TURN_RIGHT;
default:
return tDirection = (int)turtDirection.TURN_RIGHT;
}
} end method getDirection- Mod update -
Title edited. Pls use descriptive titles when posting ur questions. We already know you are posting a question, so calling the tread "Question" is of no use.
Also, I resolve the code tags. Tshould be used like this:

This post has been updated by Atli: 06 August 2012 - 04:15 AM
View Replies !
Automatically alter the column of the datagrid  (1 Views)
Guys..
I had these n2n3 and n4 columns in the grid and what I want do is to multiply n2 and n3 and automatically put the value into n4 column.So I write the following code snippet in the dgv_CellEndEdit event.
DataSet l_DS = mSaleHeader.SaleDetailDS;
for (int i = 0; i
But it only works for the first row.It did not work for second row.The n4 column of the second row only changes when I select n4 column.I wana it to automatically changed once I entered the values of n2 and n3.Pls assist me.
View Replies !
asp.net with c# images based on dropdown selection- images wouldn't alter  (6 Views)
PD
It has been a little little bit since I've used a DropDownList in ASP. I'd recommend attempting to view if there is a Selected Text option, in place of Selected item. I've found occasionally that what SHOULD work with ASP, actually does not.
BrairMoss
View Replies !
Code snippet snippet that alter itself  (7 Views)
i need to make program that can alter itself by reading from txt file some people told me that i can discover it from here http: flee.codeplex.com but i did'nt understand how can i do what i wana from there I need to do some thing like that
the txt file will have this written in it:
process.start("someproecess");
and that what the program will do
How do I do it
View Replies !
Pipe delimited file. Array length changes depending.  (8 Views)
everyone. I'm querying a web service and it is returning data that's one string with the various elements in it being pipe delimited. The data I'm returning is info about a users phone. The difficulty is depending on many options, the length of the array changes. So perhaps for me, element 10 is desk number, but for the guy next to me, element 11 is desk number. The array has over 90 elements in it, and I would hate to have to setup that many Case statements. I really only want about 10 of the elements from the array. Does anybody have a clever way of returning only the elements needed
Thanks
Dave
, Not really. I mean, if the index dynamically changes, how can u possibly know what piece of data is what Is there any method to this madness Like, some rules that explain behavior Or some kind of headers to the delimited data Probably a various endpoint would return the headers I do not know.
For instance, if there is 90 elements, it means all the fields are there, but if there is 89, it means that a very specific one element is missing, and 88 means two specific ones Or is it random Because if there is some kind of logic u can work with, then u'll have to use that. Otherwise, I just do not know what to say. Is the data you are looking for all in a particular format You could use a Regular expression to parse it out, assuming no other elements would also match the expression. That's a real pain in the ass, but you have gotta do what you have gotta do.
This post has been updated by Curtis Rutland: 06 June 2011 - 10:50 AM, I would advise exactly what Jack suggested. Since there is key value pairs, and you know exactly what fields you wana, it is fairly simple to parse into a dictionary, then take the fields you wana. In fact, it is pretty simple using LINQ: var dict = dataString.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries)
.Select(x => x.Split('='))
.ToDictionary(x => x[0], x => x.Length > 1 x[1] : string.Empty);
string name = dict["Name"];
string nativeName = dict["Native_Name"];
Console.WriteLine("Name: " + name);
Console.WriteLine("Native_Name: " + nativeName);
dataString in my code snippet is the string that contains the result of the query.
It parses the key value pairs into a dictionary. If the value was empty, it uses string.Empty. You could alter that to null if you wana. It would save on memory, but would require you to use a null-check.
Anyway, I have also included some examples on getting values out of the dictionary. If you are uncertain if the fields you wana will always be included, make sure to use dict.ContainsKey first.
View Replies !
Parsing String to Integer... Value changes   (4 Views)
Okay... Here is the back story:
I was messing in Visual C# the other day and I all of a sudden wanted to try out encryption.
I did some researches and found out about symmetric and asymmetric encryptions. Those are pretty neat, but making an asymmetric encrypting software as a first one did not sound quite right.
So I planned every thing I was going to do.
That's how it goes: The user enters an alphanumeric value as a password
The software transforms every character as a 2 digit number that then is converted to a very big integer for encryption.
The very big integer is then cut in half, and each half is cut in 3 parts. (Tare strings now, so I use the String.Substring() method.)
This is where it gets odd; when I use one of the small parts that starts with a 0 (say 0112) and then put it an integer again... the value changes The 0112 becomes 74... Why
I can effortlessly just stop cutting those integers or just receive rid of 0's in my value transcription... but I just need to know why a 0112 string becomes 74 as an integer value
View Replies !
I need to alter the font and text color in a console Software.  (13 Views)
I want to somehow adapt a certain color to certain text....Here's my code snippet:string holdValue = string.Empty;
for (; ;) >
{
holdValue = Console.ReadLine();

if (holdValue == " assist"){Console.WriteLine("Commands: assist attack equipment");}
if (holdValue == " attack"){Console.WriteLine("You're Attacking ");}
if (holdValue == " equipment") { Console.WriteLine("You've equipment "); }
if (holdValue == " train") { Console.WriteLine("That skill would u like to train"); }
}Can I do some thing like:
if (holdValue == " assist"){Console.WriteLine.Color = Blue("Commands: assist attack equipment");}
View Replies !
How do I alter Mouse movement in C#?  (5 Views)
everyone
I am newbie to C#, Fundamentally I've googled around and have not found an answer any where for my question.
I am hoping somebody here can assist. I am a little bit of a gamer. In the last few years I've noticed new games and games that execute on the Q3 engine can be easier to play on the basis of certain mouses u use.
It seems Gamers are starting to even try and use in particular Razor software, and tare editing the software files to try and add their mouse .DLL files so they can alter their pitch and yaw(the y and x axis) of their mouse.
I had a thought for a while now; why can not somebody just make a program that people can use to changes this with out having to update softwares Editing softwares can be dangerous if people do not have a clue what they are doing.So now down to the dirty, seeing as Razor can make a program interface that allows you to alter mouse settings providing its a razor mouse(or unless people update the .DLL files) Is their a way to do this in C# Generate an easy program to alter a persons x and y axis on a slider Would also be kool if it had a reset button to reset the x and y axis to default. Being newbie to C# and even reading tutorials will not really assist me. I was really hoping somebody could make an easy code snippet for this and just define what buttons i'd want to add and more. From their i could continue on and make the program more user friendly.
Can one of you advanced scriptors pls assist
View Replies !
Can I save changed info in datagridview at runtime?  (5 Views)
Hello
I have just started to discover C# and I am a little little bit confused about DataSet DataTable DataGridView.
For now I am having an easy form where It's DataGridView, listBox and insert DELETE buttons. When my form loads in listBox I am getting excel sheet's list. Then I select one of the sheets and then it appears on DataGridView (all info I am writing to DataSet and DataTable). And I want to add or DELETE columns at runtime. Here's my code snippet for DELETE button:
excelConn = new OleDbConnection();
excelConn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " + excelFilePath + ";Extended Properties= "Excel 8.0;HDR=YES;IMEX=1 "";
DataTable dt = new DataTable();
OleDbDataAdapter ExcelAdapt = new OleDbDataAdapter("Select * From " + "[" + tableName + "]", excelConn);
ExcelAdapt.Fill(dt);
try
{
dt.Columns.Remove(colName);
dt.AcceptChanges();
var bds = new BindingSource();
bds.DataSource = dt;
grid.DataSource = bds;
MessageBox.Display("Column(s) erased ");
excelConn.Close();
}
catch (Exception ex)
{
MessageBox.Display(ex.Message);
}
The difficulty I faced is that I can not save changes made at runtime. And even at runtime these changes are temporary. If at runtime I add new column and then I select another sheet from listBox these changes disappear.
I find this tutorial (http: www.dreamincode.net forums topic 238727-insert-update-and-delete-records-in-table-with-datagridview-using-c 23 ) but if I understood well it changes db, well in my case it would alter excel file (but I need to have original excel file and making changes only in DataSet and DataTable).
Can I have make changes only in DataSet DataTable (if yes then how)
View Replies !