SHGetFileInfo Returning 4 Letters Short On Display Name?
May 23, 2010
I am using the SHGetFileInfo function to get the name of folders etc. The reason that I use it, is because it also has to get the name when copying a drive, so it returns "Local Disk (C:)" instead of "C:".This worked, up until recently, I cannot remember what I changed! Suddenly, it's always missing the first 4 letters! Like, "Local Disk (C:)" becomes "l Disk (C:)".
I'm on Windows 7, and it works just fine on Windows XP. Here's my
<DllImport("shell32.dll")> Private Function SHGetFileInfo(ByVal pszPath As String, ByVal dwFileAttributes As UInteger, ByRef psfi As SHFILEINFO, ByVal cbSizeFileInfo As UInteger, ByVal uFlags As UInteger) As IntPtr
End Function
[code]....
I also made a test project with the EXACT same code, and it did work...
I have a treeview, it lists all folders and subfolders and files within each folder. Now, I want to display each file / folders associated icon. I am using the SHGetFileInfo API, it works sort of, what I mean by sort of is, that my treeview doesn't update after each folder / file. Sometimes it keeps giving me the Recycle Bin's icon at different folders.
In my project I need to use a 190 very long strings with different number of characters (4-60).I want to mark them in a short form with the numbers 001, 002, 003 ... 190. Is there an easy way to display the full name of the string when I choose a short name ? Of course, I do not want to write 190 times "if - end if" and also I would like to avoid a complicated database. Onenew Visual Studio 2010
is there any way to take letters out of a textbox then re-display them scrambled, such as the word Tissue then at the push of a button make the word displayed sisute or some other order?
Im trying to get an application to count letters and words. I want it to count them at runtime and display it in a label box. My form will run and I can type text in my textbox but my lblOutput doesn't update.[code...]
I'm keeping track of some things that are numbered and others that are lettered; while NumericUpDown is perfect for selecting numbered things, I need an analogue for selecting lettered things. The obvious choice would be a listbox that just contains all the letters of the alphabet. But I need to show only the appropriate range of letters, so if I want to use a listbox, I need to write a function that populates the listbox with the first n letters of the alphabet; if n > 26, it should continue with aa, ab, and so on. How do I do this?
I have an ASP.NET web application (VB.NET) using an Oracle database. On an insert, I need to get the identity of the inserted row back. I am trying to use RETURNING, but I keep getting a value of 1 returned.
Dim strInsert As String = "INSERT INTO L.TRANSACTIONS (LOCATION_KEY, TRANS_CREATOR, TRANS_EMAIL, TRANS_PHONE) VALUES (:location_key, :trans_creator, :trans_email, :trans_phone) RETURNING TRANS_ID INTO :ukey"
My brain may just be fried since it's the end of the semester, but my teacher kicked this back to fix and resubmit...she said that I am "returning the name of your function rather than your variable name".
Here is my code for all 3 forms.
code:
These are forms to calculate the cost of getting a cell phone package.
i have a program using a select case to convert letters to special charaters. My question is how can I get the code to read upper and lower case letters without having to put the upper case letters in my select case statement. Example: Part of my code is
In VB.NET: If varShort is a Short and varBit is a value from 0 to 15, how can I set the bit in varShort identified by varBit without disturbing any of the other bits in varShort? My problem, of course, is with the most significant bit, bit 15. Since varBit is determined at runtime
[code]'when i enter 'Q' key output(textbox1.text) = 'qQ' how Show Q only''' 'and how i can set multi shortkey output = CTRL+TAB+CAPS LOCK,and bla bla , and send to Timer1' End Sub.[code]
1. i need to find the place / city / location from IP address. does anyone know about this?
2. I want to know if there is any way to get a short URL for the db entities(i.e; if i press my website and type a db content it should go to a new page)for ex i have a site called [URL] here in actual code if i press [URL], it redirect to new page to display the content of abc.Now, what i want is i need to type [URL] and it should redirect to new page with info abc.
I have created one silverlight application.In the application i have included two buttons named as SAVE and CANCEL. I want to give short cut keys for those two controls.For Example if user click CTRL+S it should save the data and CTRL+C it should cancel.
Private Sub myGrid_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles myGrid.KeyDown If e.KeyCode = Keys.Divide AndAlso e.Control Then
[Code].....
This works (For "Ctrl"+"/"), but the problem is that this works for any key different than "-". If I specify that the Keycode is Keys.Subtract (To use "Ctrl"+"-") it is never caught!
Private Sub myGrid_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles myGrid.KeyDown If e.KeyCode = Keys.Divide AndAlso e.Control Then Dim response = MsgBox("are you sure to delete a record?", vbYesNo) If response = vbYes Then
[code]....
This works (For "Ctrl"+"/"), but the problem is that this works for any key different than "-". If I specify that the Keycode is Keys.Subtract (To use "Ctrl"+"-") it is never caught!
I have a checkbox with name: FinalDist with short cut key as "i". So, while using the short cut key Alt+I, I want the checkbox to be clicked automatically. What property of VB will do this?
I do have the Windows 7 API pack and I cannot figure out how to get a taskbar progress bar (TBPG for short). I have tried WPF and no help and most of the code in the API pack is C#.
Extract the most right &HxxFF as SByte (signed)Extract the left &H7Fxx as Byte (unsigned) Identify if the most left &H8xxx is positive or negative (bool result)?
I am retrieving lists of crc32 hashes that contain names of files, not there contents.I need to be able to decrypt the strings which are hashed names like "vacationplans_2010.txt" which are less then 25 characters long.
I need to convert a Short to his binary equivalent. For example:Dim x As Short = 20480 And then I need a method to get the binary thingy, which in this case is: 101000000000000
I searched for a answer using google, but I couldn't find a proper explanaition.