|
kh.pakdaman wrote: hi friends!
It would be better to put in a useful subject line. For example: "Need advice for studying C#"
|
|
|
|
|
Guys,
How can I map other web servers in order for me to retrieve files and open it.
Ex. My web page is running on Server1 and the files that I need to open is in Server3 Once I open the page my program will automatically map server3 + directories and display all the files associated with that directory.
I really need answer or idea.
Thanks;
Dabuskol
|
|
|
|
|
Im not sure what you mean by this question?
1: Do you mean that when someone views server1 it actually displays server3.
2: The ability to view and manage the file system on server3 from server1.
1: Easy, simply retrieve the page.
2: This would probably require a web service, or depending on how you plan to get this information, ajax (plain aspx file that takes a querystring of the path).
You simply send the path you want to view and the web service or page will return the directory layout as requested.
|
|
|
|
|
I making an app. to help install lots of programs for a PC i will soon be getting, so i have a few cd's on with the app, and variouse programs, and then things like the adobe photoshop cd.
By using various while, and if statements and System.IO.DriveInfo.GetDrives() etc. i can make sure that the right cd is in a drive, get the drive letter and run the setup application. But this could involve removing the cd with the app on it, wich shouldnt be a problem until the setup program finishes and the computer goes back to the app, which may no longer be there. I'll then probably get some error saying that the cd was removedand that i should put it back, which i dont want.
Anyone got any ideas about this? or an easyer way of finding a drive with a particular label, and getting its letter, at the moment i have about 30 lines of code just to find a drives label and the letter (well, that may be exagerating but...) which i need to use about four times (or more).
|
|
|
|
|
The Undefeated wrote: I making an app.
Unless it is very large the OS will load the whole .EXE into memory and should never need to read the executable file again. However this is not usually how installers work. They normally have a bootstrap .exe that copies the files to the hard drive and then launches the installer executable from there.
"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
|
|
|
|
|
led mike wrote: Unless it is very large the OS will load the whole .EXE into memory and should never need to read the executable file again.
Actually it's not like that. Every time the program (EXE file) is invoked, Windows maps the disk file to the memory address space of the created process through file-mapping. It never copies the EXE file to the memory. That is why you cannot delete the EXE file when it's running
Best,
Jun
|
|
|
|
|
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;
|
|
|
|