|
Last time I looked PS was a text format. Do you have specific problem?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
what's the meaning of it? Can show me any article about it?
thanks
|
|
|
|
|
|
Hi all...
I'll try my best to keep this query as compact as possible...
I'm currently working on a project that involves generating alarms/notifications for the Automated Distributed Control System at the company. Well, for this, the team has created Notification Client and Notification Server Applications.
There is also another .exe created that dumps a message (the message is taken from a database, by means of a function) into a Private queue (which can be viewed in the Computer Management tool). This .exe is intended to run alongside the Notification Server Application, which accesses the queue to obtain the messages, which are then displayed at the User Station by means of a method created (called rhsc_notifications; I'll detail that later).
The problem we are facing is that the display at the User station is truncated, i.e. in all fields, only the first character is displayed, and remaining data is missing. (The alarm/notification is displayed as multiple fields like Alarm generation location, priority, description, time, etc.).
This problem is faced when the Notification Server uses a method called rhsc_notifications directly. However, one of the team members created an interface in Visual Basic. This interface is called by the Notification Server, and the interface processes the message, and calls the rhsc_notifications method to display the message at the User Station. When this interface is used, the display turns out fine, no truncation. However, when the rhsc_notifications method is called directly from the Notification Server Application, there is truncation.
We are required to eliminate this interface, and call rhsc_notifications method directly. The thing is that this method uses a library that has NOT been developed in a .Net environment. Hence, there is the need to marshal the data.
We've tried a few things with marshaling, but the problem hasn't been resolved. So I'm hoping you guys will be able to help me out with this...
So, can I go ahead and post the code?
Thanks in advance...
Tunçay
|
|
|
|
|
Sounds like the type of thing that happens when you forget to specify the size of a varchar/nvarchar field in a DB.
This can likely happen in native languages too.
Normally when you bark up the wrong tree, things normally goes worse. I dont think marshalling is the issue here (but that's just my guess).
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Hi, thanks for your reply .
Well, my gut feeling was that it'd be something to do with wrongly specified data types too... But the team has decided that it's marshaling that's gonna get us the solution here (thing is, I joined in between, when the project was already underway)...
Hmmm... I'll check on that, and get back to this thread (hopefully to say "Problem solved, thanks!!! " )...
Anyway, thanks for your response...
Tunçay Şanlı
|
|
|
|
|
And hey, how (and where) do I check if the size of the varchar/nvarchar fields of the DB have been specified, and if they've been specified correctly?
Thanks again,
Tunçay Şanlı
|
|
|
|
|
Hello to everybody,
I have an application which includes to access remote computer on web from the another one and access that pc remotely.
In lan, the connection is done through ip addresses of same network, but on web the network may be differ, and i dont know how to make the connection.
Will you please help me out if anybody knows it will be better.
Thank you.
|
|
|
|
|
Hi,
LAN connections and WAN connections are the same but with different IPs. Your LAN IP can be found from your local area connection's properties (if you have a PC) it's usually starts with 192.168 ,you know.
You can find your WAN IP from here[^].
Of course if you have a router or a firewall, you have to configure some settings called PortForwarding. It depends on your router model... PortForward.com[^] can help you in this issue.
Hope can helps
I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]
My blog
|
|
|
|
|
Thnks,
Ok now i am sure about address, but still have confusion about the connetion.
I dont know how to connect to the another pc. Any server like ftp is needed as middle ware?
|
|
|
|
|
You have to know another PC's IP. If your application works on LAN, just change the LAN IP to another PC's IP...
Don't forget the router settings on another PC (if there's any).
krinaljariwala wrote: Any server like ftp is needed as middle ware?
I don't think so...[^]
I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]
My blog
|
|
|
|
|
|
That's a very vague question to ask...
If this app works over a network then you don't need necessarily need to change the program to get it to work over the internet.
Go google how the internet works, its a network just like any other, kind of. You need to get the public IP addresses of the computer to give to your application. If the computer(s) in question does(do) not connect to the internet directly, you'll have to set up NAT(network address translation IIRC)
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
hello all
does any one help me with codes to dynamically create a form in c# and load that when i click on a button in form1()
thanks
Tony
|
|
|
|
|
Form form2 = new Form();
form2.Show();
Ofcourse you need to set its properties first, but it's easy.
|
|
|
|
|
Please explain me more information. What do you want to do ?
|
|
|
|
|
hello haiquang,
i came to know that in c# we can create dynamically buttons and textboxes thru code ... without drag and drop from the toolbox....like wise i wish to know is it possible to create a form() dyanmically by writing the code....
Thanks
Tony
|
|
|
|
|
hello haiquang
i came to know that we can create Button and textboxes tru Code without drag and drop from toolbox.
likewise can we create a form() in such a manner by writing the code..
and not by adding from Projects -------> Add new Item --> C# WindowsForm.cs...............
Thanks
Tony....
|
|
|
|
|
Did you try the following way?
private System.Windows.Forms.Button btnEncodePath;
this.btnEncodePath = new System.Windows.Forms.Button();
//
// btnEncodePath
//
this.btnEncodePath.Location = new System.Drawing.Point(352, 19);
this.btnEncodePath.Name = "btnEncodePath";
this.btnEncodePath.Size = new System.Drawing.Size(75, 23);
this.btnEncodePath.TabIndex = 1;
this.btnEncodePath.Text = "Browse...";
this.btnEncodePath.UseVisualStyleBackColor = true;
this.btnEncodePath.Click += new System.EventHandler(this.btnEncodePath_Click);
this.Controls.Add(this.btnEncodePath);
It is very easy, please go to the InitializeComponent() method for more infomations.
Take SharePoint to new height
|
|
|
|
|
hello haiquang
the code u showed is for creating the button dynamically ?????
i asked abt creating a new form.cs() by clicking on a button.............
|
|
|
|
|
public void CreateMyForm()
{
Form form1 = new Form();
Button button1 = new Button ();
Button button2 = new Button ();
button1.Text = "OK";
button1.Location = new Point (10, 10);
button2.Text = "Cancel";
button2.Location
= new Point (button1.Left, button1.Height + button1.Top + 10);
form1.Text = "My Dialog Box";
form1.HelpButton = true;
form1.FormBorderStyle = FormBorderStyle.FixedDialog;
form1.MaximizeBox = false;
form1.MinimizeBox = false;
form1.AcceptButton = button1;
form1.CancelButton = button2;
form1.StartPosition = FormStartPosition.CenterScreen;
form1.Controls.Add(button1);
form1.Controls.Add(button2);
form1.ShowDialog();
}
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.form(VS.71).aspx[^]
|
|
|
|
|
Okay, when you click on the button the code below will open a new form. First, create an event handler for the button you want to click on, and then type the following inside the event handler:
Form MyNewForm = new MyNewForm();
MyNewForm.Show();
That's all there is to it. If you would like to know how to go about setting the properties programatically for your new form write back.
Hope this helps,
j.t.
j.t.
|
|
|
|
|
Hi, why dont you check the windows generated code? is as all there you know!
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Introduction
Encode PHP is a tool to encode any php file
Every body can use it
Inside The Service
Click to the Encode button:
private void btnEncode_Click(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
string LogFileName = "Log.txt";<br />
FileInfo fi = new FileInfo(LogFileName);<br />
fi.Create().Close();<br />
StreamWriter writeLog = new FileInfo(LogFileName).CreateText();<br />
string encodePath = this.txtEncodePath.Text.Trim();<br />
string decodePath = this.txtDecodePath.Text.Trim();<br />
if (!(string.IsNullOrEmpty(encodePath) || string.IsNullOrEmpty(decodePath)))<br />
{<br />
new IEncodePHP(writeLog).GetFileInDirectory(encodePath, 1, decodePath);<br />
MessageBox.Show("Congratulation you encode successfully!", "Congratulation");<br />
}<br />
else<br />
{<br />
MessageBox.Show("Can not encode the source path!", "Warning");<br />
}<br />
writeLog.Close();<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show("Can not encode the source path: " + ex.Message, "Warning");<br />
}<br />
}
Encode Method:
private string EncodePHP(string strEncoded)<br />
{<br />
string variable1 = IRandom.GetRandomString(4, false, false);<br />
string variable2 = IRandom.GetRandomString(3, false, false);<br />
string variable3 = IRandom.GetRandomString(2, false, false);<br />
string startVariable = " $" + variable1 + " = '";<br />
string endVariable = "';";<br />
string strDecode = "$" + variable3 + " = '$" + variable2 + " = base64_decode($" + variable1 + "); eval($" + variable2 + ");';";<br />
string strEval = "eval($" + variable3 + ");";<br />
strEncoded = startVariable + strEncoded + endVariable + strDecode + strEval;<br />
return strEncoded;<br />
}
|
|
|
|
|
Is this a question, or the start of an article ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|