|
Well, you could always argue that that's what he meant by "loading" the EXE into memory .
Regards
Senthil
_____________________________
My Blog | My Articles | My Flickr | WinMacro
|
|
|
|
|
Jun Du wrote: Actually it's not like that.
Actually it is like that.
#include "stdafx.h"
#include <iostream>
#include <conio.h>
using namespace std;
int readkey()
{
int n = getch();
while(kbhit()) getch();
return n;
}
int _tmain(int argc, _TCHAR* argv[])
{
int nret;
cout << "Hello Jun Du remove disk or data stick then enter a key." << endl;
nret = readkey();
cout << "Still here Jun Du" << endl;
nret = readkey();
return nret;
}
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
hi
i wrote a database app in vs2005 and i use oledb and mdb file.
i have a table as asami .
in form1.load i fill dataset
and my table have 3 columns and i want when table load to datagridview , values of the columns of the selected row show to textbox seperately.
i wrote this code in currentcell_changed of the datagridview for update textbox with columns of selected row :
private void dataGridView1_CurrentCellChanged(object sender, EventArgs e)
{
DataTable dt = ds_Asami1.Tables["Asami"];
DataRow currentrow = dt.Rows[dataGridView1.CurrentCell.RowIndex]; ->error occured in this line when i delete selected row
txt_code.Text = currentrow["id"].ToString();
txt_name.Text = currentrow["name"].ToString();
txt_family.Text = currentrow["family"].ToString();
}
to this section my program was work correctly .. but when i delete a row in runtime by delete button .. vs2005 show me this error :
Object reference not set to an instance of an object.
i used this idea in vs2003 without error but when i use datagridview in vs2005 the above error occured .
how to solve my problem ??
|
|
|
|
|
Have you debugged the value of dataGridView1.CurrentCell? Perhaps it is null during this event after a row is deleted.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
hi led mike
ok .. currentrow is null when i delete row ..How to solve my problem ??
thanks
|
|
|
|
|
Check for the null value and handle it in a way that suits your needs: maybe select some default cell or clear your textboxes or ...
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
i dont have print scrent button in my keybord
i want to make small applicatin what will make this function(print Scren)
when i click on button
Palestine
|
|
|
|
|
TAREQ F ABUZUHRI wrote: i dont have print scrent button in my keybord
Find a keyboard with the Print Screen button.
TAREQ F ABUZUHRI wrote: i want to make small applicatin what will make this function(print Scren)
when i click on button
Cool, go for it
|
|
|
|
|
I think System.Windows.Forms.SendKeys.Send("{PRTSC}"); is what you are looking for.
|
|
|
|
|
|
Hi, I'm doing a web application in C# that makes multi-choice tests.
I would like to show to the user the printable version of the test he has built. How could I show a page with its borders like it would be printed (like WORD does with "print preview").
Thanks,
Oren,
|
|
|
|
|
If you are using VS 2005 to develop your application then I would suggest to create a report with user selection by using MS Reporting Services.
Hope this helps...
Difficult - > Challenging, this simple replacement made me take my life little easy;)
|
|
|
|
|
I'm using VS 2003, but I'll check if there is so in it.
Thanks anyway,
Oren,
|
|
|
|
|
:(I didn't find MS Reporting Services in VS 2003, but I found that for windows form there is a function called "PrintPreview" or something like that, anybody knows about an equivalent function for Web Forms?
Or another way to setup a page before printing it (the test that the user will build with our Web Application).
Thanks,
Oren,
|
|
|
|
|
Hi I am new to c# and .net, I am trying to add a data Connection as per the MS website http://msdn2.microsoft.com/en-us/library/3d1wkhas.aspx
The problem is that once the data connection is setup in the server explorer window I cannot drag this on to the form.
Hope you can help thanks
|
|
|
|
|
How would I go about capturing the user's desktop surface to use a Graphics object to draw on it? Thanks for the help in advance.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
using Earth.Internet.WWW.CodeProject;
|
|
|
|
|
|
Depending on your requirement, you have two options.
Option 1 - Platform Invoke Win32 to obtain the desktop window.
1) Platform invoke a few Win32 calls from User32.dll, such as GetWindowDC() and GetDesktopWindow().
2) Construct a graphics object based on the desktop window resource you obtained.
3) Use the constructed graphics object to draw.
Option 2 - Use a transparent window to cover part or all of the desktop.
1) Create a transparent, no-border windows form.
2) Draw to that form.
Best,
Jun
|
|
|
|
|
Due to the fact that I want to maintain cross platform capability (in this case with Mono on platforms such as Linux and Mac OS), I think Option 2 is the better choice.
Thanks.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
using Earth.Internet.WWW.CodeProject;
|
|
|
|
|
i have error in this method
DataSet DSCurrentCourse = new DataSet("tblCourse");
OleDbConnection con = new OleDbConnection(Form1.conString);
OleDbCommand cmd;
OleDbDataAdapter Adapter;
<br />
private void fillListCourse(int plane,int Snumber)<br />
{<br />
<br />
try<br />
{<br />
string sql = " SELECT tblCourse.CO_name, tblCourse.CO_number " +<br />
" FROM tblCourse INNER JOIN (tblSemesterPlane INNER JOIN tblSemsterCourse ON tblSemesterPlane.SMP_id = tblSemsterCourse.SC_SMP_id) ON tblCourse.CO_id = tblSemsterCourse.SC_CO_id " +<br />
" WHERE (((tblSemesterPlane.SMP_PL_id)=" + plane + ") AND ((tblSemesterPlane.SMP_number)=" + Snumber + "));";<br />
<br />
cmd = new OleDbCommand(sql, con);<br />
con.Open();<br />
<br />
}<br />
catch (Exception ex)<br />
{<br />
Console.Write("\n\n<<<--ERROR-->>>"+ex.StackTrace+"\n\n\n");<br />
}<br />
<br />
Adapter = new OleDbDataAdapter(cmd);<br />
DSCurrentCourse.Clear();<br />
Adapter.Fill(DSCurrentCourse, "tblCourse");<br />
con.Close();<br />
<br />
<br />
<br />
<br />
}<br />
the error in line Adapter.Fill(DSCurrentCourse, "tblCourse");
Palestine
|
|
|
|
|
|
Hi everyone
I am trying to automatically select a button on a form that I have navigated to via the webbrowser2 component in my C Sharp application. When I look at the data in the HTML source
the button that says submit looks like this.
Now I want to automatically call the submit function from the webbrowser component. I thought of the Post Data function which allows you to post data to an HTTP server. However, what do I post to the server, or is this an incorrect approach? Is there an easier way to automatically submit this form?
Thanks for your help
Dave
|
|
|
|
|
Dave,
While you are looking at this webpage, right-click and "view source".
Look for code between and that surrounds the search box and "go" button. This is a good demonstration of how form elements can be submitted to a server.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Thansk Richard, I posted in a follow up to Mike what I am currently doing. Perhaps I am mistaken as to why this button should not appear as an element of the Document. The only difference that I can see is that in the source, the "Cancel" button is of type "button" and the "Submit" button is of type "submit". I assume the "submit" is a Java Script function that gets called.
I am a bit new at the HTML side of things, but I am gradually getting it.
Thanks again
Dave
test
|
|
|
|
|
Dave_Roach wrote: via the webbrowser2 component in my C Sharp application.
Using the WebBrowser control you can access the DHTML interface for the browser then obtain the button "element" using DHTML call then call the button objects click() method.
Basically you are using DHTML from C# in the same way you would write Javascript for the browser.
You will find examples of using the WebBrowser controls DHTML interface on MSDN online.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|