|
Set the property FormBorderStyle to none. This should remove the caption bar. Then you can create one on your own.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
I have this problem I have been stuck on for ages!Can anyone help me out please??
I have a treeview. The nodes of this treeview are paths to a file that is to be showed in a webbrowser. When I click the link/node an html page is showen in the browser. Within this html-document there are internal links that are identified by the # sign. When the link is clicked the path will look like this:
file:///C:/Documents%20and%20Settings/froy/My%20Documents/Visual%20Studio%202005/Projects/TabHelp/TabHelp/bin/Debug/Teknisk.htm#lagring
You can see on the last part that "lagring" is a headline further down in the document Teknisk.htm. This means that when the root node is clicked the main document will be displayed (Teknisk.htm) and when the childnode is clicked it will jump down to the headline "lagring" using internal linking.
How is it possible to interpret the path including the # sign?
I get the path using the GetFullPath()- method, but when I include the # transform it to %23 (the hex) which is not interpretable by the browser.
Is there any possibility to get the full path including the last fragment and pass it to the browser?
Pleeeaasee help me.. this has tormented me for so long.
Thanks in advantage
Freya
|
|
|
|
|
The URL will work perfectly fine with the # sign. If for some reason the # is changed to %23, can't you change back %23 to the hash sign?
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
No.. unfortunately it doesn't.. it just stays as the %23 even if I hardcode the # using hex, ascii and whatever.. I have no more ideas left
Freya
|
|
|
|
|
I'm trying to create an instance of an object in a DLL dynamically and invoke a method on it, but an exception is thrown at the call a = Assembly.Load(absolutePath);
Assembly a = null;
string relativePath = @"..\..\MathHelper.dll";
string absolutePath = Path.GetFullPath(relativePath);
try
{
a = Assembly.Load(absolutePath);
Type mathHelperType = a.GetType("Vikram.MathHelper");
object mathHelper = Activator.CreateInstance(mathHelperType);
The exception message is
Could not load file or assembly 'c:\\vikram\\dotnet\\TypeReflection\\TypeReflect
ion\\MathHelper.dll' or one of its dependencies. The given assembly name or code
base was invalid. (Exception from HRESULT: 0x80131047)
The file is indeed there, and it is compiled under .NET 2.0, as is my code. From my VS command prompt, when I run ildasm c:\\vikram\\dotnet\\TypeReflection\\TypeReflection\\MathHelper.dll , it opens the DLL perfectly fine. What am I doing wrong?
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Vikram A Punathambekar wrote: Assembly.Load(absolutePath);
Common mistake, dumb method naming. Use Assembly.LoadFile()
|
|
|
|
|
Thanks, leppie.
I feel like a dork - Only 10 minutes before I typed that code, I used the LoadFile() method. I either forgot, or it was a case of oversight - neither of which is good.
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Same thing happened to me a week ago
|
|
|
|
|
Hi,
I want to display icon for menu items and i am using window application.
I look forward to the reply
-- modified at 3:36 Tuesday 21st February, 2006
|
|
|
|
|
Hi
I am trying to create a ActiveX object from a C# web service. When I create the object I get a "Permission denined" exception.
If I create the same object not from a web service, it works OK.
Here is the code:
V8O_PLU.CPluClass o ; // COM object
o = new V8O_PLU.CPluClass(); // exception occurs
Late biding causes same problem:
Type ObjectType = Type.GetTypeFromProgID("V8O_PLU.CPlu");
object po = Activator.CreateInstance(ObjectType);
Can anyone please advise why is this happening?
as I said, the same code works OK from a non-web-service code (e.g. WinForm).
Thank you.
|
|
|
|
|
The problem was that aspnet_wp.exe runs under the user ASPNET . The ASPNET user is defined as part of the Users group.
For some reason, on my development PC the ActiveX DLL's do not have permision for the Users to access. . Once I added the Users to the security list of my ActiveX's it works OK.
On my QA systems these DLL's do allow the Users group to run them. Strange.
|
|
|
|
|
Hey Howzit?
As you can see in the code below I am generating a Bitmap and saving it to disk, later in my program I display this .tiff file as the backgroundimage of a Panel. My question to you is, how can I generate multiple Bitmaps IN MEMORY (instead of saving to disk) and then display them later when I need to?
Thanks
using (Bitmap bitmap = new Bitmap((int)(scale * page.Width), (int)(scale * page.Height)))
{
Graphics graphics = Graphics.FromImage(bitmap);
graphics.SmoothingMode = SmoothingMode.AntiAlias;
graphics.ScaleTransform(scale, scale);
graphics.Clear(Color.White);
page.Draw(graphics);
bitmap.Save("C:\\" + Convert.ToString(_currentDPI) + "dpi.tiff", ImageFormat.Tiff);
}
|
|
|
|
|
Use class local variables. Create an array of bitmaps (or an arraylist). Create the bitmaps.
class BitmapGenerator {
private ArrayList bitmaps = new ArrayList();
public YourFunction() {
...yourcode..
bitmaps.Add(bitmap);
}
}
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Hey, thanks works, but now how to assign one of the bitmaps in the array to the background image of my panel?
|
|
|
|
|
Hi,
I am a newbie to C# and Im trying to redirect standard input, output and error of a console program written in C (MS VC 6.0) to a textbox on a form. The code for the redirecting looks like this:
private System.IO.StreamWriter c_StreamInput = null;
private System.IO.StreamReader c_StreamOutput = null;
private Thread c_ThreadRead = null;
private Process c_Process = null;
private void ReadStdOutputThreadProc()
{
try
{
string str = c_StreamOutput.ReadLine();
while(str != null)
{
txtboxCNF.AppendText(str+"\r\n");
Thread.Sleep(100);
str = c_StreamOutput.ReadLine();
}
}
catch(Exception) {}
}
private void btnStart_Click(object sender, System.EventArgs e)
{
if(c_Process == null)
{
c_Process = new Process();
ProcessStartInfo psi = new ProcessStartInfo("console.exe");
psi.UseShellExecute = false;
psi.RedirectStandardInput = true;
psi.RedirectStandardOutput = true;
psi.CreateNoWindow = true;
c_Process.StartInfo = psi;
c_Process.Start();
c_StreamInput = c_Process.StandardInput;
c_StreamOutput = c_Process.StandardOutput;
c_StreamInput.AutoFlush = true;
c_ThreadRead = new Thread(new ThreadStart(ReadStdOutputThreadProc));
c_ThreadRead.Start();
}
}
private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if (c_ThreadRead != null)
{
c_ThreadRead.Abort();
c_ThreadRead.Join();
}
if(c_Process != null && !c_Process.HasExited)
c_Process.Kill();
}
The console application that I am trying to run (console.exe) is a simple C program that prints a line text and then calls the getchar() function. The code is basically this:
#include "stdafx.h"
#include <conio.h>
int main(int argc, char* argv[])
{
printf ("Hello World !!\n");
int ch = getchar();
printf("Character = %s\n", ch);
return 0;
}
I have tried to run the C program without the getchar() function and it works. The problem arises when I use the getchar() function. I have tried getch() and gets() version without any success. I am not sure if I have to do anything special for showing output when using such functions.
Any help/pointers in this direction will be greately appreciated.
Thanks in advance.
Dribble
|
|
|
|
|
I think getchar requires EOL char (aka Enter or ^D i think).
|
|
|
|
|
Leppie,
Im not sure if I understood what you meant by getchar() requires EOL. Could you please ellaborate a little more?
Thank you.
Dribble
|
|
|
|
|
Hi guys,
Repeatedly am posting this question..But each time hopeful of getting solution from you.....
I have to export datas to Excel database...If i want to specify the Format of the data(that's:General,Number,Currency.....)..How can i do it?
Also,now am managed to assign a custom format for the cells like,
mExcelRange.EntireColumn.NumberFormat="#,###";(for integers...)...
Am exporting the data and setting the format for them ,each seperately provided that datas are in a datatable...If i set the range,then asssign the (custom)format for each datacolumn..the result is tht the format that has been set for the lastly iterated column is been set to all other columns too..
Please help me in tackling these two problems...
1.Setting Format for cells..
2.Setting Range...
Thanx
|
|
|
|
|
Hmmmmm...... i don't know much about it, but try:
http://msdn.microsoft.com/vstudio/products/compare/default.aspx
There you can find what options you have in differant versions of VB.
|
|
|
|
|
I want Paging for DataGird in WinForms. i use Dataset/DataTa ble fill Data on DataGird
can u move solve this problem to me. The Best if u give Example to me
So I think to syntex Select Top but it unable.
I try to use syntax ds.table["name"].Select , ds.table["name"].Rows['number'] but unSuccessful
it dose'nt get 10 rows in dataset
thanks
Mr AnhTin
|
|
|
|
|
I am having a problem compiling DirectX in my C# apps. I get the following error during compile time.
type or namespace name 'DirectX' does not exist in the class or namespace 'Microsoft' (are you missing an assembly reference?)
I installed the DirectX 9 SDK after installing Visual Studios. Am I missing something. When I enter "using Microsoft." DirectX does not come up on the list.
Thanks,
Leo T. Smith
|
|
|
|
|
Leo Smith wrote: DirectX
Add a reference in your project references to Microsoft.DirextX.dll
|
|
|
|
|
how do i get the row and column count of an excel file using C#?
Thanks very much!
|
|
|
|
|
|
I try to write a class that extends Form like that:
<br />
public partial class BaseForm : Form<br />
{<br />
<br />
public BaseForm()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void BaseForm_Load(object sender, System.EventArgs e)<br />
{<br />
MessageBox.Show("Hello, World!");<br />
}<br />
<br />
}<br />
And then I write a class that extends class BaseForm
<br />
public partial class MyForm : BaseForm<br />
{<br />
<br />
public MyForm()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
}<br />
I rebuild project and open MyForm to design, it suddenly appears "Hello, World!" message box.
I think it is a stupid feature in VS 2005 (I didn't check it in VS 2002, 2003 yet). How can I turn off this feature?
http://t800t8.blogspot.com/2006/02/thc-thi-s-kin-load-khi-ang-design-form.html
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
-- modified at 19:58 Monday 20th February, 2006
|
|
|
|