|
Hi All,
I want to print A file with its format in my programe.
can any one help me.
merwa
|
|
|
|
|
Look at the PrintDocument component. This allows you to draw stuff using the Graphics object, just on paper rather than the screen.
|
|
|
|
|
Hi!!
I'm creating this aplication that uses crystal reports..
to bind data (after filling dataset) to report i'm using:
<br />
MyDataSet ds;<br />
...<br />
crDoc.Subreports[0].SetDataSource(ds);<br />
crDoc.Subreports[1].SetDataSource(ds);<br />
crDoc.Subreports[2].SetDataSource(ds);<br />
<br />
crViewer.ReportSource = crDoc; <br />
and then a database login prompt shows.
there are 4 textboxes to fill:
'Server Name' - Enabled = false, Text = "MyDataSet"
'Database' - Enabled = false, Text = ""
'Login ID' - Enabled = true, Text = ""
'Password' - Enabled = true, Text = ""
and whatever i input it returns 'logon failed. please try again'..
anybody had a problem like that??
is there any solution/workaround to this?!
thanks for any help
-- modified at 9:30 Wednesday 13th June, 2007
i forgot to add that this happens only in release mode - in debug mode everything works fine. and the prompt shows only in one report.. i've got two other and they work fine..
life is study!!!
|
|
|
|
|
Hi Friends..I have a ultrawebgrid..after selecting a row and pressing delete key in Keyboard.the selected row got deleted..I want to disable that option..Plz help e..
Warm Regards,
Rahul
|
|
|
|
|
Please don't multi-post, and this question would be better asked on the Infragistics forums.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
you can adjust the keys that the object uses by selecting the relevant keys in the option of the shortcut keys in the object properties.
|
|
|
|
|
Hi Friends..I have a ultrawebgrid..after selecting a row and pressing delete key in Keyboard.the selected row got deleted..I want to disable that option..Plz help e..
Warm Regards,
Rahul
|
|
|
|
|
Hello,
I have a collection class I wrote.
It is marked as Serializable .
Every class which instances are to be stored in the collection are marked as Serializable as well.
I create an instance of the collection in my main form, and handle it from there.
When I try to serialize the collection using a BinaryFormatter , I get an exception saying that my main form is not marked as Serializable .
Why on earth does it look for a Serializable attribute on the main form??
What am I missing here?
Thanks in advance,
Shy.
|
|
|
|
|
Please provide sample code.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Here is the main concept of how stuff get done:
[Serializable()]
public class TaskCollection : KeyedCollection<......>
{
......
}
public partial class MainForm : Form
{
...
private TaskCollection tasks;
...
public void DoSave()
{
string fileName;
// Do stuff and figure out fileName
TaskSerializer.Serialize(tasks, fileName);
}
...
}
public static class TaskSerializer
{
...
public static bool Serialize(TaskCollection tasks, string file, out string errorMsg)
{
FileStream stream = null;
// Validation and preperations for serialization
try
{
// Validation and preperations for serialization
IFormatter formatter = new BinaryFormatter();
stream = new FileStream(file, FileMode.Create, FileAccess.Write);
formatter.Serialize(stream, tasks);
errorMsg = string.Empty;
return true;
}
catch (Exception ex)
{
errorMsg = ex.Message;
return false;
}
finally
{
if (stream != null)
{
stream.Close();
stream.Dispose();
}
}
}
...
}
|
|
|
|
|
Somewhere in the collection chain, there is a reference to the form. This should be marked as NonSerialized. Note that serialization works throughout all of the referenced member types, so you may find that it's in a class that you didn't even think was being serialized.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Problem solved...
It appears that events are also serialized, which makes the Serialize() method go through the entire invocation lists inside of the events, and serialize them as well.
This ends up in the objects registered to handle the events (the main form in my case) also getting serialized.
So the solution I chose was to implement ISerializable , and prevent the events from getting serialized.
Thanks for you guidence,
Shy.
|
|
|
|
|
Hi guys,
I am currently writing a console text adventure in C#.
My last version just diplayed text depending on their input and actions, clearing the screen each time and displaying new information about the room its name etc.
What I would like to do now is set up two different screens, or buffers in the console window.
One thats like an information bar which sits at the top, and the bottom half will contain everything they have typed and all the input thats come from their actions, and I would like it so they can scroll up and down the bottom bar.
I have had a look at screen buffers and the different settings that go along with it, I am just not exactly sure how to declare them. If the matter is too big to describe maybe someone can point me to somewhere where I can read up on it? (I find it difficult to find information for console application programming in C#).
Anyway to give you an example of what im aiming to achieve...
(In the console window)
Top section
+-----------------------------------------------------------+
|Room: Blue Room Directions: North South East |
| |
|Description: This room is blue! |
| |
|Visible Items: Tree Chair Desk |
+-----------------------------------------------------------+
Bottom Section
south
You are here
north
You are here
get tree
You got the tree!
Input: _
the bottom section is like a chat window that scrolls up and down, the text looks like its moving under the top window but your just moving the buffer up or whatever.
|
|
|
|
|
Why do you insist on using a console ?
seems to me a simple Windows app with say a textbox on top, and a scrolling listbox
at the bottom would fit your requirements. And it would look a lot nicer.
|
|
|
|
|
Nostalgia.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
OK
|
|
|
|
|
Thats like asking why would someone rather learn C++ than C#. =)
|
|
|
|
|
I would rather re-implement an ancient adventure game than learn an ancient language...
|
|
|
|
|
i have a widows service from which i need to invoke(Run) a windows application !! well i had a function which did that for me.In my computer having (windows xp 2002) i have only one account on which service in installed and run .. and it works fine but when i move to another machine windows 2000 server which have more than one account and i am not log in as administrator than it does not worl the process is shown on task manager only.. can any one suugest me where is the problem i will post a method which invokes application from my service in my computer.
public string LaunchProcess(string processname)
{
bool ret = false;
PROCESS_INFORMATION pi = new PROCESS_INFORMATION();
STARTUPINFO si = new STARTUPINFO();
//Optional Startup Information.
si.cb = (uint)Marshal.SizeOf(si.GetType());
//Specially useful when Launching Apps from a non-interactive Service.
si.lpDesktop = @"WinSta0\Default";
si.dwFlags = STARTF_USESHOWWINDOW | STARTF_FORCEONFEEDBACK;
si.wShowWindow = SW_SHOW;
ret = CreateProcess( null,
new StringBuilder(processname),
IntPtr.Zero,
IntPtr.Zero,
true,
NORMAL_PRIORITY_CLASS,
IntPtr.Zero,
null,
ref si,
out pi);
if (ret == true)
{
Process p = Process.GetProcessById((int)pi.dwProcessId);
}
else
{
Process.Start(processname);
}
}
well i am a c# programmer(for saying).. plz do help me ((
|
|
|
|
|
try this
System.Diagnostics.Process.Start("nameofapplication");
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
Also check in your service settings that the service can interact with the desktop.
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
I want to hide or remove the default text in a textbox (or table) I one report parameter is an empty string. How do I do that? I’m using rdlc and the ReportViewer in Visual Studio 2005.
_____________________________
...and justice for all
APe
|
|
|
|
|
first you need to select the text you want to delete then you delete it:
textbox1.Select(int index, int count);
textBox1.Selected = String.Empty.
|
|
|
|
|
Hi,
I'm working on a project where we need to use a ftp client for downloads and uploads. We formerly used a project downloaded from the internet, FtpFactory. This programm only supports passive mode.
We need to use PORT mode now. All goes well for downloading a file from the server. I use a socket that listens to the port I specified and when data is received it triggers a specific method:
socket.BeginAccept(new AsyncCallback(this.AcceptCallback), listensocket);
private void AcceptCallback(IAsyncResult ar)
{ .. start processing incoming data... }
However I also need to be able to upload files. I just can't get the better of this problem. Can someone help me on this one. The socket I'm listening on is not connected, so I cant use it for uploading (sending).
Thanks in advance,
Roeland
|
|
|
|
|
Good Day Sir/Maam,
Whats the best way to temporarily stop a loop and wait for a mouse click on a command button before proceeding?
while(True)
{
//Dothis
getch();
}
Just like the above code, but this time, not a key press but a click event on a command button.
Thanks in advance.
|
|
|
|