|
How can implement the functionality of passing values from one form to another without creating the new instance of the second form. Actually i have to implement the "find" functionality in my application, How can i do this.
Sajid
MMIS
|
|
|
|
|
hi there,
sajjo79 wrote:
passing values from one form to another without creating the new instance of the second form
=> u can use global variable
sajjo79 wrote:
Actually i have to implement the "find" functionality in my application
can u explain more?
<< >>
|
|
|
|
|
public Payment()
{
InitializeComponent();
}
public Payment(string TableNumber)
{
string Table = TableNumber;
InitializeComponent();
}
For Example:
I wanted to pass the text of a label from the main windows form called Main to this Payment windows form.
Add another constructor with the specific type(Ex: string)
When you call it in the main form it will look like this:
In the main form i called Payment(string TableNumber)
Payment pay = new Payment(EmployeeName.Text);
pay.ShowDialog(this);
Now that i have done that Table contains the string that i needed for that form
Matt Srum
|
|
|
|
|
I want to download a file which is present in server to client, how will I do that, for eg% if the file is present in Server's D:\(which is not the virtual directory path, say virtual directory is c:\wwwroot...
|
|
|
|
|
hi there,
u mean that u want to download the file that does not belong to any site?
if so, u cannot download this through http, I think.
<< >>
|
|
|
|
|
Try HttpResponse class's WriteFile() Method.
It writes the specified file directly to an HTTP content output stream.
- ashish
|
|
|
|
|
i've started a toppic that is gone much in back... so i restart a new one.
if i create a dll i can't debug since to i create a enpty form in the same solution but a new project that call it, so i run the form project and i can debug now the dll.
i know this but i don't remember how to link the form to that dll.
How i include that working on dll at the main form?
|
|
|
|
|
Your form project has to reference the dll. In the solution explorer right-click on the references folder of your form project, select "Add references.." and in the opening dialog select your dll project.
www.troschuetz.de
|
|
|
|
|
Hi, in your first topic i explained how to create a dll manually without using Visual Studio. Now i'll explain how to reference a dll manually just for your knoledege.
The reference to the dll is added when you compile your .exe file(where you've got your form). So we'll compile the exe and add the dll reference to it.
With explorer browse to the folder where your sources (.cs files) are located (the files that your exe will use) and create a text file with notepad and add the following 2 lines to this new file:
csc.exe /target:winexe /out:MySoftware.exe /reference:MyLibrary.dll *.cs
pause
Save the file, close it and now rename its extension from .txt to .bat, this is a batch file. Now doble click on it (open it) and it will open a DOS window and will start the compiling process. The first line you added to the file will create your exe. In this line there's a '/reference:' parameter, this parameter will link your app to your dll, this example assumes that your dll is in the same path with your exe sources, in case the dll is in another folder use '/reference:MyFolder\MyLibrary.dll' (the path is relative to the batch file or you can type the complete path: C:\dev\app\MyFolder\MyLibrary.dll).
The second line in the batch file will prevent the window to close and it will keep it open so you can see the compiler's output in case something is wrong in your code.
Job's done.
-- modified at 2:04 Thursday 22nd September, 2005
|
|
|
|
|
I had to create an application, which has list of vendors supplying parts, each parts will have cost associated, when the end user clicks on the particular part, I have to make that row selected, as well as I have to calcualte the total of the parts selected.
But I need to do the following..
1) when end-user selects same part multiple times from different vendors, I have to make the previously selected part unselected, I can find out whether user has selected the part which is already selected, but I need to unselected the previous also, deduct thhe previous amount and add the new amount to the total.I am using Javascript, and does selection, calculation etc in client side, I am using Repeatrer control,I heard of RaiseBubble event, can any one help me, whether RaiseBubble event will help or not, how to select a row in Repeater? please provide me some help on RaiseBubbleEvent
Thanx...
Sony
|
|
|
|
|
Hi all!I have these two lines of codes in my program:
float time = (float)DateTime.Now.Second;
xyGraphControl1.AddPoint(time,power);
The result of the codes is that the timer starts at the same second as the clock in my computer.
How am I going to force the timer to always and only start at 0 second?
Thank you very much!
|
|
|
|
|
What timer?
Please provide some more details (code) about what you're trying to do.
www.troschuetz.de
|
|
|
|
|
Actually this timer is act like a stop watch in my program..So when everytime i press start button it will start run from 0 seconds until i press stop button to stop it.Now the problem is when i press the start button it start according to my computer time(second).
float time =(float)DateTime.Now.Second ;
xyGraphControl1.AddPoint(time, power);
long StartClock;
private void StartButton_Click(objectsender,System.EventArgse)
{
timer1.Start();
// get the exact hour started in milliseconds
StartClock = DateTime.Now.Ticks;
xyGraphControl1.Reset();
}
Thank very much!
|
|
|
|
|
levi`s wrote:
float time =(float)DateTime.Now.Second ;
xyGraphControl1.AddPoint(time, power);
Ok, but what's with these lines of code? What should they do and in which context (method) do they stand?
www.troschuetz.de
|
|
|
|
|
the 1st line mean assign the time(second) in the my computer to float time and the 2nd mean add point to the graph with X-axis is time and Y-axis is power..So basically this AddPoint is add the point to the point to the graph
|
|
|
|
|
I guessed that. But where is that code and what does it has to do with your timer?
www.troschuetz.de
|
|
|
|
|
Guys..
i tryin to sent the follow msg "%01#RCSX0001**" but with a enter key <cr>.
i wanna sent this as a string then get bytes then sent though serial..
but my present program is getting what i type in the text box but now i wanna embedded all the commend in the buttom.. but how to add in the enter key.
i using visual studio c#.. hope to hear from u guys thanks.
|
|
|
|
|
try adding "\x13" into the string, this is the ascii value for enter.
Enjoy
|
|
|
|
|
hi
How rename the file name. (without using function move or moveto) using C# or vb.net
thnx
From
Aijaz Ahmed Niazi
|
|
|
|
|
|
That's what you use! You just move the file to the same directory the file is in, but just supply the new filename.
Dim fi As New FileInfo("C:\dir\dir\test.txt")
fi.MoveTo("C:\dir\dir\newText.txt")
... is one way to do it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
All,
How can I access the log file of a c# .net web application?
Thanks
|
|
|
|
|
hi there,
u mean that u want to access log files created by web app itself or IIS log or from event log?
<< >>
|
|
|
|
|
I need to access the log files and IIS log
Thanks
|
|
|
|
|
use the code list:
p1.X = 10;
p1.Y = 15;
p2.X = 68;
p2.Y = 100;
path.AddLine(p1, p2);
g = this.panel1.CreateGraphics();
g.DrawPath(Pens.Black, path);
Then,I draw a line on the graphic.In the event of Mouse_Move,I catch any point and want to know whether the point in the path of the line.
So I use the funcation of GraphicsPath.IsVisible(),but whenever the funcation always return false.
Can you help me? Thanks!
|
|
|
|