|
Thanks for the reply. I appreciate it.
I've actually used that document (from MSDN) and gone over the examples there several times and I don't see how you would actually convert from an integer to a string. In the example they give under the heading "Adding Domain List and Simple Drop-down Property Support", you'll see that they are only concerned with string types in the list.
If I could guarantee that my strings are always unique (which, in actuality, they probably won't be), then I could just do a reverse lookup to get the integer back when I need to set a value. The exmple they provide in the MSDN doc gives a good way to use strings, but doesn't seem to pertain to having some different corresponding value than what is displayed in the drop down. Is that the section you are referring to or is there some other part you are talking about?
Thanks again.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Your welcome!
Now, to pertain id to its string, obviously you will create an object that have two properties (id and value) and override the ToString() to display the value.
Ok, now if you use standatd listbox control in windows forms application, all objects that you will append to this control will be displayed using the string retrieved by calling to the ToString() method you just implemented.
This leads you to what we call "CustomEditor".
With CustomEditor you can create your own windows form like application to display and manage the property - so create one with listbox control to retrieve the records from the second table and adding them using the custom object you have just created.
The last section in the mentioned MSDN article discusses this issue.
Best regards, elaj
|
|
|
|
|
Hi. This is probably a basic question, but I haven't been able to find the answer, so if you can help me I'd really appreciate it.
I have the following code:
string postData = string.Format("pi_username={0}&pi_password={1}", m_user, m_password);<br />
byte[] postBuffer = System.Text.Encoding.GetEncoding(1252).GetBytes(postData);<br />
httpReq.ContentLength = postBuffer.Length;<br />
Stream postDataStream = httpReq.GetRequestStream();<br />
postDataStream.Write(postBuffer,0,postBuffer.Length);<br />
postDataStream.Close();<br />
<br />
httpRes = (HttpWebResponse)httpReq.GetResponse();
I'm trying to post this data to the following webpage:
https://secure.globeadvisor.com/gi/db/ga.advisor_homepage[^]
I think part of the problem is that there are multiple forms on this page, and there are 2 Method = "Post". Currently, my error is that I have invalid parameters. Can anyone help me? I'm seriously stuck. Thanks..
Sheri..
|
|
|
|
|
hi...
how i can include help project files (.chm) in my application without need to install the application?
when i start my application (debug or release mode) the help files and folder doesn`t appear in my appplication (Debug\bin dir) folder. that way, i can't use the help files cause they are located in my root solution folder and not in my main application folder (Debug\bin).
i think the case is the same as a project that contains files not used directly by the application, like a image directory (in another project)not included in the resources, for instance.
thanks in advance... :]
|
|
|
|
|
You can use post build commands to copy files to your output directory. Under your project's properties, look for the "Build Events" there are text boxes in which you can enter commands to be executed upon completion of a successful build. I would just use a wild card xcopy to move all chm files, image directories, etc. to the ouput directory.
|
|
|
|
|
Thanks for your answer Jim.
It solved my problem.
|
|
|
|
|
I have been trying to find a way to check file security BEFORE attempting to access a file or folder.
Given the current user and a requested access method, I want to return true or false, whether the user has the given access or not.
With .NET 2.0 I was thinking that this would be provided, but apperently it is not.
Any help appreciated!
|
|
|
|
|
You might be able to put something together using the System.Security.Permissions.FileIOPermission[^] class.
Keep in mind, the best way to do this is to just try and open the file. The security checks are done for you, oddly enough - by this very class, at the time the attempt is made to open the file. So, you're not saving any time by doing this.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi, wise people
I'm not a great programmer, so hope you'll help me.
I need to create transparent(opaque!) control - like a panel with Opacity(0..100) property - which must be transparent not only visually, but also TRANSPARENT FOR MOUSE MOVES AND CLICKS.
Such control - of course is not a top-level window.
Such control - of course must not be under other controls on the window where it is put.
Visual C#, Studio 2005.
Windows 2000, XP or later.
If any ideas, you are welcome. I'll be very thankful.
-------------------------
lalala, I'm from Ukraine
|
|
|
|
|
try the control Visible property.
i think this works - if i have understood your trouble.
cya
|
|
|
|
|
you are a clever guy ) but I need much more - TRANSPARENCY! (OR OPACITY) - WITH CHANGEABLE POWER.
pardon me, I'm from Ukraine, so cant understand differency between transparency and opacity.
So, lets think - your post was just a joke.
----------------------------
lalala, I'm from Ukraine
|
|
|
|
|
Pardon me, shameless plug -> http://www.codeproject.com/vb/net/ClickThroughWindows.asp[^]
You can't make just a single control transparent to the mouse using this technique. It's the whole form, or nothing. Alpha-based mouse transparency doesn't work correctly, at least on 2000 and XP, it doesn't.
If you try to make just a control, like a panel transparent, then put it on a form that doesn't support transparency, it doesn't work. The click still works on the control itself. At best, it would fall to the form the control is on.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
RomkaFromUa wrote: I understand, you are a great programmer, but I'm also not just a user.
OK, smartass... I never said I was a "great programmer".
You better look up the definition of "opaque[^]". I can't tell what you want from your orignal description. Opaque and transparent are direct opposites of each other. Do you want a control you can see through? That's transparent. Can't see through it? That's opaque.
Which is it?
I posted the link to the article as a POSSIBLE guide to show you how to make an entire form pass through mouse moves and clicks. For you, it wasn't meant to be a guide to the WS_EX_LAYERED attribute.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
))
I see, that not just me dont know English well... cuz sometimes, in my Inet-searching experience, transparent windows meant to be fully transparent in some parts... and I want, as you understand
"Do you want a control you can see through?" - yessss )
+Thanks for terms description)
I'll reply concretely later.......
----------------------------
lalala, I'm from Ukraine
|
|
|
|
|
RomkaFromUa wrote: I see, that not just me dont know English well...
When you stop insulting people and just answer their questions, I'll take you off my blacklist...
You asked a question and, due to English not being your primary language, worded it using conflicting terminology. I THOUGHT I figured out what you wanted, but instead of clarifying, you decided to insult me. Have a nice life!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave, you understood me in a wrong way!
I was talking about other people over Inet, that also dont know English well and so have made me not understand what is the difference between transparency and opacity!
I hope that this thought was written clearly for you and you'll not be angry for me...
People... he talked something about blacklist... if he dont hear me, please make him understand that I dont want to make him angry
Also I hope somebody will help me with my problem, but I begin to see that this problem is unsolveable
----------------------------
lalala, I'm from Ukraine
|
|
|
|
|
If you want the control to be absolutely transparent, you'll have to draw it yourself. Using the Color.Transparent color won't do what you want, apparently, since setting the BackColor of a control to Transparent only makes the background of the control take on the properties of the controls parent container. It's not truely "transparent". This means that any control under your control will NOT show through in the "transparent" regions of your control.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi its a pleasure to see you now.
I DONT want an absolete transparency. I need to control its level. Your last idea (setting BackColor) was tested in the older times, and as you said, it is not what I want (I need to see controls through)
Maybe, now everything is clear with my unperfect English )
But for this time I dont see any abilities to solve my problem
1) set BackColor to transparent value - not good, cuz dont see controls through
2) WS_EX_LAYERED - not good - it works on top-level windows, not child windows , and I need the last variant
3) Regions - also not good - they provide full transparency, not controllable.
Any other ideas - I'm waiting.
----------------------------
lalala, I'm from Ukraine
|
|
|
|
|
If you ned to click on those controls, go back and read my article. It explains what the process is to make the form "click-through" and you can still use transparency. There's even a sample application in it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave, WS_EX_LAYERED does not work with child windows/controls!
----------------------------
lalala, I'm from Ukraine
|
|
|
|
|
No, it doesn't. You also cannot make just a single control click-through. It's the entire form, or nothing.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Ok, I'll try to ask for another variant - more simple.
TRANSPARENT FOR MOUSE MOVES AND CLICKS - dont pay attention to this feature for now.
Just - opaque control
----------------------------
lalala, I'm from Ukraine
|
|
|
|
|
My current C#.NET project is MDI-based.
I am using a user control that has 10 textboxes. This user control is repeated 20 times on a screen. (that gives 200 textboxes on the screen)
When I refresh the screen, I can see every textbox being drawn to the screen from top to bottom. The desired behaviour is that the screen should appear in a flash without any rollover effect.
Currently, the screen gets refreshed at a rate of 35 milliseconds. We need to minimize this to 2-3 milliseconds.
I found that When one textbox of the usercontrol refreshes, internally Paint Event of that control is raised.
The textbox Paint Event internally raises its container's (user control's) paint event.
Subsequently, the user control raises paint event of all textboxes in it.
So I tried to suppress raising the Paint Event of usercontrol when the textbox is refreshed. (by Override OnPaint and Override OnPaintBackground event).
Also, double buffering is used.
But this has not helped much.
Is there a way we can accomplish a refresh rate of < 5 milliseconds?
|
|
|
|
|
SwEr wrote: Is there a way we can accomplish a refresh rate of < 5 milliseconds?
Don't try to do so much in the painting. 200 textboxes is excessive - do you really need that many on screen at one time? A user can only use 1 at a time, and only look at a couple at a time.
|
|
|
|
|