|
Hi,
I am trying to write some dynamic data into a .def file and havent succeeded to get enough help anywhere. Can u plz help me out here. HOW CAN I CREATE A .DEF FILE IN .NET(C#)
Thanks
Bharath
|
|
|
|
|
|
How about making use of the StreamWriter[^] class.
The DEF[^] extension is in use by at least 18 different applications, according to the FileExt database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks a lot
Cheers
KR
|
|
|
|
|
Hello,
Is there a way to access a public method in Class 1 fromm Class 2?
Thank you
|
|
|
|
|
Do you mean this?
public class Class1
{
public Class1()
{
}
public void PublicFunction()
{
}
}
public class Class2
{
public Class2()
{
Class1 class1Object = new Class1();
class1Object.PublicFunction();
}
}
Hugo Migneron
|
|
|
|
|
Thank you.
This will work just fine, however I was thinking of doing it somehow without instantiating the object.
Cheers
|
|
|
|
|
zaboboa wrote:
This will work just fine, however I was thinking of doing it somehow without instantiating the object.
Then you will have to use the static keywork which permits you to use a class without instantiating it :
public class Class1
{
public static void PublicFunction()
{
}
}
public class Class2
{
public Class2()
{
Class1.PublicFunction();
}
}
Something along these lines will do it
Hugo Migneron
|
|
|
|
|
I am having problems using UDPClient.Send() in System.Net.Sockets. Each time
I make the call to the function, there is a significant delay from when the
code is executed to when the packet actually goes out. I took a look at the
traffic and found that each time the UDPClient.Send() call was made, two UDP
netbios messages go out on port 137. The device on the other end responds
each time with an ICMP. After two attempts, the .Send gives up, then
forwards the message.
The problem is, the huge delays in transmission are really throwing off my
timing. Why is the Send command tring to send out netbios messages? Can I
disable that? UDP is supposed to be connectionless. I just want to send
data with minimum delays!
|
|
|
|
|
You dont say which overload of Send you call. I suspect this one:
int Send(byte[] dgram, int bytes, string hostname, int port)
That method calls DNS.Resolve, and the likely reason for the 2 netbios messages. Use the IPEndPoint overload instead.
xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots
|
|
|
|
|
You are correct!! Than you so much, this fixed me right up!
|
|
|
|
|
opefiledialog can open file. what if i want to point to a dirctory?
(I mean using someting like dialog box to select a working direcory)
Thanks
|
|
|
|
|
You can use FolderBrowserDialog class
but this class is available in .net 1.1 or later
|
|
|
|
|
How can I dynamically change the order of tab pages in a tab control at run-time?
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
You can remove them
tabControls.TabPages.Clear();
and then re-add them in whatever order you want
tabControls.TabPages.Add(tabPageOne);
|
|
|
|
|
Hello,
How can I display the whole row from a dataset, using foreach statement.
foreach (DataRow row in this.dataset.Tables[0].Rows) {
Debug.WriteLine (---------------- What goes in here?-------------)
}
Thank you
|
|
|
|
|
You can loop through the items of a DataRow by accessing its Item or ItemArray property.
|
|
|
|
|
Hi,
Need to create a Datagrid in Datagrid dynamically. Both the Datagrids should be created dynamically, using a template column like Link buttons.The Link button click event has to generate the second datagrid. Is there any option sin crystal reports like this.
Kamesh Bora
Consultant
|
|
|
|
|
|
Hi
Is it possible to stop two running thread on cancelJob event
Any example
THanks
sanjeev
|
|
|
|
|
|
Hi,
I am trying to print a webpage to a postscript file. Ultimately the result is supposed to be a script/program that displays a web page and creates a pdf-document out of it. I decided to use the print function of the web browser because the page contains ACTIVE-X containers that display graphical charts and I don't know any other way to get the ACTIVE-X objects displayed on the page without running them inside a browser window before printing them.
I am displaying the web page inside an axWebBrowser window and then using the
"...ExecWB( SHDocVw.OLECMDID.OLECMDID_PRINT,SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER ..."
command to print to a normal "Generic PostScript Printer" to generate the PS file. All of that works fine, thanks to some of the helpfull posts on the CODE PROJECT page.
However, all of this is supposed to be an automatic script/programm that runs in the background and whenever I call the "print the web page" command, the printer driver displays a dialog window and asks for the file name of the PS-file that is supposed to be generated. I don't mean the "printer settings" dialog window, I was able to suppress that.
The question is: Is there a way to include the file name of the output file in the printer command OR is there any other way to automate the output of an XML-based web page containing ACTIVE-X objects as a PDF/PostScript?
Here are some ideas that I had. I have tried to find something on google about it, but wasn't successful. Any ideas?
(I am working with Visual C# .Net)
- find a function/command in C# that includes the name of the output file.
- change the printui.dll to somehow contain a default output name for the PS-file.
- find a printer driver that allows to define a default name for the output file.
- find a way to parse the XML and the active-X alements seperately, but HOW! If I don't display the active-X, it won't show the graphs, right?
cheers, Tobias
|
|
|
|
|
I've added to my form a status bar and 2 panels.
The status bar is on the bottom, while the first panel is on the left the second panel is on the right.
I want the first panel is of 50 pixel always.
The second panel became bigger if the user resize the window.
It should attached to the first panel but the right follow the right of the window...
I would the status bar do that to... but i've not success neighter with the second panel nor the status bar...
why?
|
|
|
|
|
For the panel on the left, set the anchor property to attach to the top, left, and (I assume) bottom of the form.
For the panel on the right, set the anchor property to attach to all four sides (top, bottom, right, left)
For the status bar, make sure it is docked on the bottom of the form.
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
Hi:
I am making a small Windows Service which reads an .EXE.Config (Configuration File).
This file needs to be in /bin/debug folder for Visual Studio .NET. Is'nt it?
Also, I observe that a Build Command/Rebuild Command deletes this file. And after every Build/Rebuild, I am needed to recreate this file.
Am I doing something wrong? Or does the location is incorrect?
Deepak Kumar Vasudevan
Personal Web: http://vdeepakkumar.netfirms.com/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|