|
|
please help me
i want to design small program to lock the windows XP
but i do not know how can i start because i am beginner in c# language
so please help me
tell me what is the steps
and thank you so mach
|
|
|
|
|
|
how can play an avi format file in my project in which i am creating a media player.
|
|
|
|
|
Hi,
welcome to CodeProject.
This website holds more than 20,000 articles and it has a reasonably good search facility.
Why don't you try this[^]?
|
|
|
|
|
Here are the ways that I know of:
easiest: use WPF and make a MediaElement
2nd easiest: Use an old audio/video player class from the directX sdk. (This thing really sucks but will play an avi w/ a few lines of code)
3rd easiest: Use this AviFile C# wrapper Avi File in C#[^] And display the images (Too slow for big files)
4th easiest: Use the windows media player activeX control http://msdn.microsoft.com/en-us/library/bb262657(VS.85).aspx[^]
5th easiest: Use directshow/directx from C# and get out the VMR9. This is the best / most capable / smoothest way to play video in C#, but isn't very straight forward or easy. You'll find lots of examples out there, some are better than others.
|
|
|
|
|
I'm trying to write a questionnaire that gathers info of the user and then updates a database in Access. I've managed to write the program and everything works up to the point where it updates the database, at which point it displays the error message below:
OleDbException was unhandled
Syntax error in INSERT INTO statement
I've checked it and I can't find any syntax errors in it. Could someone help me out please? I'm very new to programming, so please try to explain in as simple terms as possible. The section of code is below. Thanks for your help.
sing 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.OleDb;
namespace WindowsFormsApplication5
{
public partial class Form1 : Form
{
OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=d:\\LO2.mdb");
OleDbDataAdapter ad;
DataTable table = new DataTable();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
ad = new OleDbDataAdapter("select * from attributes ", con);
OleDbCommandBuilder cb = new OleDbCommandBuilder(ad);
ad.Fill(table);
dataGridView1.DataSource = table;
}
private void button1_Click(object sender, EventArgs e)
{
DataRow row = table.NewRow();
row["identifier"] = textBox1.Text;
row["language"] = textBox2.Text;
row["title"] = textBox3.Text;
row["description"] = textBox4.Text;
row["id"] = textBox5.Text;
table.Rows.Add(row);
ad.Update(table);
dataGridView1.DataSource = table;
}
|
|
|
|
|
hatan86 wrote: I've checked it and I can't find any syntax errors in it.
You haven't supplied an INSERT statement, your SELECT statement uses SELECT * which means that the DataAdapter probably cannot work out what columns it needs to insert.
|
|
|
|
|
Can you give me an example
|
|
|
|
|
|
Hey.
I've created a control which allows users to draw "tiles" onto a canvas, and supports multiple layers.
I've been running diagnostic time checks on each of these. The problem is, the system draws "previews" (50% transparency images of the other layers) when another layer is selected, so the person can see where the other tiles/sprites are on the canvas.
I have it set so that only the region of the canvas where a sprite has been painted is invalidated and updated when the user paints onto the canvas. But the problem is that it still requires quite a bit of rendering.
I have set DoubleBuffering to true, enabled OptimizedDoubleBuffering, AllPaintInWmPaint etc. Here are some times:
When drawing the entire map without transparency on layers: 0.23 seconds.
When drawing one layer, other layers with transparency: 0.8 seconds.
When painting a tile onto part of a layer: 0.26 seconds.
This might seem moderately fast for a drawing system, but for some reason the drawing is lagging. The painting itself isn't lagging at all, but it's the rendering the output onto the control that seems to take a while. You see, I have a selector box that's 2px wide rectangle that follows the mouse on the map to show where the sprite will be painted, and it takes a while to update the position.
Is there any way I could speed up the processing of my control? I know it's a hefty load to be drawing onto a control (especially 3~4 layers, where 2~3 of them are drawn with 50% transparency), but there are other editors which perform the same function and don't lag at all (or atleast take around 0.2 seconds to render transparent layers.
Edit
Just as a point of interest, would it speed up my processing if I split each layer into seperate controls, placed on top of each other on my main edit control, then drawing each layer seperately on each control, rather than having them all parsed in the same control?
Thanks ~ Chris.
|
|
|
|
|
Dear All :
When I put the tablelayoutpanel into usercontrol.
If this usercontrol allow developer adjust usercontrol.tablelayoutpanel row / column size into design-time
Can anyone help me teach me how to do it ?
As [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] is only work in property
Thanks
Michael
|
|
|
|
|
I'm having trouble on how am going to start this idea of mine. I have an image and I want to plot points on that image. My Idea is to get the X and Y coordinates of the mouse pointer and save it into a text file so that by the time I re-run the program again, the plotted points is still there. But it seems like this is not a good idea since everything will be messed up if I load the program to a computer with different screen size. I was thinking of placing an invisible grid, but looks like this will be tough to do.
|
|
|
|
|
Silvyster wrote: But it seems like this is not a good idea since everything will be messed up if I load the program to a computer with different screen size.
Why don't you store the coordinates in a coordinate space that is independent of the screen size, like relative to the image size?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
how to get the unknown values from the database and corresponding textboxes for that values at run time
|
|
|
|
|
Unknown values are stored as NULL in a database. When you fetch the value, it is represented as System.DBNull[^]. In windows forms, the TextBox.Text however cannot contain a null value so it must be converted to an empty string.
|
|
|
|
|
hai all,
we used crystal report graphs in windows application ,in this we have problem with @ symbol i.e, appearing in legend text.So we want remove @ symbol from legend.We are strucking with this from two days
could you please help me.
|
|
|
|
|
In my form I use Microsoft Web Browser that support NewWindow2 event.
In habitual WebBrowser object there are properties that do what i need but in Microsoft Web Browser i can not find this properties.
1)I need to disable scroll bars.
2)I need to disable menu of right click.
3)I need to disable option of 3 mouse button in browser.
How do I do this in Microsoft Web Browser?
p.s. I create programm that has small web browser (50x50 px) and i need that user only can do left click in the browser.
|
|
|
|
|
You can use webBrowser1.ScrollBarsEnabled = false; in .NET. As for right click I'd do it with javascript on the actual page, haven't a clue how to do it with code.
|
|
|
|
|
Can you write me this javascript code please?
|
|
|
|
|
|
Microsoft Web Browser have not ScrollBarsEnabled property.
I speak about browser that described here
http://support.microsoft.com/kb/815714
It is another WebBrowser, not habitual web browser from ToolBar.
It is located here - COM Components-Microsoft Web Browser.
|
|
|
|
|
how can i find the checkbox is checked or not.....
present inside the datagridview...
send me sample coding..
|
|
|
|
|
Checkbox must be in some ItemTemplatefield in gridview.It must be server side.Get the control by its ID in cs file and find whether it is checked or not.
Cheers!!
Brij
|
|
|
|
|