|
Hi
I have a website with 3 frameset. I need to know how do I code the linkbutton_click event to open another page but in another frameset.
I already try Response.Redirect("another.aspx"); but it opens the page in the same frameset where the linkbutton is. I know how to set the target in a hyperlink, but not in a linkbutton
Any help would be appreciated
Thanks
|
|
|
|
|
|
Hi,
I need to create a file and the data I am writing to it needs to be in the following format.
"CAT",2,13.0,"X"
How can I write out the data so that some of it is quoted and some of it is not?
Also, I have a non quoted file which i write using Stream Writer and it works fine. I have noticed that Stream Writer automatically puts a new line at the end of the file. How can I remove this line or control when the file writes a new line?
Thanks in advance.
Stephen McAllister
|
|
|
|
|
Have you tried backslash befor quotes?
something like this:
string towrite = "\"CAT\",2,13.0,\"X\"";
and for and-of-line symbol - are you using WriteLine() method? Try to use Write() method instead.
Robin Panther
|
|
|
|
|
Is there a max number of nodes that can be created in the Treeview control? If so, what is the max number?
Best,
Jerry
"Making money is art and working is art and good business is the best art of all."--Andy Warhol
Toasty0.com
|
|
|
|
|
As far as i know - u can add nodes until u run out of resources.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
Why should a treeview has max number? I think it doesn`t have it.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Hello!
Does anybody know how to insert text into bookmarks in Word using late binding? If I use early binding everything works fine.
What I want to implement is somthing like this:
for (int i = 1; i <= document.Bookmarks.Count; i++)
{
object objI = i;
document.Bookmarks.get_Item(ref objI).Range.Text = "Some text";
}
but using late binding instead.
Tommy Fransson
|
|
|
|
|
Hi
I use OleDb to access MSAccess database, allways successfuly with out password, but when I set database password from Access (menu-> Tools-> security-> Set Access Password )it fails to connect even if i use the same password in the connection string such as:
conStr = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;password=<thepassword>;Data Source="+ DataDir + DataBaseName + .....
the error message is [cannot start your application. The workgroup information file is missing or opened exclusively by another user.]
is there any way to set a pass word for a data base so it can not be opened from access and available from the application please?
|
|
|
|
|
In Javascript, I used this method to open a browser: window.open(URL) but I dont know how to use this way to open a new window in C# (Im writing a web page using ASP.NET with C#). Can u tell me about this?
Thank you in-advance!
|
|
|
|
|
You still have to use your javascript code, cause ASP.NET is a server-side technology and therefor cannot provide a functionality like window.open .
www.troschuetz.de
|
|
|
|
|
Hi
In my code I have:
ICodeCompiler compiler = codeProvider.CreateCompiler();
And a warning appears in VC# 2005 saying:
'System.CodeDom.Compiler.CodeDomProvider.CreateCompiler()' is obsolete: 'Callers should not use the ICodeCompiler interface and should instead use the methods directly on the CodeDomProvider class. Those inheriting from CodeDomProvider must still implement this interface, and should exclude this warning or also obsolete this method.'
How can I sort this out?
Thanks
|
|
|
|
|
Just use the CodeDomProvider class directly as it suggests.
- Nick Parker My Blog | My Articles
|
|
|
|
|
I want my application to run most of the time as just an notify icon visible in the system tray, with some dialogs that pop up if the user selects an option from the context menu on the tray icon. I've had a look at the example on code project that creates an application that runs in the system tray:
http://www.codeproject.com/csharp/desktop_mail_checker.asp
So I copied how the above article sets up the main form: the form's FormBorderStyle to none, set it to minizied, disable the titlebar controls (maximize, minimize, close etc). It was all fine until I noticed that the form was visible in the Alt-Tab menu and once you had alt-tabbed to it there was no way of hiding it again
After a bit of googling I discover if I set the Form's FormBorderStyle to FixedToolWindow then it was no longer visible in the Alt-Tab menu, result! But today I have noticed that now I can no longer minimize or hide the form it appears as a minizied tool window in the bottom left of my desktop when the application is running and even worse if the user double clicks on the title bar the window expands to its normal size, apart from the form is empty and there's no way to minimize it again!
Anyone got any ideas as to how to completely hide form so its not visible as a window on the taskbar or on the alt-tab menu? All I want is my application's icon in the system tray while its running and a context menu for the icon. I don't really need the main form at all!
Cheers,
CoffeeZombie
|
|
|
|
|
use the form's Visible property. U dont need to change BorderStyles or anything.
A sample code could be (in this example I want the app to minimize to taskbar):
private void Form1_LocationChanged(object sender, EventArgs e)
{
if (this.WindowState==FormWindowState.Minimized)
{ notifyIcon1.Visible=true;
this.Visible=false;
}
}
A better solution when ur main form does not serve any purpose as in your case, is to not use any main form at all and create your own ApplicationContext. An example would be:
public class AppStart:System.Windows.Forms.ApplicationContext
{
[STAThread]
static void Main()
{
Application.Run(new AppStart());
}
NotifyIcon myIcon;
public AppStart()
{
myIcon=new NotifyIcon();
myIcon.Icon=SystemIcons.Information;
myIcon.Visible=true;
myIcon.DoubleClick+=new EventHandler(myIcon_DoubleClick);
}
private void myIcon_DoubleClick(object sender, EventArgs e)
{
Form1 myForm=new Form1();
myForm.Closed+=new EventHandler(appForm_Closed);
myForm.Show();
myIcon.Visible=false;
}
private void appForm_Closed(object sender, EventArgs e)
{
((Form)sender).Closed-=new EventHandler(appForm_Closed);
myIcon.Visible=true;
}
}
|
|
|
|
|
Aha! I knew there would be some way of getting rid of the main form completly! I just could not work out what the name of said object/class would be and now I know, an applicationcontext!
Cheers!!
|
|
|
|
|
i'm writing a messenger program but i don't know how to active the form like yahoo when have a new message arrives. is there any way to slove this problem
|
|
|
|
|
is there any method to get items in "applications tab" in "windows task manager"
|
|
|
|
|
I don't know if the BCL provides a method to do so, but the EnumWindows API funcion provides that functionality. The idea is only to enumerate the visible top level windows.
You can call this routine in C# through P/Invoke.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
is there any method to insert gif image (not bitmap) into richtextbox ?
|
|
|
|
|
|
i created a user control that has a collection as a property when i add the control to a form i can see the collection in the control properties and i can bring up the collection editor however everything is disabled how to i enabled so i can add new strings via the collection editor in the properties window.
thanks
|
|
|
|
|
I need an example about how can I view an jpg image file and write it into a file in C#.net.
Especially if I want to download jpg from an internet url by http.
Or how can I create a bitmap or image object directly from the url adress, I tried stream objects but couldn't manage it. If it is not possible, how can I save an image file from a http url? then I can use it to create bitmap object. Please give an example code...
|
|
|
|
|
|
I am trying to send email using the simple mapi. I cannot download the example because the server seems to be unavailable, so I wonder if anyone can help.
The problem I have is how to handle the MapiRecipDesc field in the MapiMessage structure. Apart from this it all works except I can't fill the Address field. I have the following declarations
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
public class MapiMessage
{
public uint ulReserved=0;
public string lpszSubject="";
public string lpszNoteText="";
public string lpszMessageType="";
public string lpszDateReceived="";
public string lpszConversationID="";
public uint flFlags=0;
public MapiRecipDesc lpOriginator;
public long nRecipCount;
public MapiRecipDesc lpRecips;
public ulong nFileCount=0;
public MapiFileDesc lpFiles;
}
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
public class MapiRecipDesc
{
public ulong ulReserved=0;
public ulong ulRecipClass=0;
public string lpszName="";
public String lpszAddress="";
public ulong ulEIDSize=0;
public IntPtr lpEntryID = IntPtr.Zero;
}
and in the body I do
public const uint MAPI_TO=1;
MapiMessage message= new MapiMessage();
MapiRecipDesc recipDesc =new MapiRecipDesc();
recipDesc.ulRecipClass = MAPI_TO;
recipDesc.lpszName = "Fred";
recipDesc.lpszAddress = "someone@somewhere"
message.lpszSubject = "test subject";
message.lpszNoteText = "test message";
message.nRecipCount = 1;
message.lpRecips = recipDesc;
Ray
|
|
|
|