|
I've created a number of overdrawn controls (status bar, group box) and they drawn fine, and as i want. However if you move another window over the window with these controls, you get odd kinda painting on the controls, kinda like window borders left over, etc. I would guess by getting all the controls to redraw themeselves would work, but I can't seem to get this sorted. i tried overidding the OnGotFocus in the main form on which these controls reside to call Invalidate(true), but it doesn't seem to work.
Any ideas??
[Edit]
I've managed to solve this by calling the Invalidate in the Frosm Activate event. However I still the same problem when say a drop down box (an owner drawn one) drops the list over the owner drawn controls. is there anyway of solving this short of calling invalidate alot, which. All the owner drawing is done by overriding the OnPaint in the pretty standard way.
[/Edit]
|
|
|
|
|
You need to do this in the constructor:
this.SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.DoubleBuffer,true);
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
There all ready set in the constructor. Thats why it's puzzling me a little.
|
|
|
|
|
You don't know how many times I've gone through owner draw problems like this. That's why I'm glad we're now re-implementing all Windows controls from scratch[^], with full owner draw/skinning capabilities. I've been named design leader for the project.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Sounds like a good idea. I'll be sure to follow the project. Will you guys be posting your progress? if you want testers in the future let me know.
|
|
|
|
|
I used Erik's tutorial to build a Toolbar (a .dll file) and now that I've created the DLL Toolbar, I don't know how to insert it into Internet Explorer.
How do I do that?
10X!
|
|
|
|
|
You also have to register it in Internet Explorer's toolband list in the registry. This article[^] shows how to do it.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I have this text file "demo.txt" that's just straight 1 and 0s, no formatting or anything...
I need to format the file like this...
28 columns with a space between each, and with 2 characters in each... like this...
00 00 00 00 00 00 00 01 01 01 C1 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 20
and after 28 columns start a new line, continue to the end of the file, "demo.txt"
How can I do this?
/\ |_ E X E GG
|
|
|
|
|
give you a hint
type this at the top
using System.IO;
and when you type something like System.IO.
wow file streams appear.
Your creating a binary file so yes you would use to binary writer/reader.
Now as your professor told you, read a book. Or look up a file writing article on here. I did.
good luck
|
|
|
|
|
Bravo
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
If you get stuck ask a question, but try the binary writer
hit f2 and search for BinaryReader
myBinaryReader.GetByte() and the like
its not a good link, but a link all the same
http://www.c-sharpcorner.com/database/SharpHSQL.asp
|
|
|
|
|
i want to create a dynamic collection / array of string or any
other object type and by that avoid casting.
how can i do that?
-- Directly From Zion --
------ Haimon15 ------
|
|
|
|
|
haimon15 wrote:
i want to create a dynamic collection / array of string or any
other object type and by that avoid casting.
I have written an addin for vs.net 2003, you can look at:
http://www.thecodeproject.com/csharp/CollectionBuilderAddin.asp
It uses a template that is available in the .NET Magic library. If you find this helpfull you can vote for it on the addin competion:
http://www.thecodeproject.com/script/survey/survey.asp?survey=297
Be sure to look at the other addins as well, besides mine, my favourites are LineCounter and Code Store.
Cheers
ES
|
|
|
|
|
I'm using a datagrid to display information from a dataset.
I added a "delete button" and wish to delete the selected cell in the datagrid. But I have the following problems..
1.- If I rearrange the rows by clicking on the column header of the datagrid, I can no longer find the correct row corresponding to the database using the currentcell.row #.. the currentcell.row would say something like it's row #3 which does not correspond to row #3 in the dataset since I rearranged the rows in the datagrid.
2.- I cannot either manually look for the corresponding row in the database using the currentcell info, because when I displayed the information on the datagrid I ommited the primary key.. So I cannot retrieve this primary key from the currentcell..
Does anyone know of a workaround or a way to actually save the dataset row object with each row of the datagrid??
As always I thank you for any help!!
|
|
|
|
|
Current row in DataGrid (from WinForm) is a row number from DataView, not from DataTable. You can get DataView object from DataGrid object protected(!) property:
(DataView)(myDataGrid.ListManager.List)
Hi,
AW
|
|
|
|
|
Hello,
In my application, I am trying to find the duration of a video clip (IWMPMedia interface) that I loaded into a Playlist object. However, the duration attribute is not defined. If I load an .mp3 (as the WMSDK (version 9) C# example does), the duration element is defined. Is this a limitation of the windows media SDK, or is there something else I need to do?
Thanks,
Brad
|
|
|
|
|
For anyone interest, a temporary solution is to use the AudioVideoPlayback component of managed directx. All you have to to is make a new instance of a Video and examine the duration property for the time in seconds.
|
|
|
|
|
Hello All,
I would like to create an assembly which will pickup a list of (10) printer info. and then install those (10) printers into a server. This server has one purpose -- printers. I will have the IP addresses, the ports, (maybe permissions- roles, users etc.), and the printer names. Additionally , I am going to install the printer driver.
What .NET Framework objects will I need to do this?
I am not a systems guy, so I am not sure if there is more than one scenerio for setting up the operating system . I am hoping it will be an "Active Directory" environment. If you are knowledgeable about these options I would also appreciate it if you could tell me what are the environment options.
Any bits of code in C# which show me the ,(.NET Framework Objects), "objects of my desire" would be great!!
Thank You in advance for Your Help
Ken
|
|
|
|
|
any one here know how the Microsoft update site animates the files/downloads when the user clicks on it?
|
|
|
|
|
hello,
sorry if this is asked somewhere, I have looked but didn.t find exactly what I was looking for.
I am looking for a simple/sample script of connecting to a pop server via C# from a web page.
I can find many examples of connecting via a "application", but not from a web form. Any links to articles/samples would be very much appreciated. Thanks again
CS
|
|
|
|
|
Take a look under the ASP.NET articles[^] General section, I believe I have seen a few articles in there covering something like this.
-Nick Parker
|
|
|
|
|
I am writing a logistics application suite. It will have a main program, a maintenance program, an order entry program, and an admin program. The main program will just control security while all other applications are running. Whenever any of the other programs start up, first it is going to check if there is already an instance of the application running using System.Diagnostics.Process.GetProcessesByName(). If there is then it will just activate that instance. If there isn't then it will then check if there is an instance of the main application using System.Diagnostics.Process.GetProcessesByName(). If there is an instance of the main application, then it will just get a reference to the user object from the main program. If there isn't an instance of the main application, then it will create a new process of the main application with System.Diagnostics.Process.Start(), which will require the user to log in and that will intialize the user object. Then the executing program will get a reference to the user object from the main program that was just started. I hope this explains everything I am trying to do. If you have any suggestions on how to do this or of a better way to reach the desired outcome, I would greatly appreciate it. Thanks
Shaun
|
|
|
|
|
Since it is different applications using different AppDomains, you will probably want to go with a remoting singleton object. That would allow you to share the single instance between the applications.
You could spin off an invisible WinApp UserData server module that will host your remote object. The UserData object could have a reference counter property to track how many client connections it currently has. When an application starts, if the UserData server is not in the proccess list, then it would start the UserData server, and call the UserData member to display and validate the login. Of course, if the server is already running then it does not do the login since the login has already occured and the UserData object will have your login instance.
After the server is confirmed to be running, the program that was launched would remote connect to the UserData object and increment the ref count. When a application is closing, it decay the ref counter by one and if it is zero, it would trigger the UserData server to close.
Rocky Moore <><
|
|
|
|
|
Do you have a code example of what you are talking about, because I am not quite sure how to implement what you are talking about? Thanks
|
|
|
|
|
Yeah, I can through together a little sample for you tonight. Just heading to bed at the moment, but will e-mail it to you later tonight.
Rocky Moore <><
|
|
|
|