|
hush now, we must never find the master plan of 1337 #@X0r'5 to come to code project so they can get us to write application their tools which pwned the world!
It does make me wonder if someone did send evil codz to one of those "plz send teh codz" what would happen to them when their professor ran it :/
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
Hi,
I've strange requirement to meet, please some one help out.
I've two EXE one for uploading data into DB and another is Searching DB. But i can search the DB by using the Object which is created by first EXE. Is there any possibility that second EXE should be able to access the Object which has been created by another EXE.
Or is there any other way to resolve it.
Thanks in advance.
|
|
|
|
|
You can share objects between processes by using .NET remoting and MarshalByRef objects. Look up some remoting examples on the web.
Life, family, faith: Give me a visit.
From my latest post: "How differently the psalmist saw it! How blessed -- how truly happy with real joy! -- is the man who delights in the Law of the Lord."
Judah Himango
|
|
|
|
|
You have to make third application much probably a class library, the purpose of that class library is to read,write in db
use that class library in your both exe's
|
|
|
|
|
What does a method return type followed by a question mark (?) indicate?
I just saw this in code that I am maintaining and I have never seen this before.
|
|
|
|
|
|
Hi all,
i need to generante random number and it's range should be between
1.3200 & 1.3500
i tryed
Random r=new Random();
1.3200+r.next()*1.3500
but it didnt work!!!
|
|
|
|
|
mrcooll,
MSDN[^]
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Try selecting between 132 and 135, then divide by 100.0 ( dividing by 100 will give you an int, not a float )
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Use the NextDouble method instead of the Next method. The Next method returns a number between 0 and int.MaxValue .
The range (difference between lowest and highest) is not 1.35, it's 0.03, so that's what you should multiply the random number by.
double n = 1.32 + r.NextDouble() * 0.03;
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
mrcooll wrote: but it didnt work!!!
of course: it is wrong.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hello,
First of all thank you for this magnificent web site.
I am new to C# and trying some basics on my own.
As you may know if you try to define a path variable as a string in C# you must use "\\" to indicate backslashes:
i.e.:
string filePath = "C:\\Windows\\Temp\\file.txt";
But what if I should received the path information as a parameter to my main() method?
I have tested it many times in simple applications but I could not open a SaveFileDialog in the specified directory. Please consider the following examples that sets SaveFileDialog.InitialDirectory property.
The operation of the application is simple, just display a SaveFileDialog pointing to the location passed to the Form1:
This one works pretty fine:
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
string initialDirectory = "C:\\Windows\\Temp";
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(initialDirectory ));
}
and Form1 class has the following codes inside:
public partial class Form1 : Form
{
private string initialDirectory;
public Form1(string initialDirectory)
{
this.initialDirectory = initialDirectory;
InitializeComponent();
InitializeSvFDlg();
}
private void InitializeSvFDlg()
{
this.saveFileDialog1.InitialDirectory = this.initialDirectory;
this.saveFileDialog1.ShowDialog();
}
}
--------------------------------------------------------------
I observed that SaveFileDialog does not show the passed directory when I use the following method in main() and start the program from Command Prompt with SvFileDlgShow.exe "C:\\Windows\\Temp" command:
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
string initialDirectory = args[0];
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(initialDirectory));
}
Form1 class is the same.
--------------------------------------------
But the executable works fine if I use SvFileDlgShow.exe "C:\Windows\Temp" as the start-up command.
Is this the intended operation?
Any help is appreciated.
|
|
|
|
|
selcuks wrote: But what if I should received the path information as a parameter to my main() method?
The reason you use \\ is because \ is used to escape characters, for example, \" is how you put a quote. You have another option:
@"c:\Program Files\Atalasoft\DotImage 6.0"
will work fine, the @ means that \ means \. The \\ actually is turned into \ in your final string ( although the debugger will show \\ ). So, if you pass a parameter, it should be a single \, because \\ is in fact how you tell the compiler to emit a single \, if you've not put @ at the front of the string.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Ive been developing an interface that updates a schematic with dimension lines and re draws different parts based on selection from radio buttons.
The problem is when I go to delete part of the drawing and draw a different part. The only method I have for erasing is to paint over the drawing with a white pen, but now when I mouse over the control the Diagram flickers remains of the painted over drawings.
Ive read some articles about double buffering, but was hoping there was something else I could do without a major setback.
|
|
|
|
|
Your design is incorrect. You drawn parts should be objects that you can manage.
|
|
|
|
|
This is a MAJOR setback. What you need to do, is collect details of lines to draw, and draw them on the screen in the paint event, not ever drawing them on the image. Then you can just undo any line you want.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yea I really didnt know anything about painting when I started so went about this in the completely wrong way. You say collect details of lines to draw and put them all into 1 paint event. Right now I have dozens of paint events that are called. The diagram has to update in real time every time the useer changes a textbox or radio button so it had to draw a lot.
|
|
|
|
|
Cozmo23 wrote: Right now I have dozens of paint events that are called
How is that possible ? A control has one paint event, and one only.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi..
I Need to Draw a sine wave on the form based on the X and Y values. I have stored those values in List variable..
How can i draw a continuous sine wave using GDI+ using C#
|
|
|
|
|
In the Graphics class you have the DrawLine, DrawLines, DrawBezier and DrawBeziers methods. Use whatever fits the kind of data you have in the list.
To draw graphics on a form, use the Paint event of the form or of a control on the form. A graphics object that you should use for the drawing is send in the event arguments to the event handler.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
But How can i get a continuous sine wave using Drawline, etc..
I have 100 samples from ADC, now i need to draw a waveform in winForm. Can u suggest me some link where can i get the complete information abt thid..??
|
|
|
|
|
DrawLines takes a Point[] , what is the problem?
|
|
|
|
|
When i increase the HZoomFactor (zoom in). the waveform that is displaying is not looks like Sine wave.. What can i do for that..?
Can i Get any Examples on GDI+.
|
|
|
|
|
Use DrawCurve rather then.
Actually I have no idea what you mean by that. What does it look like if it does not look like a Sine wave?
|
|
|
|
|
When you zoom in you need to redraw your sine wave in OnPaint ().
Because pixels on the screen are discrete, any "curve" you draw is only an approximation at a given level. Zooming in gives you more pixels per measurement unit, magnifying the approximation errors from the previous curve, so it needs to be redrawn.
|
|
|
|