|
Hi.
I'm developing a small aplication that runs in the startbar (using band bars). The problem is that it wont render the background as the XP themed startbar background (when I ise clasic style, it shows fine, but when I use Luna or anything else, it shows as it did on the classic style). So basicly it is an ugly gray rectangel in the middle of my statbar.
My theory is that I need to get the bitmap of the taskbar from the current .msstyle theme, and use it as the background for the aplication. I've seen some superficial tutorials in how to do this, bu they are in C++ and VB, and, I'm embarased to say, I can't understand what they are doing.
Any help would be apreciated.
|
|
|
|
|
Basically, you will need to interop the themes calls in C#, www.pinvoke.net will show you how. Then, you actually ask the themes API to draw the background, it does the drawing, it does not return a bitmap.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I'm sorry if this is too easy
I want to format a double value in the format of 0.##########E##.
I need that the value start with a 0, with the exponent properly adjusted.
For example, the value 405 should be formatted as 0.405000000000000000E+03 .
If I use {0:0.000000000000000000E00} the value shows up as 4.050000000000000000E+02 .
Any way to do this?
Thanks
|
|
|
|
|
I have a database app, i don't use multiple threads in the application; i just use one database connection open for the app life time and close it at the end. One thing i notice is then longer the app is active executing i see Threads exiting in the out put window, i dispose every SqlCommand & SqlDataAdapter after using. I wonder from where these threads are comin from ???
|
|
|
|
|
Hi,
How do do I animate the movement of a simple shape (a ball) across the
client area? --thanks
|
|
|
|
|
Easiest way - an animated gif. Drawing it yourself, set a timer, and draw the frames in WM_PAINT.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am facing problem with my custom control. Please help urgently.
My control inherits a Windows.Forms.Panel control. I have set the AutoScroll property of the base control (panel) to true. I added a PictureBox in the at location (Left = 0, Top = 0) in the panel control. Size of the PictureBox is large enough to show the ScrollBars for the base control (panel).
In the Paint Event handler of the picture Box I am drawing a rectangle.
To scroll (make it visible completely in the Client area) to the drawn rectangle, I added a transparent Label control and set its bounds(location, size) as of drawn rectangle in runtime after drawing the rectangle and called the Panel's ScrollControlIntoView method.
Scrolling works, but when I change the location and size of the rectangle to draw it to another location, the rectangle intersects the client rectangle of my control (i.e. not visible completely in the client rectangle).
How can I avoid it?
How do I know if my rectangle is intersecting the client rectangle?
Or
How do I position my transparent label such that it is completely visible in the client rectangle?
Or
Suggest me any other way
Thank You,
Gulfraz Khan
|
|
|
|
|
how can i implement the zoom over a picturebox?
And over custom controls?
|
|
|
|
|
|
Hi I have a web application where a user downloads a file(eg word doc) from a db, makes changes on the file. My question is, how do I get the edited file reuploaded into the db. Filename left intact.
|
|
|
|
|
You need to provide a file browser control ( they need to browse to the file and select it, then click on a button to upload ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christian. Thanks for your response. I'm talking about files that have previously been uploaded.
To clarify myself, the file is retrieved from the db, and written using the ffg line of code:
Response.Clear();
Response.ContentType = FILE_TYPE;
Response.OutputStream.Write(FILE_IMAGE,0,FILE_IMAGE.Length);
Response.AddHeader("Content-Disposition", "attachment;filename=" + FILE_NAME);
Response.End();
My question is, once the user makes changes to the displayed file, how do you reload the edited file into the db?
|
|
|
|
|
Even though the file comes from you, unless the user requests the file to be uploaded, I know of no way for IE to send the file back up again, even though it is running Word in the browser.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a listview with resizable columns that may potentially be wide enough to require a horizontal scrollbar. When I periodically refresh the contents of the lv it's position is always reset with the scrollbar shifted to show the leftmost part of the list. I want to keep the scrollbar position where it is, so that if the user is looking at items at the extreme right of the list they won't have to move the scrollbar after the update. Looking through the properties of the listview class I didn't see anyway to access this value.
|
|
|
|
|
Can anyone tell me either
a) how to find the user of a process
or, failing that
b) how to find the currently logged in user
with .NET1.1 under Windows 98 without WMI.
Dave
|
|
|
|
|
|
Argh - yes. However, that returns the user that is running the current process, not a specific process from the processes list. I suppose, thinking about it, it's probably the same thing under Windows 98, as there are no services so presumably no "system" users, and no fast user switching, so all processes must be run by the same user.
Also, I had very odd results with Environment.UserName - if I didn't set up any users on a new W98 installation then Environment.UserName returned "User" which must be some sort of default. However, I then set up a real user. Then, when I logged in, I hit Cancel on the login dialogue. Now, strangely, Environment.UserName returns blank. Go figure, as they say. I suppose W98 just doesn't handle users properly and there it is.
Nevertheless, thanks for getting back to me.
Dave
|
|
|
|
|
How to find file in hard disk?
|
|
|
|
|
Directory.GetFiles(directoryToSearch, fileName) where fileName can include wildcards
Ed
|
|
|
|
|
I have a simple application that takes a folder path and open in the windows explorer.
Here is the code i use
Process p = new Process();
p.StartInfo.FileName = "explorer.exe";
p.StartInfo.Arguments = strFilePath;
p.Start();
The problem is that when the filepath contains spaces it works just fine on my xp machine but on my clients machine which use windows 2000 the application fthrows the exception filenotfound.
I would like to know why it works on xp and doesn't on windows 2000
|
|
|
|
|
try by this
...
p.StartInfo.FileName = "iexplorer.exe";
...
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
Have you tried wrapping the path with embedded quotes.
"\"path with spaces\myapp.exe\""
-- modified at 11:04 Thursday 16th March, 2006
More generally, paste the exact string you send to the process class into the run dialog and see what happens there.
|
|
|
|
|
hi,
i am using DrawString method to display text in my Smartphone application when form is painted. i have added a method to the Paint event handler for this:
this.Paint += new PaintEventHandler(DrawMainPage);
when i get new data i have to repaint the form to inorder to show new data.
but when i call myform.invalidate() from different form then i gives me error that i have to invoke this method from the same thread.
i tried do upate my code accordingly (http://www.codeproject.com/csharp/begininvoke.asp)
but i get the same error.
will appreciate help.
regards,
rnv
|
|
|
|
|
Try making sure that you're Main function is marked with a STAThread attribute. If you're not using any multithreading that it
Ed
|
|
|
|
|
i would like to know how to read an image with c#
if u can give me a code in witch there are an example
developpement
|
|
|
|