|
Hi guys
i am doing a desktop application in C#. I have two master forms. in a child form i want to inhert any one of a master form dynamically based on a value (say msdesign). How can i do this?
Regards
Hari
aspspider.net/rkharikrishnan
|
|
|
|
|
Hello to all,
Is there a way to add a meta data or tag to each frame of the TIF image? I have a project that gets a certain frame from a TIF file. The frame will be saved or appended to another TIF file which already has an existing frame in it. My problem is that I need to save the name of the file from which the frame originated and what page. For example, frame 0 is from file: TIF1.TIF and frame 1 is from TIF4.TIF and frame 2 is from TIF2.TIF.
Thanks in advance.
|
|
|
|
|
The TIF format allows for such metadata, I think there are some code samples on how to do this, but I'm not sure where I've seen them. Have you googled ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello,
I'm a new to C# and am practicing Image Processing Code with C#.
I practiced a very simple code:
1. One MenuStrip (menuStrip1) which holds File->Open
2. One PictureBox (pictureBox1)
Just read from image file and display it on PictureBox.
Moreover, I want to add scroll bar if the image size is bigger than the initial form.
Here code fragment for reading image and set the AutoScroll and AutoScrollMinSize.
private void openToolStripMenuItem_Click(object sender, EventArgs e)<br />
{<br />
<br />
...<br />
img = Image.FromFile(openFileDialog1.FileName);<br />
this.AutoScroll = true;<br />
this.AutoScrollMinSize = img.Size;<br />
<br />
pictureBox1.Image = img;<br />
...<br />
}
However, I found some defects that if I move the scroll bar in X or Y then the MenuStrip is also moved.
How can I fix this problem? That is, I want to scroll only the image on PictureBox.
Regards,
-- modified at 22:43 Tuesday 26th September, 2006
|
|
|
|
|
Hi,
I created a dataset with the designer of the VS 05 and added a query into it.
I found out that this query takes some time on slow computers and I want to make the CommandTimeout larger.
I checked the properties of the query and I can change several parameters like the CommandText and the CommandType, but the CommandTimeout is missing.
I don't want to change the CommandTimeout within the code generated by the designer, because it will be deleted each time I update the scheme.
So how can I do this without changing the designer's code?
I thought about using partial class, but I don't have an idea of how to do this.
Ami
|
|
|
|
|
I have C# application in .Net 1.1 that is trying to move a file using the File.Move() method.
It catches the following IOException.
System.IO.IOException: The process cannot access the file "C:\DOCUME~1\autolab\LOCALS~1\Temp\QbgEsQueues\trwq\1083.S2R.processing" because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.File.Move(String sourceFileName, String destFileName)
at QBGES.InterprocessBase.GetNextMessage()
Is there a way for me to find out which process was accessing the file, to cause the File.Move() to fail?
Thanks.
ssalem
|
|
|
|
|
Did your code create the file ? Did you remember to call the Close method on the file ? If this is not the problem, then I'm not sure how you can find out who the culprit is. But, it looks to me like a temp file that's been created by a process which is probably using it, and will delete it when done.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
My code did not create the file. Another application did and it closes the file and exits, so I know it didn't lock the file.
Is there a native Windows API that I can call to get the process name/handle of the process that has locked the file?
|
|
|
|
|
Hi all. I am developing my desktop application in C# 2005. I have a File menu. In its submenu , i have OBTAIN API. I want when i click on it, it redirects me to the desired site like www.google.com. Please tell me how to call a specific website from the desktop application? Thanks a lot for your consideration.
|
|
|
|
|
If you pass a URL to Process.Start, it will open the site in your default browser.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have tried this:
private void tsmi_obtainAPI_Click(object sender, EventArgs e)
{
Process.Start("www.google.com");
}
it returns the following error:
The name "Process" doesn't exist in the current context. Would you please help me out in this? Thanks
|
|
|
|
|
System.Diagnostics.Process.Start, apparently.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks a lot Graus, it works now. I am really thankful to you
|
|
|
|
|
Hi,
process1.StartInfo.FileName="iexplore";
process1.StartInfo.Arguments="NishuSoft.com";
process1.Start();
<marquee>nishu
|
|
|
|
|
Hi guys,
I am trying to use ReturnCodes in my application and I am getting an error saying the type or namespace name 'Return Codes' could not be found(Are u missing a Using directive or an Assembly reference?)
any suggestions please
sasa
|
|
|
|
|
|
What are you trying to suggest here?
sasa
|
|
|
|
|
That you need to learn some basic stuff and it will be in those tutorials.
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
Thank you Mike, you are good man
sasa
|
|
|
|
|
What exactly are you trying to do?
If you want to return a code from your application change the signature of your application to static int Main() .
If that's not what you want, please show the related code especially the line with the given error.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I am trying to get the ReturnCode for an smtp mail that I am sending and if the mail doesn't go through than use a while loop to keep trying until it goes through.
SmtpMail.Send(msg);
sasa
|
|
|
|
|
AFAIK there is no return code so you will be out of luck here.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi there!
Please help, I am totally lost on this one. I have a service application that sends out emails every minute based on a sql output. The weird thing is I get 4-5 emails and then I get the above error and then again I get 4-5 mails and again get the above error.
Any suggestions please.
sasa
|
|
|
|
|
I am trying to accomplish Kerning, so far I have it somewhat working. By using the win32 function
[DllImport("gdi32.dll", EntryPoint= "SetTextCharacterExtra")]<br />
public static extern int SetTextCharacterExtra(IntPtr hdc, int nCharExtra);
I am getting spacing between characters. The issue is no matter what value I put for the nCharExtra parameter the spacing is always the same.
Here is how I am trying to do it.
win32.SetTextCharacterExtra(g.Graphics.GetHdc(), horizontalSpacing);<br />
g.ReleaseHdc();<br />
g.DrawString(holdText, this.Font, new SolidBrush(this.ForeColor), 0, 2);
I have also tried doing
IntPtr hdc = e.Graphics.GetHdc();<br />
Rect bounds = new Rect(e.ClipRectangle);<br />
<br />
win32.SetTextCharacterExtra(hdc, horizontalSpacing);<br />
win32.SetBkMode(hdc, win32.TRANSPARENT);<br />
win32.SetBkColor(hdc, ColorTranslator.ToWin32(Color.Black));<br />
win32.DrawText(hdc, holdText, holdText.Length, ref bounds, win32.DT_LEFT);
Does anyone know a solution to this issue, or another way in which I can accomplish Kerning?
Thanks,
Jeremy
|
|
|
|
|
hi i just learn c# and i got problem with my window programing i use microsoft acess as my database and i want to connect to my c# and i can connect it the problem is after that i update my database add a new colomn and in c# i cannot acess that new column
can u help me to solve the problem
thanks
|
|
|
|