|
00000000 to 7FFFFFFF represent positive integer values and FFFFFFFF to 80000000 represent negative integer values
|
|
|
|
|
I thought so. You're trying to take an unsigned number ( FFFFFFF does NOT represent a negative number, necessarily ) and turn it into a signed number. The easiest way to do this would be to cast it, at a guess. Or do the conversion manually.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
as uint32 is not a primative type supported directly by vb.net ive been trying to cast it to other types first but ffffffff always ends up as -1,
i guess ill have to convert it manually to a string representing the unsigned decimal value first
|
|
|
|
|
i have a webservice under C:\Inetpub\wwwroot\RetrieveData\ now i want this web service create a txt file under this folder i have changed the permission of this folder to write as well, but still when i run this webservice i get a exception which is C:\Inetpub\wwwroot\RetrieveData\ the path is denied! how to solve this problem ? pls help me! thank you very much!
I am Entry level person
|
|
|
|
|
The user your web service runs under needs permission to create the file.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Has anyone used My.Settings in VS 2005. According to this[^] article once the settings are in place all I should have to do is type My.Settings. and intellisense should display my config settings. Intellisense it not working for me with My.Settings. Has anyone else ran into this? I'm using V2 2005 Beta 2...maybe it is a problem with the beta and I'll need to get the final release....
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
Hi,
What would be the VB.Net equivalent of these statements?
System.IO.MemoryStream m;
m= (System.IO.MemoryStream)theReport.ExportToStream(
CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Thanks,
Jamie
|
|
|
|
|
Dim m as System.IO.MemoryStream
m = theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
I *think*
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Dim m As System.IO.MemoryStream
m = CType(theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
|
|
|
|
|
DirectCast would be better, more efficient. CType is for changing the type to something completely different. Like an int to a float.
Dim m As System.IO.MemoryStream
m = DirectCast(theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
|
|
|
|
|
Yes, provided that you know that the cast target run-time type is exactly System.IO.MemoryStream - otherwise you have an exception. I'm not familiar with CrystalDecisions, however, so I thought CType would be safer.
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
|
|
|
|
|
Thanks guys. I get it now.
Jamie
|
|
|
|
|
Hi all,
I am new to VB, just writing afew programs as i learn. I made an easy shortcuts program eg. click a button and start a program, i have no problem with iexplorer or firefox but when i try another exe eg.. a game i get this message:-
An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in system.dll
I have tryed Process.start / adding a process component / adding the full path of the file, but nothing.
thanks,
|
|
|
|
|
I've written a windows service that contains some class objects. My problem is that only the code in the OnStart sub will execute. When I do a MyClass.RunThisSub() from inside the OnStart, the code in RunThisSub is not execute. If I copy the same exact code from RunThisSub into the OnStart it runs just fine. It is probably something simple I'm over-looking since this is my first Windows Service....any help would be appreciated.
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
I need to interface with a dll from VB.NET. I have example code of calling a function in that DLL in VBA it is as follows:
Private Declare Function BuildKeyboardList Lib "keyman32" (ByRef pKbdInfo As Any, ByRef pCount As Long) As Long<br />
Private Sub MySub()<br />
Dim xxx As Long = 0<br />
If BuildKeyboardList(ByVal xxx, nLayouts) = 0 Then Exit Sub<br />
...<br />
ReDim KeybdInfo(nLayouts)<br />
If BuildKeyboardList(KeybdInfo(1), nLayouts) = 0 Then Exit Sub<br />
...<br />
End Sub
How do I Declare This Function in VB.NET with an "Any" argument, that sometimes will be a long and other times will be a structure?
How do I Call this function sometimes ByVal and other times ByRef in VB.NET?
Rand
|
|
|
|
|
I don't pretend to know the details of the marshal syntax, but I've found examples for the SendMessage API (which has the last parameter as any in VB6):
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, _
<MarshalAs(UnmanagedType.AsAny)> ByVal lParam As Object) As Integer
Not sure of the ramifications of designating a parameter as unmanaged type but this seems to work in the above example, perhaps you can try it with your API call.
-- modified at 19:30 Monday 31st October, 2005
|
|
|
|
|
I am trying to find a control or a tool that I can use with VB.NET so that the data I retreive from a data base can be displayed on the screen in a form like Excel. For example, suppose I have a form on the screen, like a grid table, with 20 raws and I fill only 15 raws with data. The other 5 raws are empty. In other words, I need a way to display a 20 raws grid table with some of these raws filled with data. Editing of these data is, of course, needed.
Any advice on that ?
|
|
|
|
|
I am trying to upload files to a remote server. If i use Webclient.uploadfile(....) with the <method> POST then i get an error (405) method not allowed. Alternatively, if i use <method> PUT the files are upload well but the program modifies the contents of my files (by adding text into file) hence corrupting my files.
Any ideas or other solutions of getting this done will be highly appreciated.
Qariuki
|
|
|
|
|
I need a to connect to an accesspoint and get the MAC adress using SSH.
Anybody who has done something like this?
|
|
|
|
|
In the following code I need to assign the value for the epfNo(bolded) as variable ... How to make it in a sql query..?
With Adodc1
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\ot.mdb;Persist Security Info=False"
sqlStr = "select * from OTJob WHERE epfNo='0122'"
.RecordSource = sqlStr
End With
Jena..
|
|
|
|
|
jenagan wrote: With Adodc1
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\ot.mdbersist Security Info=False"
sqlStr = "select * from OTJob WHERE epfNo='0122'"
.RecordSource = sqlStr
End With
With Adodc1
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\ot.mdbersist Security Info=False"
sqlStr = "select * from OTJob WHERE epfNo='0122'"
.RecordSource = sqlStr
End With
use this :
Dim strEpfNo = "0122"<br />
sqlStr = "select * from OTJob WHERE epfNo='" & strEpfNo & "'"
R A M
|
|
|
|
|
In Microsoft Access 2000, it is easy to print a WYSIWYG form that looks exactly as it does on the screen. Looking through various threads, I didn't find anything -- maybe didn't search long enough. In VBA on Access, it's easy. How is it done in VB.net?
Rich Locus
|
|
|
|
|
I should have included a code sample from Access.
The function, which I call from a Form Event, prints an exact copy of the form.
This is all it takes in VBA on Access:
Function PrintWYSIWYGForm()
On Error GoTo macPrintForm_Err
DoCmd.PrintOut acPrintAll, , , acHigh, 1, True
macPrintForm_Exit:
Exit Function
macPrintForm_Err:
MsgBox Error$
Resume macPrintForm_Exit
End Function
Sure would be nice if something existed like that in Visual Basic.net.
Rich Locus
|
|
|
|
|
There's a Windows Forms control called 'PrintDocument'. Add one to your form. It has a Print method. It actually will print out a blank page, I just discovered. However, I'm sure this is where your solution lies, perhaps google can fill the blanks ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am trying to create a VB.NET smooth progress bar custom control that also displays the percent in the middle. To prevent flicker I calculate the part of the control rectangle that has changed when the progress value is updated. To force the text in the middle to also be updated I also calculate a second rectangle that bounds the text. Then I call Invalidate method using the Union method with the two rectangles - the progress bar rectangle and the text rectangle.
This works fine and does not flicker until the progress rectangle reaches the text rectangle. Once it reaches the text rectangle, and at all points even after it passes the text rectangle, there is flicker.
Any suggestions??
|
|
|
|