 |
|
 |
Ash_VCPP wrote: memory could be read
we all know memory should be write-only. I suggest you demand a refund.
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
 |
|
 |
Hi Luc,
I appriciate your sense of humor , So please consider it as "memory could not be read" and please give me some suggestions on it.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
 |
|
 |
suggestion: any of these[^], maybe the second one?
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
 |
|
 |
I have added users to the TFS Project.
But when try to access the portal, cannot access the Portal.
Please Help.
|
|
|
|
 |
|
 |
Hello,
While doing the TFS project permission settings,
You have to add users in the Portal seperately in order to give them access to the Portal.
Automatically the Portal permissions does not get set if you add users to the TFS Project.
You can add users by opening the portal, log in as admin and go to Site Settings.
|
|
|
|
 |
|
 |
How can I load a Embedded report by its name and is it possible at all?
(I use Crystal Reports for Visual Studio 2008)
Thanks.
|
|
|
|
 |
|
 |
I've written a routine that gets the windows installation key from the registry. This routine is just one part of a bigger application that I'm building. However, I have a problem with the routine not running correctly when Visual Studio's Target CPU option is changed from AnyCPU to x86. Note: I'm running a 64bit OS, but I want the app to specifically target 32bit platforms.
When VS is set to AnyCPU the routine works fine. When set to x86 an invalid cast exception of "Unable to cast object of type 'System.Int32' to type 'System.Byte[]'" occurs at the DirectCast line.
Dim aryDigitalProductID As Byte()
Dim objDPID As Object = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", "DigitalProductId", 0)
If objDPID Is Nothing Then Return "Not Available"
aryDigitalProductID = DirectCast(objDPID, Byte())
I'm using the directcast because I prefer to code with Option Strict set to on. However, if I turn Option Strict off, and coerce objDPID to an array the invalid cast exception still occurs.
Does anyone know how to overcome this so the routine would work when targeted specifically at a 32bit platform?
Also, when the AnyCPU option is selected, how does the compiled AnyCpu code differ from x86 code?
Any help would be greatly appreciated. (As you can probably infer, I'm not completely au fait with VB.Net and VS.)
|
|
|
|
 |
|
 |
The problem you're having is from the way x64 windows runs x86 code. The x64 regedit and the x86 regedit point to different hives.
x64 windows running x86 code will actually substitute a 32bit registry in much the same way it substitutes the 32bit Program files directory.
Your program is actually accessing the key at HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion when running in x86 mode, instead of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion that it gets in anyCPU or x64 mode, and since the DigitalProductId key doesn't exist there, you're getting your default value which is 0. That's where the System.Int32 comes from.
If you run yor program on an x86 OS it will work, it's only failing because you're specifying x86 on an x64 OS. Leave it on AnyCPU and you should be fine.
The code that VS compiles doesn't change when you change the Target CPU, it only changes a header flag that the interpreter reads and forces it to use the x86 interpreter.
|
|
|
|
 |
|
 |
Thanks for the explanation, I'd forgotten I'd posted this question it was that long ago Your answer makes perfect sense now it has been explained. I can't even remember now why I specifically wanted to target x86 architecture in the first place as the finished program was designed to run on either platform.
See this link for the finished program / CP article. Retrieving Information From Windows Management Instrumentation[^]
Nobody can get the truth out of me because even I don't know what it is. I keep myself in a constant state of utter confusion. - Col. Flagg
|
|
|
|
 |
|
 |
You're welcome. I had been searching for what AnyCPU actually did a couple days ago and this thread was one of the first hits on google, so now that I know I figured I should update it for future searchers.
|
|
|
|
 |
|
 |
Hi,
Is it possible to configure Visual Studio 2008 to use the version of MSDN library that I already have installed on my system rather than trying to search online?
Thanks
Tony
|
|
|
|
 |
|
 |
In the Express edition you can set this via Tools->Options->Help.
[edit]Sorry, that's "Tools" not "Tolls"[/edit]
|
|
|
|
 |
|
 |
I need to read a employee database and display some fields in a windows forms application - that is fine except the varbinary(max) image. I need to move forwards and backwards through the records (some images are null).
The problem I have is using the dataset to obtain the information for the image convertion. I can find loads of code to use a button(s) to get & convert the image - this does not help me.
Help will be greatly appreciated.
Below is some of my code:
Public Class Form1
Private Sub GraduatesBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GraduatesBindingNavigatorSaveItem.Click
Me.Validate()
Me.GraduatesBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Graduates_DatabaseDataSet)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Graduates_DatabaseDataSet.Graduates' table. You can move, or remove it, as needed.
Me.GraduatesTableAdapter.Fill(Me.Graduates_DatabaseDataSet.Graduates)
End Sub
Private Sub GraduatesBindingNavigator_RefreshItems(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GraduatesBindingNavigator.RefreshItems
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub PhotographLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub SurnameTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SurnameTextBox.TextChanged
End Sub
Private Sub FillBysurnameToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Try
Me.GraduatesTableAdapter.FillBysurname(Me.Graduates_DatabaseDataSet.Graduates, SsnameToolStripTextBox.Text)
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
End Sub
End Class
|
|
|
|
 |
|
 |
hi
i am sory.my languge is bad.
i have desing a web page , containing a file uploade component,image component, and a button component.
now i want, when select a image wihte file uploade component and press button component ,the image load in the image component.
plaes help me.
|
|
|
|
 |
|
 |
bahar.ghara wrote: hi
i am sory.my languge is bad.
i have desing a web page , containing a file uploade component,image component, and a button component.
now i want, when select a image wihte file uploade component and press button component ,the image load in the image component.
plaes help me.
Please READ this answer[^]. A number of people have offered you help with this question; try some of their suggestions.
|
|
|
|
 |
|
 |
this is not a question about Visual Studio, is it?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
 |
|
 |
He's asked the same question in the ASP.NET forum over and over, but no matter how often he asks it, he doesn't respond to questions and has nothing remotely like the ability to comprehend the answers.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
 |
|
 |
r/s
when i run my aaplication in vs 2005
i get the message
" unable to connect to vs local host web server "
i searched i foun d that thers a file callede webdev.webserver.exe
and i deleted it and copied from another system
it worked fine but only 1 time
now the same problem is occuring again
plz. do help
|
|
|
|
 |
|
 |
Hi,
Is there a simple way or shortcut (if so, what is it ) to open the files/ move to the "next" file containing definitions of a particular partial class?
Currently I'm using "Find All References" when right-clicking the partial class name. If there is a better way, I'd like to find out.
Googling didn't yeild any results for this so I suspect the functionality does not exist.
Thanks.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
 |
|
 |
Hi,
this seems to work:
1. right-click on the class name X and choose "Go to definition"; this brings you to the X constructor.
2. move up in that file to the class statement
3. right-click on that class name X there and choose "Go to definition"; this puts the "partial class X" locations in the "Find symbol results" pane, where they are clickable.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
 |
|
 |
Thanks
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
 |
|
 |
you're welcome.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
 |
|
 |
This is driving me up the wall and I can't find a solution. The C# code editor property places #region directives, but #if/else/endif directives always jump to the beginning of the line instead of the current indentation level.
What gives? Any way to change the default??
|
|
|
|
 |
|
 |
Mike Marynowski wrote: #if/else/endif directives always jump to the beginning of the line instead of the current indentation level.
I always think that is the best way, so you can clearly see where some code may be parsed out by the preprocessor.
|
|
|
|
 |
|
 |
I disagree. It just looks stupid when you have code indented 5 or 6 tabs (i.e. deep in a nested loop) and the compiler directives are at the beginning of the line. It becomes difficult to see what lines are even affected at that point.
Seeing what code is parsed out is easy because visual studio grays out and collapses the region.
Either way it just looks messy...I much rather have them indented like the region tags.
|
|
|
|
 |