|
My window looks like this:code:
The window has to be much taller than the text to accommodate the rotation. The window itself is transparent. When I drag the window to the edge of the screen, the blank space above the text is forced back onto the screen. For some reason, either Windows or WPF won't let that area extend off the desktop. edit: The bounds aren't changing.
|
# ? Aug 6, 2007 22:45 |
|
|
# ? Jun 10, 2024 19:30 |
|
SLOSifl posted:My window looks like this: I think the Window manager is yanking your window back into view. Apparently setting Top on the window bypasses this - at least on Vista. Drag the blue area to move the window, click on the orange to rotate the rectangle. XAML code:
code:
|
# ? Aug 6, 2007 23:25 |
|
Any ideas on how to remove an event handler that was defined as an anonymous function?code:
|
# ? Aug 7, 2007 14:18 |
|
Dromio posted:Any ideas on how to remove an event handler that was defined as an anonymous function? code:
|
# ? Aug 7, 2007 14:37 |
|
csammis posted:You need a reference to the handler method:
|
# ? Aug 7, 2007 15:26 |
|
The .NET thread seems like a good place to ask this: I need a T-SQL book. I've never really had much experience with T-SQL. I did a lot of Oracle PL/SQL back in school, but now I'm really out of touch with database work of any type. Looking at a new job that uses T-SQL in an application environment. I'm educated with stored procedures and database theory, but am quite rusty and need a refresher specific to T-SQL. With that in mind, what do you people using it recommend for a book.
|
# ? Aug 7, 2007 17:14 |
|
Doesn't anyone have an answer for this question? Is there a valid reason to design stuff this way, or is it just a case of overusing asynchronous methods?dwazegek posted:I came upon a piece of code which was something like this:
|
# ? Aug 7, 2007 18:29 |
|
dwazegek posted:Doesn't anyone have an answer for this question? Is there a valid reason to design stuff this way, or is it just a case of overusing asynchronous methods? Can there be multiple requests running at once? Does the thread that's created have stuff to do other than wait for responses? I see nothing in your example that indicates asynchronous calls are a bad idea.
|
# ? Aug 7, 2007 21:17 |
|
SLOSifl posted:Just because the calls were at the end of the method doesn't mean anything. It depends on how long the request takes. Otherwise, the method would be blocked from exiting until the response was received. Yes, there are multiple requests running at once. Each request connects to a source over a HTTP connection and starts reading data which it processes. The thread that's created in OpenConnection only creates the HttpWebRequest and then calls BeginGetResponse. Calling BeginGetResponse is literally the last thing it does, after that it ends. This is the case with each method, a tread starts, does something, and then moves the rest of the work to a different thread and immediately exits. Why not keep each request's work in one thread? In other words: code:
|
# ? Aug 7, 2007 21:52 |
|
Say I have a GridView that's binding to a list of items, and each row in the GridView has a Repeater that's binding to a list of items. (This is just hypothetical, they could be two Repeaters or whatever.)code:
Hey! fucked around with this message at 22:10 on Aug 7, 2007 |
# ? Aug 7, 2007 22:07 |
|
Jesus. For some unknown reason all of the forms in one of my projects have stopped working; they all come up like this: I found this site (German) which seems to describe the same problem if my German lessons from a few years ago are serving me correctly. I tried messing around with those two lines all I could, but to no avail. Copying the files into a new project didn't fix it either, which leads me to believe that it's something in the source. Help please!
|
# ? Aug 8, 2007 00:02 |
|
ribena posted:Jesus. For some unknown reason all of the forms in one of my projects have stopped working; they all come up like this: Something like that happened to me. I never found a solution though, just pulled the form out of a backup and added it to the project. I'm curious if anyone knows if there is anything like ListBox.IndexFromPoint() function for datagridviews. I have a datagridview which has a comboboxcells in it. I would like for the user to be able to right click on a cell, and then a form for that particular option will popup and auto fill based on the value of that cell (and then the user can edit it as they please). I figure I can code something together to get the index pretty easily but I don't want to reinvent the wheel if its already hidden somewhere.
|
# ? Aug 8, 2007 01:00 |
|
dwazegek posted:This is the case with each method, a tread starts, does something, and then moves the rest of the work to a different thread and immediately exits. Why not keep each request's work in one thread? Maybe because of the overhead of multithreading? Your code would cause threads to be open, holding resources for a much longer time than the first example.
|
# ? Aug 8, 2007 15:04 |
|
ribena posted:Jesus. For some unknown reason all of the forms in one of my projects have stopped working; they all come up like this: Answering my own question. Yes, I'm an idiot. I had done a global find&replace for Initialize->Initialise. This obviously affected InitializeComponent(), causing these symptoms. What a tool.
|
# ? Aug 8, 2007 16:03 |
|
poopiehead posted:Maybe because of the overhead of multithreading? Your code would cause threads to be open, holding resources for a much longer time than the first example. And wouldn't the overhead from constantly opening new threads be much more costly than the alternative? The "worst" section by far is the section in which the stream is read, the buffer that is used is pretty small (although that can be changed easily enough), and the amount of data that is being sent is quite a lot in most cases, so it's not unthinkable that it would be using thousands of new threads. In the most extreme cases we have, it would be switching threads approximately a thousand times each second per source, and it's not uncommon to have 16 or so sources connected at once.
|
# ? Aug 8, 2007 19:23 |
|
I'm having a bit of a moment trying to understand the reason why I'm having to do this:code:
|
# ? Aug 10, 2007 04:05 |
|
Safrax posted:I'm having a bit of a moment trying to understand the reason why I'm having to do this:
|
# ? Aug 10, 2007 23:06 |
|
Fiend posted:Can the object not be cast directly from it's datatype to a float? What is "r[FromX]"? An object, a string, a what?
|
# ? Aug 10, 2007 23:41 |
|
Safrax posted:In the database that column is a float, which I believe comes over in the DataTable as double but has to be cast to whatever it actually is before using it. Without checking to see how accurate this statement is: I believe when you're unboxing a value (taking a value of type "object" and casting it to a value type), you have to unbox it to exactly the same type that was boxed. Then, you can use an explicit cast to get it to another type. You could just do this instead: code:
|
# ? Aug 11, 2007 00:02 |
|
Are there any Win Forms wonks out there that would let me bounce ideas off them via AIM, e-mail or PMs? I'm about ready to go postal on my copy of VS because I can't make my form perform a relatively simple action. When I post in this thread and elsewhere, my question floats off into the wild blue unanswered, possibly because I suck at explaining what I want to do succinctly, or possibly because what I want is just unique enough that there's no pre-canned answer. Being able to talk to someone who can ask for clarifications, ask me questions, and generally be interactive would help me out immensely. Any takers? Pretty please?
|
# ? Aug 12, 2007 14:12 |
|
This entire thread isn't pre-canned answers, and if you suck at explaining yourself, it won't get better over AIM or email. What's the problem?
|
# ? Aug 12, 2007 15:20 |
|
csammis posted:This entire thread isn't pre-canned answers, and if you suck at explaining yourself, it won't get better over AIM or email. What's the problem? Just generally, you can't be ignored in a one-on-one setting. At the very least, the other person will respond with "I don't know" or at least a vague answer, which is infinitely more reassuring when you're trying to learn than no answer at all. Plus, the lag time for small questions can hinder momentum; if I just want to know what property to use to do X when I'm in full-on work mode, it's much easier to just ping someone on AIM then to stop what I'm doing and wait a day or two for an answer on here or another forum. Plus, having a mentor, of sorts, is always helpful. Even with this useful thread, having someone who knows your previous work and where you are as a coder, and can provide advice based on that, is incredibly helpful. So I'm not at all impugning the quality of this thread or the people in it, but merely suggesting that one-on-one help is often more useful than a free-for-all, especially when one has an ongoing need for related help, as I do. As for my specific question, I posted it a few pages back and got no response (ditto with a few preceeding questions I posted earlier,) but here's a link to my post on the MSDN forums, which is a bit more up to date.
|
# ? Aug 12, 2007 15:43 |
|
Magicmat posted:As for my specific question, I posted it a few pages back and got no response (ditto with a few preceeding questions I posted earlier,) but here's a link to my post on the MSDN forums, which is a bit more up to date. Well first of all, it sounds like your application is going to be a usability clusterfuck based on the number of TableLayoutPanels you're using (more than one). If you can't describe it succinctly, and you start running into these sorts of problems, it may be time to start redesigning your solution. Draw a picture of what you have and post it. If you don't need the outer table layout, try setting the Dock property on the ListView to Bottom and put the dynamic TableLayoutPanel in a scrollable Panel with Dock.Fill on it.
|
# ? Aug 12, 2007 15:55 |
|
Magicmat posted:words You might want to consider using http://www.codeproject.com/cs/miscctrl/TgXPPanel.asp instead of hacking a regular control to do the expanding / collapsing. It will add scroll bars automatically. You can also resize it programatically easily enough. I've been using it with a datagridview inside and resizing it to fit the datagridview (which can have rows added/deleted or initialized with X # of rows)
|
# ? Aug 12, 2007 17:55 |
|
Magicmat posted:Well, in a one-on-one setting, the person could ask me to clarify certain parts that may not make sense, ask further questions of me, or just provide them with more information on whatever they needed. Here in the thread, people just seem to skip questions that aren't clear (and I can't, frankly, blame them.) At least, that's my guess. Not sure on how to fix that, but maybe it's something to look into at least.
|
# ? Aug 13, 2007 01:59 |
|
I must know how you pass a file to a c# program. What im trying to do is set firefox to use the program by default for certain applications then automatically open it and do whatever. You know how you open music with a certain program say itunes or realplayer you could click the file and go to Open With then the program and it starts playing. Well id like an explanation of how that works. Think of it as a php post method.
|
# ? Aug 13, 2007 07:10 |
|
In windows, you get passed a file as the first command line argument. So, passing a file to word would be "winword c:\path\to\mydoc.doc". So, just check the args[0] in the Main routine and you should be all set.
|
# ? Aug 13, 2007 13:23 |
|
This single thread seems more helpful than entire bulletin boards on the subject. Now I'm trying to add a custom web control to a page dynamically when a user has clicked a link. The code runs fine, but the control does not appear: code:
code:
|
# ? Aug 13, 2007 14:07 |
|
Dromio posted:This single thread seems more helpful than entire bulletin boards on the subject. Does your custom control's constructor set .Visible = true? If not, that may be it.
|
# ? Aug 13, 2007 14:10 |
|
salithus posted:Does your custom control's constructor set .Visible = true? If not, that may be it. code:
code:
|
# ? Aug 13, 2007 14:30 |
|
I have a gridview on a (fairly complicated) aspx page. In the HTML code that it spits out, a starting "div" tag is automatically generated right before the "table" tag. However, a matching closing "div" tag is not generated. Anyone have any idea what can be wrong here ? The missing tag is creating at least one problem and I'm guessing that it could be the cause of another one. Edit: Never mind, found it. See this link for more details. Problem was using SetRenderMethodDelegate to render a gridview with multiple (merged) headers and having an error in the code to do it. Doing the change in the linked comment fixed it. (I'm using the simplified version by Mykola Tarasyuk linked to in another comment there btw.) uXs fucked around with this message at 15:56 on Aug 13, 2007 |
# ? Aug 13, 2007 15:17 |
|
Dromio posted:This single thread seems more helpful than entire bulletin boards on the subject. You need to also recreate said control OnInit for things to work right. A much easier way to do this in general is to have the control exist and set it's visible property to false until you need it.
|
# ? Aug 13, 2007 18:34 |
|
wwb posted:You need to also recreate said control OnInit for things to work right. A much easier way to do this in general is to have the control exist and set it's visible property to false until you need it. I may need multiple instances of the control on the same page -- that's one reason I'm dynamically adding them to the page. It looks like the life-cycle of the control is getting in the way or something. Are you saying I'd have to create my control's child controls in my OnInit() function, not declaring them in the ascx?
|
# ? Aug 13, 2007 19:02 |
|
Dromio posted:I may need multiple instances of the control on the same page -- that's one reason I'm dynamically adding them to the page. What about creating a collection of them in OnInit, then add and place them in ascx. Will that work?
|
# ? Aug 13, 2007 19:17 |
|
If you need 0 or more, just use a repeater to contain them.
|
# ? Aug 13, 2007 21:15 |
|
Is there some voodoo to handling drag-n-drop that I'm not seeing? I've tried setting virtually every control in my main form(and even the form itself for grins) to allow drops, and tried handling _DragEnter and _DragDrop in several controls, but none of them ever change the cursor nor allow the drop. I've looked through several tutorials which all say that this should be all you need, but for some reason it won't work at all.
|
# ? Aug 14, 2007 09:18 |
|
Dromio posted:This single thread seems more helpful than entire bulletin boards on the subject. code:
I've probably not done a great job of explaining this, but I'm taking a quick break from a hellishly busy day so please forgive any mistakes!
|
# ? Aug 14, 2007 10:28 |
|
quote:I've probably not done a great job of explaining this, but I'm taking a quick break from a hellishly busy day so please forgive any mistakes!
|
# ? Aug 14, 2007 13:42 |
|
Mecha posted:Is there some voodoo to handling drag-n-drop that I'm not seeing? I've tried setting virtually every control in my main form(and even the form itself for grins) to allow drops, and tried handling _DragEnter and _DragDrop in several controls, but none of them ever change the cursor nor allow the drop. I've looked through several tutorials which all say that this should be all you need, but for some reason it won't work at all. Are you setting the DragEventArgs.Effect property in the DragEnter event method to the proper setting? Try DragDropEffects.All (I have to admit, I don't know what the other effects do).
|
# ? Aug 14, 2007 14:35 |
|
|
# ? Jun 10, 2024 19:30 |
|
Inquisitus posted:Bunch of stuff on the window stuff. Awesome, thanks for giving me direction. You wouldn't happen to want to just toss me the function you wrote to get all that would you and save a brother a whole bunch of time?
|
# ? Aug 14, 2007 14:41 |